mirror of
https://github.com/github/codeql.git
synced 2025-12-17 17:23:36 +01:00
The two files moved in this commit are referenced from the javascript/lib qlpack, but they are located in the javascript/src qlpack. This causes compile errors when running compile-ish commands for javascript queries. Moving the files fixes it.
19 lines
545 B
Plaintext
19 lines
545 B
Plaintext
/**
|
|
* Provides predicates for working with the DOM type hierarchy.
|
|
*/
|
|
|
|
import semmle.javascript.Externs
|
|
|
|
/** Holds if `et` is a root interface of the DOM type hierarchy. */
|
|
predicate isDOMRootType(ExternalType et) {
|
|
exists(string n | n = et.getName() | n = "EventTarget" or n = "StyleSheet")
|
|
}
|
|
|
|
/** Holds if `p` is declared as a property of a DOM class or interface. */
|
|
pragma[nomagic]
|
|
predicate isDOMProperty(string p) {
|
|
exists(ExternalMemberDecl emd | emd.getName() = p |
|
|
isDOMRootType(emd.getDeclaringType().getASupertype*())
|
|
)
|
|
}
|