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

> Test something with a throwing prototype getter and make sure the exception is rethrown

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

```js
const BadConstructor = new Proxy(function () { }, {
  construct() {
    return {};
  },
  get(target, key) {
    if (key !== "prototype") {
      return;
    }

    const e = new Error("should be rethrown");
    e.name = "rethrown";
    throw e;
  }
});
```

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

Received on Tuesday, 3 May 2016 16:24:16 UTC