Crash when using custom element inside of another custom element




5 years ago
11 months ago


(Reporter: jlal, Unassigned)


(Blocks: 1 bug)

Firefox Tracking Flags

(Not tracked)




5 years ago
STR (sitting across from wchen now but here for record keeping):

Use my gaia branch:

Open gaia/shared/elements/gaia_grid/examples/index.html (relative to to the gaia checkout)

Click the "Another Webapp" icon

<crash should happen>

Comment 1

5 years ago
Using .createElement for the additional custom element seems to cause the crash using innerHTML on another element (that is not in the dom) seems to help:

      var wrapper = document.createElement('div');
      wrapper.innerHTML =
          '<gaia-confirm id="confirm-message">' +
            '<h1 id="confirmation-message-title"></h1>' +
            '<p id="confirmation-message-body"></p>' +
            '<gaia-buttons skin="dark">' +
              '<button class="cancel" id="confirmation-message-cancel" type="button"></button>' +
              '<button class="confirm" id="confirmation-message-ok" type="button"></button>' +
            '</gaia-buttons>' +

      var element = wrapper.firstElementChild;

My work around

Comment 2

4 years ago
I can't reproduce this based on the checkout, your branch and dom.webcomponents.enabled set to true using 37.0a2 (2015-01-24). 

I'm not sure the page is running correctly, however. The "A Webapp" and "Another Webapp" are large white rectangles and clicking on "Another Webapp" does nothing except print "show cancel~>~>~" to the console.

Although there's no crash, I suspect something isn't working correctly, nonetheless. 

(Incidentally, I've had experiences with the browser version above not showing web components within web components and crashing on complex apps, too. But this is with apps built with Polymer and the missing inner web components and crashes only occur when the above config is set to true.)

Comment 3

11 months ago
no proper testcase -> INCOMPLETE
Last Resolved: 11 months ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.