feat(ecma): add innerHTML injection

This commit is contained in:
Benny Powers 2022-10-13 18:04:04 +03:00 committed by Amaan Qureshi
parent ad8798795c
commit 248a87ef65

View file

@ -67,3 +67,18 @@
(((template_string) @_template_string
(#match? @_template_string "^`#graphql")) @graphql)
; el.innerHTML = `<html>`
(assignment_expression
left: (member_expression
property: (property_identifier) @_prop
(#eq? @_prop "innerHTML"))
right: (template_string) @html
(#offset! @html 0 1 0 -1))
; el.innerHTML = '<html>'
(assignment_expression
left: (member_expression
property: (property_identifier) @_prop
(#eq? @_prop "innerHTML"))
right: (string) @html
(#offset! @html 0 1 0 -1))