mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-17 10:50:06 -04:00
feat(ecma): add innerHTML injection
This commit is contained in:
parent
ad8798795c
commit
248a87ef65
1 changed files with 15 additions and 0 deletions
|
|
@ -67,3 +67,18 @@
|
||||||
|
|
||||||
(((template_string) @_template_string
|
(((template_string) @_template_string
|
||||||
(#match? @_template_string "^`#graphql")) @graphql)
|
(#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))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue