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

Class Templating::TemplatePlaceholderTag

A placeholder tag for a templating engine.

Import path

import javascript

Direct supertypes

Indirect supertypes

Known direct subtypes

Predicates

asDataFlowNode

Gets a data flow node representing the value plugged into this placeholder.

getEnclosingExpr

Gets the innermost JavaScript expression containing this template tag, if any.

getInnerTopLevel

Gets the top-level containing the template expression to be inserted at this placeholder.

getParent

Gets the enclosing HTML element, attribute, or file.

getRawText

Gets the full text of the template tag, including delimiters.

isEscapingInterpolation

Holds if this performs HTML escaping on the result before inserting it in the template.

isInCodeAttribute

Holds if this occurs in an attribute value that is interepted as JavaScript.

isInCodeContext

Holds if this placeholder occurs in JS code.

isInNestedTemplateContext

Holds if this placeholder occurs in the definition of another template, which means the output is susceptible to code injection.

isInScriptTag

Holds if this occurs in a script tag.

isRawInterpolation

Holds if this performs raw interpolation, that is, inserts its result in the output without escaping it.

toString

Gets a textual representation of this element.

Inherited predicates

getAPrimaryQlClass

Gets the primary QL class for the Locatable.

from Locatable
getEndLine

Gets the line on which this element ends.

from Locatable
getFile

Gets the file this program element comes from.

from Locatable
getLocation

Gets this element’s location.

from Locatable
getNumLines

Gets the number of lines covered by this element.

from Locatable
getPrimaryQlClasses

Gets a comma-separated list of the names of the primary CodeQL classes to which this element belongs.

from Locatable
getStartLine

Gets the line on which this element starts.

from Locatable