mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-08 16:58:38 +09:00
Bug 1309147 - Part 4: Add CEReactions for CustomElementRegistry.
Tag UXP Issue #1344
This commit is contained in:
parent
303037d0fc
commit
cc71e21e02
3 changed files with 2 additions and 10 deletions
|
|
@ -547,15 +547,6 @@ CustomElementRegistry::Define(const nsAString& aName,
|
|||
const ElementDefinitionOptions& aOptions,
|
||||
ErrorResult& aRv)
|
||||
{
|
||||
// We do this for [CEReaction] temporarily and it will be removed
|
||||
// after webidl supports [CEReaction] annotation in bug 1309147.
|
||||
DocGroup* docGroup = mWindow->GetDocGroup();
|
||||
if (!docGroup) {
|
||||
aRv.Throw(NS_ERROR_UNEXPECTED);
|
||||
return;
|
||||
}
|
||||
|
||||
AutoCEReaction ceReaction(docGroup->CustomElementReactionsStack());
|
||||
aRv.MightThrowJSException();
|
||||
|
||||
AutoJSAPI jsapi;
|
||||
|
|
|
|||
|
|
@ -5770,6 +5770,7 @@ nsDocument::RegisterElement(JSContext* aCx, const nsAString& aType,
|
|||
return;
|
||||
}
|
||||
|
||||
AutoCEReaction ceReaction(this->GetDocGroup()->CustomElementReactionsStack());
|
||||
// Unconditionally convert TYPE to lowercase.
|
||||
nsAutoString lcType;
|
||||
nsContentUtils::ASCIIToLower(aType, lcType);
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
// https://html.spec.whatwg.org/#dom-window-customelements
|
||||
[Func="CustomElementRegistry::IsCustomElementEnabled"]
|
||||
interface CustomElementRegistry {
|
||||
[Throws]
|
||||
[CEReactions, Throws]
|
||||
void define(DOMString name, Function functionConstructor,
|
||||
optional ElementDefinitionOptions options);
|
||||
any get(DOMString name);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue