Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chrome won't render search app components that set attributes in constructor #74

Open
derekenos opened this issue Dec 3, 2020 · 0 comments

Comments

@derekenos
Copy link
Collaborator

When attempting to view the production search app in Chrome, the custom <search-app> element was present in the source but not being rendered. There were no errors reported in the console. Testing locally, I removed the type="module" from the search app import in head.html, reloaded and saw Chrome complain in the console:

Uncaught DOMException: Failed to construct 'CustomElement': The result must not have attributes

See: https://stackoverflow.com/questions/43836886/failed-to-construct-customelement-error-when-javascript-file-is-placed-in-head

Moving the script import from head.html to foot.html appears to fix the problem for now, but we should modify the search app to comply with the guidelines outlined here: https://html.spec.whatwg.org/multipage/custom-elements.html#custom-element-conformance

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant