summaryrefslogtreecommitdiffstats
path: root/dom/bindings/Codegen.py
diff options
context:
space:
mode:
Diffstat (limited to 'dom/bindings/Codegen.py')
-rw-r--r--dom/bindings/Codegen.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/dom/bindings/Codegen.py b/dom/bindings/Codegen.py
index 6fd15ac90..5bbf77bb6 100644
--- a/dom/bindings/Codegen.py
+++ b/dom/bindings/Codegen.py
@@ -7672,6 +7672,17 @@ class CGPerSignatureCall(CGThing):
CGIfWrapper(CGList(xraySteps),
"objIsXray"))
+ if (idlNode.getExtendedAttribute('CEReactions') is not None and
+ not getter):
+ cgThings.append(CGGeneric(fill(
+ """
+ CustomElementReactionsStack* reactionsStack = GetCustomElementReactionsStack(${obj});
+ Maybe<AutoCEReaction> ceReaction;
+ if (reactionsStack) {
+ ceReaction.emplace(reactionsStack);
+ }
+ """, obj=objectName)))
+
# If this is a method that was generated by a maplike/setlike
# interface, use the maplike/setlike generator to fill in the body.
# Otherwise, use CGCallGenerator to call the native method.
@@ -13840,12 +13851,18 @@ class CGBindingRoot(CGThing):
iface = desc.interface
return any(m.getExtendedAttribute("Deprecated") for m in iface.members + [iface])
+ def descriptorHasCEReactions(desc):
+ iface = desc.interface
+ return any(m.getExtendedAttribute("CEReactions") for m in iface.members + [iface])
+
bindingHeaders["nsIDocument.h"] = any(
descriptorDeprecated(d) for d in descriptors)
bindingHeaders["mozilla/Preferences.h"] = any(
descriptorRequiresPreferences(d) for d in descriptors)
bindingHeaders["mozilla/dom/DOMJSProxyHandler.h"] = any(
d.concrete and d.proxy for d in descriptors)
+ bindingHeaders["mozilla/dom/CustomElementRegistry.h"] = any(
+ descriptorHasCEReactions(d) for d in descriptors)
def descriptorHasChromeOnly(desc):
ctor = desc.interface.ctor()