iron-component-page icon indicating copy to clipboard operation
iron-component-page copied to clipboard

Doesn't render element description if element is served in a valid HTML document.

Open FuzzicalLogic opened this issue 9 years ago • 2 comments

Custom elements defined in an <html> will render the element description, so long as a <head> and <body> are not defined. All properties, methods and events do render properly. The HTML document specification requires these elements, and many browsers automatically add them, if they are missing. Polymer itself properly imports elements defined in this manner, as well.

Broken Example:

<html>
    <head>
    </head>
    <body>
        <!-- Custom element description (does not render) -->
        <dom-module id="custom-element">
        </dom-module>
        <script>/* Element registration */</script>
    </body>
</html>

Working Documentation:

<html>
    <!-- Custom element description (does render) -->
    <dom-module id="custom-element">
    </dom-module>
</html>

The concern here is that as a document, when viewed in browser inspector, the document still has the document.head and document.body properties. In cases where a head or body is not specified, any <link> above the first element or custom element actually appears in the document.head. The document.body does not begin until the first non-metadata element

Again, Polymer recognizes the HTML document specification behavior and still loads the import properly, so this inconsistency should probably be resolved.

FuzzicalLogic avatar Jun 29 '15 08:06 FuzzicalLogic

This sounds suspiciously like a hydrolysis bug

notwaldorf avatar Jan 27 '16 23:01 notwaldorf

@garlicnation should this move to hydrolysis?

justinfagnani avatar Feb 11 '16 00:02 justinfagnani