mirror of
https://github.com/github/codeql.git
synced 2026-05-03 20:58:03 +02:00
JS: Use more types in DOM model
This commit is contained in:
@@ -347,7 +347,11 @@ module DOM {
|
||||
}
|
||||
|
||||
/** Gets a data flow node that may refer to a value from the DOM. */
|
||||
DataFlow::SourceNode domValueRef() { result = domValueRef(DataFlow::TypeTracker::end()) }
|
||||
DataFlow::SourceNode domValueRef() {
|
||||
result = domValueRef(DataFlow::TypeTracker::end())
|
||||
or
|
||||
result.hasUnderlyingType("Element")
|
||||
}
|
||||
|
||||
module LocationSource {
|
||||
/**
|
||||
@@ -419,5 +423,9 @@ module DOM {
|
||||
/**
|
||||
* Gets a reference to the 'document' object.
|
||||
*/
|
||||
DataFlow::SourceNode documentRef() { result = documentRef(DataFlow::TypeTracker::end()) }
|
||||
DataFlow::SourceNode documentRef() {
|
||||
result = documentRef(DataFlow::TypeTracker::end())
|
||||
or
|
||||
result.hasUnderlyingType("Document")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user