Re: [custom-elements-tests] Custom Elements: Element definition (#2940)

> This is pretty hard to test without first failing the IsConstructor check. I think the following will work:

This will work and is simpler:

```js
const BadConstructor = (function () { }).bind({});
Object.defineProperty(BadConstructor, "prototype", {
  get() {
    const e = new Error("should be rethrown");
    e.name = "rethrown";
    throw e;
  }
});
```

It might also be good to check that `const f = (function () { }).bind({})` throws an exception per step 11 since its `.prototype` is undefined.

View on GitHub: https://github.com/w3c/web-platform-tests/pull/2940#issuecomment-216587449

Received on Tuesday, 3 May 2016 16:36:01 UTC