-
Notifications
You must be signed in to change notification settings - Fork 92
Open
Description
just-validate works great in standard web pages, but had problems when I went to use it in a Web Component. The component was written in LIT, but this is likely a more global issue.
To resolve the issues with web components, I downloaded the 4.3 .es.js module and added a setting "useShadowRoot", defaulted to false, and added an internal variable in the "initialize" method:
this.myDOMRoot = (this.globalConfig.useShadowRoot ? this.shadowRoot : document);
And replaced any "document.whatever" with "this.myDOMRoot.whatever" (about 5-10 instances). This change made everything work as expected in the web component. It would be nice to have this option or some other sort of document root option integrated into future releases.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels