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

Support partial dictionaries #10159

Conversation

lukebjerring
Copy link
Contributor

@lukebjerring lukebjerring commented Mar 23, 2018

Fixes #5714


This change is Reviewable

@w3c-bots
Copy link

w3c-bots commented Mar 23, 2018

Build PASSED

Started: 2018-03-28 20:48:23
Finished: 2018-03-28 21:00:54

View more information about this build on:

idlArray.test();
} catch (e) {
return;
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

try/catch code-smell covered by #10162

Copy link
Member

@foolip foolip left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Added test coverage is great :)

@@ -257,7 +257,8 @@ IdlArray.prototype.internal_add_idls = function(parsed_idls, options)

parsed_idls.forEach(function(parsed_idl)
{
if (parsed_idl.type == "interface" && parsed_idl.partial)
if (parsed_idl.partial
&& ["interface", "dictionary"].find(t => parsed_idl.type == t))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Optional simplification: ["interface", "dictionary"].includes(parsed_idl.type) would do the trick here too.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lol. tried 'contains' and fell back to something I knew. Changed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants