Open duzy opened 3 years ago
Traceur transpiled code is looking like this:
var e,r=customElements,n=(e=HTMLElement,$traceurRuntime.createClass((function e(){$traceurRuntime.superConstructor(e).call(this),this.style="color: red;"}),{},{},e));
From:
class Foo extends HTMLElement { constructor() { super(); this.style = 'color: red;'; } };
And results:
Uncaught TypeError: Failed to construct 'HTMLElement': Please use the 'new' operator, this DOM object constructor cannot be called as a function.
Where this statement fails (the this object is a HTMLElement instance):
this
$traceurRuntime.superConstructor(e).call(this)
Traceur transpiled code is looking like this:
From:
And results:
Where this statement fails (the
this
object is a HTMLElement instance):