mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-19 23:07:33 +09:00
Bug 1315885 - Part 4: Implement callback reaction for custom element reactions.
Note: Skipped SyncInvokeReactions since it is removed in CE v1, waste of time. Tag UXP Issue #1344
This commit is contained in:
parent
931b14f847
commit
34dd7065f5
5 changed files with 101 additions and 138 deletions
|
|
@ -28,7 +28,8 @@ function testChangeAttributeInCreatedCallback() {
|
|||
createdCallbackCalled = true;
|
||||
is(attributeChangedCallbackCalled, false, "Attribute changed callback should not have been called prior to setting the attribute.");
|
||||
this.setAttribute("foo", "bar");
|
||||
is(attributeChangedCallbackCalled, false, "While element is being created, element should not be added to the current element callback queue.");
|
||||
is(attributeChangedCallbackCalled, true, "While element is being created, element should be added to the current element callback queue.");
|
||||
runNextTest();
|
||||
};
|
||||
|
||||
p.attributeChangedCallback = function(name, oldValue, newValue) {
|
||||
|
|
@ -36,7 +37,6 @@ function testChangeAttributeInCreatedCallback() {
|
|||
is(attributeChangedCallbackCalled, false, "attributeChanged callback should only be called once in this tests.");
|
||||
is(newValue, "bar", "The new value should be 'bar'");
|
||||
attributeChangedCallbackCalled = true;
|
||||
runNextTest();
|
||||
};
|
||||
|
||||
document.registerElement("x-one", { prototype: p });
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue