I'm putting a custom element in a template and then "selecting" it out to Window level. It seem to loose its identity as a custom element.
```
// In page
<template id="holder">
<my-element field="A"></my-element>
</template>
<script type="module">
class MyElement extends HTMLElement {
constructor() {
super();
}
get Field() { return this.getAttribute("field");}
}
window.customElements.define("my-element", MyElement);
</script>
<script>
const frag = document.querySelector("#holder").content;
const el = frag.querySelector("my-element");
console.log({el});
</script>
```
When `<my-element>` is a page level and not in a template I can read `xxx.Field`. When it comes from within a template it seems to no longer act like the custom element - xxx.Field isn't defined. The script selecting it is at "Window" level, so shouldn't it "cast" correctly?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20190924/306599ee/attachment.html>
work at randybuchholz.com (2019-09-25T10:58:04.121Z)