JS: Track DOM elements out of collections

This commit is contained in:
Asger F
2023-04-26 14:55:34 +02:00
parent 1f228a049f
commit cf1e87de9e
2 changed files with 4 additions and 0 deletions

View File

@@ -421,6 +421,9 @@ module DOM {
t.startInProp("target") and
result = domEventSource()
or
t.startInProp(DataFlow::PseudoProperties::arrayElement()) and
result = domElementCollection()
or
exists(DataFlow::TypeTracker t2 | result = domValueRef(t2).track(t2, t))
}

View File

@@ -23,5 +23,6 @@ test_domValueRef
| nameditems.js:1:1:2:19 | documen ... em('x') |
| querySelectorAll.js:2:5:2:29 | documen ... ctorAll |
| querySelectorAll.js:2:5:2:36 | documen ... ('foo') |
| querySelectorAll.js:2:46:2:48 | elm |
| tst.js:49:3:49:8 | window |
| tst.js:50:3:50:8 | window |