Skip to content

fix: prevent readwrite attributes on namespaces #165

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

Merged
merged 3 commits into from
May 23, 2018

Conversation

saschanaz
Copy link
Member

https://heycam.github.io/webidl/#index-prod-NamespaceMember

NamespaceMember ::
    RegularOperation
    readonly AttributeRest

A namespace attribute must be readonly, but currently readwrite attributes are allowed. This PR fixes it.

lib/webidl2.js Outdated
regular_operation() ||
error("Unknown member");
mem.extAttrs = ea;
ret.members.push(mem);
}
}

function noninherited_attribute(prefix) {
function noninherited_attribute({ readonly } = {}) {
Copy link
Member

Choose a reason for hiding this comment

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

maybe we should default readonly to false instead of undefined?

Copy link
Member

@marcoscaceres marcoscaceres left a comment

Choose a reason for hiding this comment

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

Small nit

@saschanaz saschanaz merged commit 7cd23cd into develop May 23, 2018
@saschanaz saschanaz deleted the namespace-readonly branch May 23, 2018 04:31
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

Successfully merging this pull request may close these issues.

2 participants