Skip to main content
Skip table of contents

HtmlFragment

Methods

Name

Type

Description

$fragment.asHref

String

The 'href' attribute of the first <a> tag in this fragment or an empty string if there is none.

$fragment.asHtml

String

The HTML code of this fragment.

$fragment.asImgSrc

String

The 'src' attribute of the first <img> tag in this fragment or an empty string if there is none.

$fragment.asList

List<HtmlFragment>

A list of fragments, one for each element in the list contained in this fragment, or an empty list if the fragment contains no list. Multiple or nested lists are not supported.

$fragment.asText

String

Just the textual part of the fragment, without any markup.


JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.