HTML-Object

 view release on metacpan or  search on metacpan

lib/HTML/Object/DOM/Element.pm  view on Meta::CPAN


=head2 draggable

A boolean value indicating if the element can be dragged.

See L<Mozilla documentation|https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/draggable> for more information.

=head2 enterKeyHint

A string defining what action label (or icon) to present for the enter key on virtual keyboards.

See L<Mozilla documentation|https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/enterKeyHint> for more information.

=head2 firstChild

Read-only

This returns an element representing the first direct child element of the element, or C<undef> if the element has no child.

=head2 firstElementChild

Read-only.

It returns the first child element of this element.

See L<for more information|https://developer.mozilla.org/en-US/docs/Web/API/Element/firstElementChild>

=head2 hidden

A string or boolean value reflecting the value of the element's hidden attribute.

See L<Mozilla documentation|https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/hidden> for more information.

=head2 id

Set or get an string representing the id of the element.

    # Set it as a regular method
    $e->id( 'hello' );
    # Set it as a lvalue method
    $e->id = 'hello';
    # Retrieve it
    my $id = $e->id;

See L<for more information|https://developer.mozilla.org/en-US/docs/Web/API/Element/id>

=head2 innerHTML

Set or get the element's content. This returns a string representing the markup of the element's content.

Se L<for more information|https://developer.mozilla.org/en-US/docs/Web/API/Element/innerHTML>

=head2 inert

A boolean value indicating whether the user agent must act as though the given node is absent for the purposes of user interaction events, in-page text searches (C<find in page>), and text selection.

See L<Mozilla documentation|https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/inert> for more information.

=head2 innerText

Represents the rendered text content of a node and its descendants. As a getter, it approximates the text the user would get if they highlighted the contents of the element with the cursor and then copied it to the clipboard. This returns a L<string ...

When setting some values, this method will ensure that HTML characters are escaped, namely: C<< < >>, C<< > >> and new lines are preceded by the C<< <br /> >> tag.

When the value is retrieved, this is reversed.

See L<Mozilla documentation|https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/innerText> for more information.

See also L<HTML::Object::DOM::Node/textContent>, L<HTML::Object::Element/as_text> and L<HTML::Object::XQuery/text>

=head2 inputMode

A string value reflecting the value of the element's inputmode attribute.

See L<Mozilla documentation|https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/inputMode> for more information.

=head2 isConnected

Returns a boolean indicating whether or not the element is connected (directly or indirectly) to the context object, i.e. the L<Document object|HTML::Object::Document> in the case of the normal DOM.

See L<for more information|https://developer.mozilla.org/en-US/docs/Web/API/Node/isConnected>

=head2 isContentEditable

    <p id="firstParagraph">Uneditable Paragraph</p>
    <p id="secondParagraph" contenteditable="true">Editable Paragraph</p>

    my $firstParagraph = $document->getElementById("firstParagraph");
    my $secondParagraph = $document->getElementById("secondParagraph");

Read-only

Returns a L<boolean value|HTML::Object::Boolean> indicating whether or not the content of the element can be edited. Use L<contentEditable> to change the value.

See L<Mozilla documentation|https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/isContentEditable> for more information.

=head2 lang

A string representing the language of an element's attributes, text, and element contents.

See L<Mozilla documentation|https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/lang> for more information.

=head2 lastChild

Read-only

This returns an element representing the last direct child element of the element, or C<undef> if the element has no child.

See L<for more information|https://developer.mozilla.org/en-US/docs/Web/API/Node/lastChild>

=head2 lastElementChild

Read-only

Returns the last child element of this element, if any at all.

See L<for more information|https://developer.mozilla.org/en-US/docs/Web/API/Element/lastElementChild>

=head2 localName

Read-only



( run in 4.387 seconds using v1.01-cache-2.11-cpan-2398b32b56e )