Closed
Bug 1430034
Opened 7 years ago
Closed 7 years ago
PolymerElements/iron-ajax demo page is missing contents when Custom Elements are enabled
Categories
(Core :: DOM: Core & HTML, defect, P2)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla59
Tracking | Status | |
---|---|---|
firefox59 | --- | fixed |
People
(Reporter: edgar, Assigned: edgar)
References
()
Details
Attachments
(1 file, 1 obsolete file)
While debugging bug 1429967, I found the PolymerElements iron-ajax [1] does not work well with our native CE implementation. STR: 1) Set dom.webcomponents.customelements.enabled to true 2) Load the demo page: https://raw-dot-custom-elements.appspot.com/PolymerElements/iron-ajax/v2.0.8/iron-ajax/demo/index.html Expected result: Video contents under "Video Feed" Actual result: No contents under "Video Feed" [1] https://www.webcomponents.org/element/PolymerElements/iron-ajax
Assignee | ||
Comment 1•7 years ago
|
||
The demo page will send the search request to Youtube and display the search result. But it looks like the search request isn't send [1] when Custom Elements are enabled. Need to do more investigating, ni myself. [1] DevTool/Network doesn't show the search request.
Flags: needinfo?(echen)
Assignee | ||
Comment 2•7 years ago
|
||
In the demo page, the iron-ajax has "auto" attribute set to empty string, it should send request automatically via creating an iron-request [1]. But I didn't see an iron-request being created when Custom Elements are enabled. After I do "document.getElementsByTagName("iron-ajax")[0].setAttribute("auto", "a");" in web console, the request is performed and the contents is showing as expected. So I suspect the attributeChangedCallback isn't fired correctly in some circumstances... [1] iron-request is used to perform XMLHttpRequests.
Assignee: nobody → echen
Flags: needinfo?(echen)
Assignee | ||
Comment 3•7 years ago
|
||
Okay, I found the root cause, the attributeChangedCallback from upgrade steps isn't fired correctly when the attribute value is empty string, it will fire callback with null as newValue, see https://software.hixie.ch/utilities/js/live-dom-viewer/?saved=5692. And for the demo page case, the iron-ajax's "auto" attribute is set to empty string, the attributeChangedCallback for auto attribute is fired with null as both oldValue and newValue, and the Polymer will ignore the callback since it thinks the attribute value is changed.
Assignee | ||
Comment 4•7 years ago
|
||
(In reply to Edgar Chen [:edgar] from comment #3) > Okay, I found the root cause, the attributeChangedCallback from upgrade > steps isn't fired correctly when the attribute value is empty string, it > will fire callback with null as newValue, see > https://software.hixie.ch/utilities/js/live-dom-viewer/?saved=5692. > > And for the demo page case, the iron-ajax's "auto" attribute is set to empty > string, the attributeChangedCallback for auto attribute is fired with null > as both oldValue and newValue, and the Polymer will ignore the callback > since it thinks the attribute value is changed. ^^ isn't
Assignee | ||
Comment 5•7 years ago
|
||
Quick fix, tests are coming soon.
Comment 6•7 years ago
|
||
Oops, sorry, my bad :(
Comment hidden (mozreview-request) |
Assignee | ||
Updated•7 years ago
|
Attachment #8942559 -
Attachment is obsolete: true
Assignee | ||
Updated•7 years ago
|
Attachment #8942601 -
Flags: feedback?(jdai)
Assignee | ||
Comment 8•7 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=964a2e4a133c1938ac80ad9612b3f070479c8985&group_state=expanded&filter-tier=1
Updated•7 years ago
|
Attachment #8942601 -
Flags: feedback?(jdai) → feedback+
Assignee | ||
Updated•7 years ago
|
Attachment #8942601 -
Flags: review?(bugs)
Comment 9•7 years ago
|
||
mozreview-review |
Comment on attachment 8942601 [details] Bug 1430034 - Fix attributeChangedCallback isn't fired with correct newValue when the attribute value is an empty string; https://reviewboard.mozilla.org/r/212870/#review219244
Attachment #8942601 -
Flags: review?(bugs) → review+
Comment 10•7 years ago
|
||
Pushed by echen@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/ec468ee9dfc6 Fix attributeChangedCallback isn't fired with correct newValue when the attribute value is an empty string; r=smaug
Comment 11•7 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/ec468ee9dfc6
Status: NEW → RESOLVED
Closed: 7 years ago
status-firefox59:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla59
You need to log in
before you can comment on or make changes to this bug.
Description
•