-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Closed
Description
Description:
If you use a template and inject offline AFrame components, these won't ever be initialized in the live DOM world once appended.
var scene = '<a-scene><a-box color="red" position="0 2 -5" rotation="0 45 45" scale="2 2 2"></a-box></a-scene>';
var template = document.createElement('template'); // use 'div' in Chrome
template.innerHTML = scene;
document.body.appendChild((template.content || template).firstElementChild);However, if you change template with div, as example, you'll see that once appended everything is fine.
This makes AFrame component not suitable for any library that creates them via modern template.
Please note this is a Chrome bug only, and I'm not sure if I can fix it via document-register-element polyfill because apparently you are using your own fork.
- A-Frame Version: 0.7.0
- Platform / Device: Chrome (V0 native)
- Reproducible Code Snippet or URL: https://codepen.io/WebReflection/pen/xXMxEO?editors=0010
Metadata
Metadata
Assignees
Labels
No labels