Skip to content

Commit c072d13

Browse files
committed
Treat a null elementNs in getPropertyType/geAtributeType as the HTML 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 #553 for details.
1 parent 3b74745 commit c072d13

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

spec/index.bs

+2-2
Original file line numberDiff line numberDiff line change
@@ -676,7 +676,7 @@ Its value is initially « ».
676676
This function returns the result of the following algorithm:
677677

678678
1. Set |localName| to |tagName| in [=ASCII lowercase=].
679-
1. If |elementNs| is an empty string, set |elementNs| to [=HTML namespace=].
679+
1. If |elementNs| is null or an empty string, set |elementNs| to [=HTML namespace=].
680680
1. Let |interface| be the [=element interface=] for |localName| and |elementNs|.
681681
1. Let |expectedType| be null.
682682
1. Find the row in the following table, where the first column is "*" or |interface|'s name, and |property| is in the second column.
@@ -714,7 +714,7 @@ Its value is initially « ».
714714

715715
1. Set |localName| to |tagName| in [=ASCII lowercase=].
716716
1. Set |attribute| to |attribute| in [=ASCII lowercase=].
717-
1. If |elementNs| is an empty string, set |elementNs| to [=HTML namespace=].
717+
1. If |elementNs| is null or an empty string, set |elementNs| to [=HTML namespace=].
718718
1. If |attrNs| is an empty string, set |attrNs| to null.
719719
1. Let |interface| be the [=element interface=] for |localName| and |elementNs|.
720720
1. Let |expectedType| be null.

0 commit comments

Comments
 (0)