From 5222f6e9daa4cb74b404f769b23510b3d600efd9 Mon Sep 17 00:00:00 2001 From: Gaming4JC Date: Thu, 2 Jan 2020 21:25:47 -0500 Subject: Bug 1274159 - Part 2-2: Support HTMLConstructor WebIDL extended attribute for custom elements; Tag UXP Issue #1344 --- dom/base/CustomElementRegistry.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'dom/base/CustomElementRegistry.h') diff --git a/dom/base/CustomElementRegistry.h b/dom/base/CustomElementRegistry.h index 9034dd7ea..8ef0785af 100644 --- a/dom/base/CustomElementRegistry.h +++ b/dom/base/CustomElementRegistry.h @@ -128,6 +128,10 @@ struct CustomElementDefinition // The document custom element order. uint32_t mDocOrder; + + bool IsCustomBuiltIn() { + return mType != mLocalName; + } }; class CustomElementRegistry final : public nsISupports, @@ -155,6 +159,9 @@ public: CustomElementDefinition* LookupCustomElementDefinition( const nsAString& aLocalName, const nsAString* aIs = nullptr) const; + CustomElementDefinition* LookupCustomElementDefinition( + JSContext* aCx, JSObject *aConstructor) const; + /** * Enqueue created callback or register upgrade candidate for * newly created custom elements, possibly extending an existing type. -- cgit v1.2.3