-
Notifications
You must be signed in to change notification settings - Fork 26.8k
fix(language-service): provide dom event completions #43299
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
Conversation
0728079 to
f13357a
Compare
IgorMinar
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. As far as I can tell this doesn't change the security properties of the schema validation, so I'm ok with not blocking this on the ISE review, but I do want to give them a heads up.
@bjarkler - fyi: we are making a change to the DOM security schema that looks a bit dangerous on the surface, but in reality it doesn't change anything significant, and doesn't have any security impact.
Reviewed-for: fw-security
|
My only security concern is that the current change makes it a little bit easier for a future change to expose the event properties by accident. You could fix that by moving the events into a separate event schema table so that you wouldn't have to apply the current filtering in all the other getters. But in any case, this LGTM. |
jelbourn
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
jelbourn
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Reviewed-for: fw-security
Native DOM events were previously not included in the completions because the dom schema registry would filter out events completely. This change updates the registry to include events in the private element->property map and excludes events from lookups outside of the new `allKnownEventsOfElement` function. fixes angular/vscode-ng-language-service#1479
2d7a809 to
dd1bc80
Compare
|
merge assistance: All required reviews are approved. Pullapprove seems a bit stuck |
Native DOM events were previously not included in the completions because the dom schema registry would filter out events completely. This change updates the registry to include events in the private element->property map and excludes events from lookups outside of the new `allKnownEventsOfElement` function. fixes angular/vscode-ng-language-service#1479 PR Close #43299
This reverts commit c8f8d7d. This commit breaks in IE11, which is still supported by v12, likely due to the usage of `Array.from()`.
|
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Native DOM events were previously not included in the completions in Ivy
because the dom schema registry would filter out events completely. This
change updates the registry to include events in the private
element->property map and excludes events from lookups outside of the
new
allKnownEventsOfElementfunction.fixes angular/vscode-ng-language-service#1479
Reviewer notes: Autocompletion in the VE language service did include native events so this addresses a regression from previous behavior.
angular/packages/language-service/src/completions.ts
Lines 253 to 255 in faf9f5a
angular/packages/language-service/src/html_info.ts
Lines 449 to 451 in faf9f5a
angular/packages/language-service/src/html_info.ts
Lines 424 to 427 in faf9f5a