You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// 1. If namespace is not the HTML namespace, return null.
3159
+
// 1. If namespace is not the HTML namespace, then return null.
3160
3160
if (namespace_ != Namespace::HTML)
3161
3161
returnnullptr;
3162
3162
3163
-
// 2. If document's browsing context is null, return null.
3163
+
// 2. If document's browsing context is null, then return null.
3164
3164
if (!browsing_context())
3165
3165
returnnullptr;
3166
3166
3167
-
// 3. Let registry be document's relevant global object's CustomElementRegistry object.
3167
+
// 3. Let registry be document's relevant global object's custom element registry.
3168
3168
auto registry = verify_cast<HTML::Window>(relevant_global_object(*this)).custom_elements();
3169
3169
3170
-
// 4. If there is custom element definition in registry with name and local name both equal to localName, return that custom element definition.
3171
-
auto converted_local_name = local_name;
3172
-
auto maybe_definition = registry->get_definition_with_name_and_local_name(converted_local_name.to_string(), converted_local_name.to_string());
3170
+
// 4. If registry's custom element definition set contains an item with name and local name both equal to localName, then return that item.
3171
+
auto converted_local_name = local_name.to_string();
3172
+
auto maybe_definition = registry->get_definition_with_name_and_local_name(converted_local_name, converted_local_name);
3173
3173
if (maybe_definition)
3174
3174
return maybe_definition;
3175
3175
3176
-
// 5. If there is a custom element definition in registry with name equal to is and local name equal to localName, return that custom element definition.
3176
+
// 5. If registry's custom element definition set contains an item with name equal to is and local name equal to localName, then return that item.
3177
3177
// 6. Return null.
3178
3178
3179
3179
// NOTE: If `is` has no value, it can never match as custom element definitions always have a name and localName (i.e. not stored as Optional<String>)
0 commit comments