<html>
<head>
<base href="https://bugs.webkit.org/" />
</head>
<body><span class="vcard"><a class="email" href="mailto:richardconnamacher@gmail.com" title="Richard Connamacher <richardconnamacher@gmail.com>"> <span class="fn">Richard Connamacher</span></a>
</span> changed
<a class="bz_bug_link
bz_status_NEW "
title="NEW - ES6 classes: Subclassing arrays doesn't work"
href="https://bugs.webkit.org/show_bug.cgi?id=145155">bug 145155</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>richardconnamacher@gmail.com
</td>
</tr></table>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - ES6 classes: Subclassing arrays doesn't work"
href="https://bugs.webkit.org/show_bug.cgi?id=145155#c1">Comment # 1</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - ES6 classes: Subclassing arrays doesn't work"
href="https://bugs.webkit.org/show_bug.cgi?id=145155">bug 145155</a>
from <span class="vcard"><a class="email" href="mailto:richardconnamacher@gmail.com" title="Richard Connamacher <richardconnamacher@gmail.com>"> <span class="fn">Richard Connamacher</span></a>
</span></b>
<pre>WebKit isn't setting the right prototype chain when instantiating an Array subclass. Because of this, the following workaround restores the correct behavior in the WebKit nightly:
var MyArray = class MyArray extends Array {
constructor() {
super(...arguments);
Object.setPrototypeOf(this, new.target.prototype);
}
myMethod() {}
};</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>