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

getPropertyType/getAttributeType when null namespaces are passed. #553

Closed
fred-wang opened this issue Oct 22, 2024 · 3 comments
Closed

getPropertyType/getAttributeType when null namespaces are passed. #553

fred-wang opened this issue Oct 22, 2024 · 3 comments

Comments

@fred-wang
Copy link
Collaborator

cc @smaug---- @mbrodesser-Igalia @lukewarlow

elementNs and attrNS are optional nullable arguments defaulting to the empty string, so we should test what happens when null values are used:

optional DOMString? elementNs = ""
optional DOMString? attrNs = ""
@fred-wang
Copy link
Collaborator Author

For elementNs, the step retrieving the "element interface for localName and elementNs" is similar to step 7 of DOM's create an element. Probably this is not very explicit, but I understand this falls back to the Element interface for null namespace, similarly to createElementNs(null, "foo"). However, we don't have any tests for that (see #429).

So checking on Chromium and WebKit, an explicitly null elementNs seems to fallback to the HTML namespace.

@fred-wang fred-wang changed the title Add tests for getPropertyType/getAttributeType when null namespaces are passed. getPropertyType/getAttributeType when null namespaces are passed. Oct 22, 2024
fred-wang added a commit to fred-wang/trusted-types that referenced this issue Oct 23, 2024
…namespace

This is the behavior that Chromium and WebKit currently implement, see
https://phabricator.services.mozilla.com/D226547

Currently, it seems that the "interface for localName and elementNs"
would fallback to `Element`, similarly to what happens with
`document.createElementNS(null, "div")` for example.

Note that a null attrNs is already handled by the spec.

See also w3c#553 for details.
moz-wptsync-bot pushed a commit to web-platform-tests/wpt that referenced this issue Oct 23, 2024
… elementNs/attrNs.

See w3c/trusted-types#553

Differential Revision: https://phabricator.services.mozilla.com/D226547

bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1926286
gecko-commit: 3cd560489b81d73359c865b7613df0e98fc653dd
gecko-reviewers: smaug
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this issue Oct 23, 2024
i3roly pushed a commit to i3roly/firefox-dynasty that referenced this issue Oct 24, 2024
moz-wptsync-bot pushed a commit to web-platform-tests/wpt that referenced this issue Oct 24, 2024
… elementNs/attrNs.

See w3c/trusted-types#553

Differential Revision: https://phabricator.services.mozilla.com/D226547

bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1926286
gecko-commit: 3cd560489b81d73359c865b7613df0e98fc653dd
gecko-reviewers: smaug
koto pushed a commit that referenced this issue Oct 28, 2024
…namespace (#557)

This is the behavior that Chromium and WebKit currently implement, see
https://phabricator.services.mozilla.com/D226547

Currently, it seems that the "interface for localName and elementNs"
would fallback to `Element`, similarly to what happens with
`document.createElementNS(null, "div")` for example.

Note that a null attrNs is already handled by the spec.

See also #553 for details.
jamienicol pushed a commit to jamienicol/gecko that referenced this issue Oct 30, 2024
@koto
Copy link
Member

koto commented Oct 31, 2024

This seems to be resolved in the spec via #557, and in WPT via web-platform-tests/wpt#48769. @fred-wang, do you agree this can be closed now?

@fred-wang
Copy link
Collaborator Author

Right, we can close it now.

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

2 participants