Skip to content

popup-info-box-web-component violates HTML spec #34

@arcticmatt

Description

@arcticmatt

The spec says this:

The element's attributes and children must not be inspected, as in the non-upgrade case none will be present, and relying on upgrades makes the element less usable.

The popup-info-box-web-component example violates this! See https://github.com/mdn/web-components-examples/blob/master/popup-info-box-web-component/main.js#L22

The example still works because the script is loaded with defer. However, it doesn't work if you do something like this:

const elem = document.createElement('popup-info');
elem.setAttribute("data-text", "foo");
document.body.appendChild(elem);

Since this example is so visible, it would be nice if it followed the spec.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Content: WebAPIbugIndicates an unexpected problem or unintended behavior.help wantedIf you know something about this, we would love your help!

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions