-
Notifications
You must be signed in to change notification settings - Fork 76
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
Comments
So checking on Chromium and WebKit, an explicitly null elementNs seems to fallback to the HTML namespace. |
…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.
… 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
… explicit null elementNs/attrNs. r=smaug See w3c/trusted-types#553 Differential Revision: https://phabricator.services.mozilla.com/D226547
… explicit null elementNs/attrNs. r=smaug See w3c/trusted-types#553 Differential Revision: https://phabricator.services.mozilla.com/D226547
… 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
…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.
… explicit null elementNs/attrNs. r=smaug See w3c/trusted-types#553 Differential Revision: https://phabricator.services.mozilla.com/D226547
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? |
Right, we can close it now. |
cc @smaug---- @mbrodesser-Igalia @lukewarlow
elementNs
andattrNS
are optional nullable arguments defaulting to the empty string, so we should test what happens when null values are used:For
attrNS
, a null value is explicitly handled in Get Trusted Type data for attribute. This case is covered by "getAttributeType with full namespace info" cases ofTrustedTypePolicyFactory-getAttributeType-namespace.html
becauseattribute.namespaceURI
is null here, but maybe a more explicit test with a null argument would help.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 theElement
interface for null namespace, similarly to createElementNs(null, "foo"). However, we don't have any tests for that (see There's a lack of test coverage over the namespace aspect of getPropertyType #429).The text was updated successfully, but these errors were encountered: