CodeQL library for JavaScript/TypeScript
codeql/javascript-all 1.1.3 (changelog, source)
Search

Module DOM

Provides predicates for reasoning about DOM types and methods.

Import path

import semmle.javascript.security.dataflow.DOM

Imports

javascript

Provides classes for working with JavaScript programs, as well as JSON, YAML and HTML.

Predicates

isDomNode

Holds if e could hold a value that comes from the DOM.

isDomRootType

Holds if tp is one of the roots of the DOM type hierarchy.

isLocationNode

Holds if e could refer to the location property of a DOM node.

Classes

DomGlobalVariable

A global variable whose declared type extends a DOM root type.

DomMethodCallNode

A call to a DOM method.

DomPropertyWrite

An assignment to a property of a DOM object.

PostMessageEventHandler

An event handler that handles postMessage events.

WebStorageWrite

A value written to web storage, like localStorage or sessionStorage.