Bug 1430034 - Fix attributeChangedCallback isn't fired with correct newValue when the attribute value is an empty string;

Tag UXP Issue #1344
This commit is contained in:
Gaming4JC 2020-01-25 09:05:21 -05:00 committed by Roy Tam
commit 2cdd48f819
2 changed files with 32 additions and 1 deletions

View file

@ -909,7 +909,7 @@ CustomElementRegistry::Upgrade(Element* aElement,
LifecycleCallbackArgs args = {
nsDependentAtomString(attrName),
NullString(),
(attrValue.IsEmpty() ? NullString() : attrValue),
attrValue,
(namespaceURI.IsEmpty() ? NullString() : namespaceURI)
};
nsContentUtils::EnqueueLifecycleCallback(nsIDocument::eAttributeChanged,