mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-04 23:08:39 +09:00
Bug 1274159 - Part 2-2: Support HTMLConstructor WebIDL extended attribute for custom elements;
Tag UXP Issue #1344
This commit is contained in:
parent
64e957cc9b
commit
ed08e1aced
12 changed files with 534 additions and 30 deletions
|
|
@ -273,6 +273,23 @@ CustomElementRegistry::LookupCustomElementDefinition(const nsAString& aLocalName
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
CustomElementDefinition*
|
||||
CustomElementRegistry::LookupCustomElementDefinition(JSContext* aCx,
|
||||
JSObject* aConstructor) const
|
||||
{
|
||||
JS::Rooted<JSObject*> constructor(aCx, js::CheckedUnwrap(aConstructor));
|
||||
|
||||
const auto& ptr = mConstructors.lookup(constructor);
|
||||
if (!ptr) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
CustomElementDefinition* definition = mCustomDefinitions.Get(ptr->value());
|
||||
MOZ_ASSERT(definition, "Definition must be found in mCustomDefinitions");
|
||||
|
||||
return definition;
|
||||
}
|
||||
|
||||
void
|
||||
CustomElementRegistry::RegisterUnresolvedElement(Element* aElement, nsIAtom* aTypeName)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue