CodeQL library for Go
codeql/go-all 0.7.15-dev (changelog, source)
Search

Class HTML::Element

An HTML element.

Example:

<a href="semmle.com">Semmle</a>

Import path

import semmle.go.HTML

Direct supertypes

Indirect supertypes

Known direct subtypes

Predicates

getAnAttribute

Gets an attribute of this element.

getAttribute

Gets the ith attribute (0-based) of this element.

getAttributeByName

Gets an attribute of this element that has the given name.

getChild

Gets a child element of this element.

getChild

Gets the ith child element (0-based) of this element.

getDocument

Gets the root HTML document element in which this element is contained.

getName

Gets the name of this HTML element.

getParent

Gets the parent element of this element, if any.

getRoot

Gets the root element in which this element is contained.

getTextNode

Gets the text node associated with this element.

isTopLevel

Holds if this is a toplevel element, that is, if it does not have a parent element.

toString

Gets a textual representation of this element.

Inherited predicates

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
hasLocationInfo

Holds if this element is at the specified location. The location spans column startcolumn of line startline to column endcolumn of line endline in file filepath. For more information, see Locations.

from Locatable

Charpred