TL;DR To ajaxify pp.org, I've been trying to test custom elements in an XHR'd document (e.g. xhr.responseType='document'). The elements don't pick up their element definitions from the main document. Why? ---
I threw together http://jsbin.com/gaquyeha/1/edit to test when/where custom elements are registered *and* upgraded. Some of the results are surprising and I'm hoping someone can shed light. I also might be in crazy town. View of the console from http://jsbin.com/gaquyeha/1/edit. TEST 1:<polymer-ajax> declared in main document runner-3.11.7.min.js:1 ✔ not an HTMLUnknownElement runner-3.11.7.min.js:1 ✔ go() is defined runner-3.11.7.min.js:1 TEST 2: <polymer-ajax> in a <template> in the main document runner-3.11.7.min.js:1 ✔ not an HTMLUnknownElement runner-3.11.7.min.js:1 ✘ go() is defined runner-3.11.7.min.js:1 TEST 3: <polymer-ajax> in a newly created document runner-3.11.7.min.js:1 ✔ not an HTMLUnknownElement runner-3.11.7.min.js:1 ✔ go() is defined runner-3.11.7.min.js:1 TEST 4: <polymer-ajax> in an XHR'd document runner-3.11.7.min.js:1 ✘ not an HTMLUnknownElement runner-3.11.7.min.js:1 ✘ go() is defined runner-3.11.7.min.js:1 TEST 1: Expected. TEST 2: according to Dominic<http://www.polymer-project.org/discuss.html?place=msg%2Fpolymer-dev%2Fqkl8l3c_SUU%2FGBPs9uOEIk4J>, custom elements in <template> are inert and don't pick up the definitions in the main document. These results indicate polymer-ajax gets registered but isn't upgraded. *Why*? TEST 3: Expected. TEST 4: an XHR'd document (e.g. xhr.responseType='document') doesn't pick up the definitions and the elements are not upgraded. *Why*? Thanks, Eric Follow Polymer on Google+: plus.google.com/107187849809354688692 --- You received this message because you are subscribed to the Google Groups "Polymer" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/polymer-dev/CACGqRCAyvD58tc_R15xGfAgr2MZPCHSYhcTaZYW1aFx36E-VhA%40mail.gmail.com. For more options, visit https://groups.google.com/groups/opt_out.
