Custom Elements inside a <template> or <script type=x-template> tag should not be upgraded. There's no issue on Safari, Chrome, and FF, since querySelectorAll() on those platforms ignores the contents of <template> tags. But it's broken on IE10.
This presumably breaks liaison.
One possible approach would be to temporarily orphan the contents of <template> and <script type=x-template> tags while the parser is searching for elements to be upgraded. It would only need to be done for platforms where querySelectorAll() finds elements inside a <template> node (or equivalently, check if templateNode.firstElementChild is defined).
cc @asudoh
PS: I checked Polymer's behavior and surprisingly it has the same issue... even though it does a DFS to find elements, like dojo's parser, rather than using querySelectorAll(); I filed webcomponents/webcomponentsjs#302.
Custom Elements inside a
<template>
or<script type=x-template>
tag should not be upgraded. There's no issue on Safari, Chrome, and FF, sincequerySelectorAll()
on those platforms ignores the contents of<template>
tags. But it's broken on IE10.This presumably breaks liaison.
One possible approach would be to temporarily orphan the contents of
<template>
and<script type=x-template>
tags while the parser is searching for elements to be upgraded. It would only need to be done for platforms wherequerySelectorAll()
finds elements inside a<template>
node (or equivalently, check if templateNode.firstElementChild is defined).cc @asudoh
PS: I checked Polymer's behavior and surprisingly it has the same issue... even though it does a DFS to find elements, like dojo's parser, rather than using
querySelectorAll()
; I filed webcomponents/webcomponentsjs#302.