Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add brand checks (for known types only I guess) to tryImplForWrapper #17

Closed
domenic opened this issue Jan 5, 2016 · 1 comment
Closed

Comments

@domenic
Copy link
Member

domenic commented Jan 5, 2016

For example the first lines of the impl for Node.prototype.insertBefore are currently

  insertBefore(newChildImpl, refChildImpl) {
    // TODO branding
    if (!newChildImpl || !(newChildImpl instanceof NodeImpl)) {
      throw new TypeError("First argument to Node.prototype.insertBefore must be a Node");
    }
    if (refChildImpl !== null && !(refChildImpl instanceof NodeImpl)) {
      throw new TypeError("Second argument to Node.prototype.insertBefore must be a Node or null or undefined");
    }

This should not be necessary; webidl2js should generate the type-checks against Node for the first and Node? for the second.

@TimothyGu
Copy link
Member

This should have been fixed in #33.

@domenic domenic closed this as completed May 16, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants