trait Element extends AnyRef
A representation of a HTML DOM element.
Elements can be obtained by obtaining Document instances (for example, through a net.ruippeixotog.scalascraper.browser.Browser) and using one of its several methods. They provide several methods for traversing and retrieving infomation from the DOM of the page in which they are.
- Alphabetic
- By Inheritance
- Element
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Type Members
Abstract Value Members
- abstract def attr(name: String): String
Returns the value associated with an attribute of this element.
Returns the value associated with an attribute of this element.
- name
the name of the attribute
- returns
the value associated with the given attribute.
- abstract def attrs: Map[String, String]
The map of attributes of this element.
- abstract def childNodes: Iterable[Node]
The list of child nodes of this element.
- abstract def children: Iterable[ThisType]
The list of children of this element.
- abstract def hasAttr(name: String): Boolean
Checks if an attribute is defined in this element.
Checks if an attribute is defined in this element.
- name
the name of the attribute
- returns
trueif the attribute is defined,falseotherwise
- abstract def innerHtml: String
The HTML representation of the content inside this element as a string.
- abstract def outerHtml: String
The HTML representation of this element as a string.
- abstract def ownText: String
The text content owned by this element only, i.e.
The text content owned by this element only, i.e. without text inside children.
- abstract def parent: Option[ThisType]
The element of this element.
- abstract def select(query: String): ElementQuery[ThisType]
Executes a query on this element using a CSS selector.
Executes a query on this element using a CSS selector.
- query
the CSS selector used to select elements to be returned
- returns
an
ElementQueryinstance representing the sequence of resulting elements
- abstract def siblingNodes: Iterable[Node]
The list of sibling nodes of this element.
- abstract def siblings: Iterable[ThisType]
The list of siblings of this element.
- abstract def tagName: String
The tag name of this element.
- abstract def text: String
The text content inside this element and any child nodes.
Concrete Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @HotSpotIntrinsicCandidate() @native()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @HotSpotIntrinsicCandidate() @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @HotSpotIntrinsicCandidate() @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @HotSpotIntrinsicCandidate() @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @HotSpotIntrinsicCandidate() @native()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated
(Since version 9)