iron-component-page
iron-component-page copied to clipboard
Doesn't render element description if element is served in a valid HTML document.
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.
This sounds suspiciously like a hydrolysis
bug
@garlicnation should this move to hydrolysis?