<html>
<head>
<base href="https://bugs.webkit.org/" />
</head>
<body><span class="vcard"><a class="email" href="mailto:joe@trusktr.io" title="Joe Pea <joe@trusktr.io>"> <span class="fn">Joe Pea</span></a>
</span> changed
<a class="bz_bug_link
bz_status_NEW "
title="NEW - typeof Node should be function"
href="https://bugs.webkit.org/show_bug.cgi?id=74193">bug 74193</a>
<br>
<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>What</th>
<th>Removed</th>
<th>Added</th>
</tr>
<tr>
<td style="text-align:right;">CC</td>
<td>
</td>
<td>joe@trusktr.io
</td>
</tr></table>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - typeof Node should be function"
href="https://bugs.webkit.org/show_bug.cgi?id=74193#c3">Comment # 3</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - typeof Node should be function"
href="https://bugs.webkit.org/show_bug.cgi?id=74193">bug 74193</a>
from <span class="vcard"><a class="email" href="mailto:joe@trusktr.io" title="Joe Pea <joe@trusktr.io>"> <span class="fn">Joe Pea</span></a>
</span></b>
<pre>Can you guys please fix this? The reason for following the spec in such a way doesn't outweight the benefit of being able extend from HTMLElement, especially when using the new Custom Element API.
After applying a `document.registerElement` polyfill in Safari, this is what we have to do in order to make a Custom Element that extends from HTMLElement using ES6 classes:
```js
import 'document-register-element' // polyfill
// hack for Safari.
if (typeof window.HTMLElement != 'function') {
const _HTMLElement = function HTMLElement(){}
_HTMLElement.prototype = window.HTMLElement.prototype
window.HTMLElement = _HTMLElement
}
class MyElement extends window.HTMLElement {
createdCallback() { ... }
attachedCallback() { ... }
detachedCallback() { ... }
attributeChangedCallback(attribute, oldValue, newValue) { ... }
}
MyElement = document.registerElement('motor-node', MyElement)
export default MyElement
```
I think it's time to fix this and get Custom Elements working, and in general to be compatible with ES6 classes.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>