ParentNode

@native @JSType
trait ParentNode extends Object

The ParentNode interface allows to traverse from an element to its children.

ParentNode is a raw interface and no object of this type can be created; it is implemented by Element, Document, and DocumentFragment objects.

class Object
trait Any
class Object
trait Matchable
class Any
class Document
class Element
class Image
class Audio

Value members

Concrete methods

Returns an unsigned long giving the amount of children that the object has.

Returns an unsigned long giving the amount of children that the object has.

Returns a live HTMLCollection containing all objects of type Element that are children of the object.

Returns a live HTMLCollection containing all objects of type Element that are children of the object.

Returns the Element that is the first child of the object, or null if there is none.

Returns the Element that is the first child of the object, or null if there is none.

Returns the Element that is the last child of the object, or null if there is none.

Returns the Element that is the last child of the object, or null if there is none.

def replaceChildren(nodes: Node | String*): Unit

Replaces the existing children of a Node with a specified new set of children.

Replaces the existing children of a Node with a specified new set of children.

Inherited methods

def hasOwnProperty(v: String): Boolean
Inherited from:
Object
def isPrototypeOf(v: Object): Boolean
Inherited from:
Object
def propertyIsEnumerable(v: String): Boolean
Inherited from:
Object
def toLocaleString(): String
Inherited from:
Object
def valueOf(): Any
Inherited from:
Object