Web::DOM::Attr
DOM Attr object
DESCRIPTION
The Web::DOM::Attr class implements the DOM Attr interface.
An Attr object represents a content attribute of an element.
METHODS
The methods of classes Web::DOM::EventTarget and Web::DOM::Node are available on a Attr object,
as well as following methods:
$node = $node->manakai_append_text ($string)-
Append a string to the
valueof the attribute. [MANAKAI] $attr->manakai_append_indexed_string ($indexed)-
Append an IndexedString
<http://wiki.suikawiki.org/n/manakai%20index%20data%20structures#anchor-1>to thevalueof the attribute. [MANAKAIINDEX] $code = $attr->manakai_attribute_type$attr->manakai_attribute_type ($code)-
Return or set the DTD attribute type for the attribute. [MANAKAI]
$indexed = $attr->manakai_get_indexed_string-
Return an IndexedString
<http://wiki.suikawiki.org/n/manakai%20index%20data%20structures#anchor-1>representation of thevalueof the attribute. [MANAKAIINDEX] $bool = $attr->is_id-
Return whether the attribute is
idor not. [MANAKAI] $name = $attr->local_name$name = $attr->manakai_local_name [DEPRECATED]$url = $attr->namespace_uri-
Return the namespace URL of the attribute. If the attribute does not belong to any namespace,
undefis returned. [DOM] $el = $attr->owner_element-
Return the element to which the attribute is set. If there is no such an element,
undefis returned. [DOM] $name = $attr->name$name = $attr->node_name$name = $attr->manakai_name [DEPRECATED]$prefix = $attr->prefix$attr->prefix ($prefix)-
If no argument is specified, return the namespace prefix of the element, if any, or
undef. [DOM]If the argument is specified, the value is set as the namespace prefix of the element. If the value is
undef, the namespace prefix is removed. [DOMNODEEXODUS] [MANAKAI] $bool = $attr->specified-
Return true for backward compatibility. [DOM]
$value = $attr->value$value = $attr->text_content$value = $attr->node_value$attr->value ($value)$attr->text_content ($value)$attr->node_value ($value)-
Return or set the attribute value. [DOM]
CONSTANTS
Constants are exported from the Web::DOM::Attr module by default.
In addition,
they are accessible as methods of Attr objects.
Following declared type constants used by the manakai_attribute_type attribute are exported [DOMDTDEF]:
NO_TYPE_ATTR CDATA_ATTR ID_ATTR IDREF_ATTR IDREFS_ATTR ENTITY_ATTR ENTITIES_ATTR NMTOKEN_ATTR NMTOKENS_ATTR NOTATION_ATTR ENUMERATION_ATTR UNKNOWN_ATTR
SPECIFICATIONS
- DOM
-
DOM Standard
<https://dom.spec.whatwg.org/#interface-attr>. - DOMNODEEXODUS
-
DOM Standard
<view-source:https://dom.spec.whatwg.org/>. - DOMDTDEF
-
DOM Document Type Definitions
<https://suika.suikawiki.org/www/markup/xml/domdtdef/domdtdef>. - MANAKAI
-
manakai DOM Extensions
<https://suika.suikawiki.org/~wakaba/wiki/sw/n/manakai%20DOM%20Extensions>. - MANAKAIINDEX
-
manakai index data structures
<https://wiki.suikawiki.org/n/manakai%20index%20data%20structures>.
SEE ALSO
AUTHOR
Wakaba <wakaba@suikawiki.org>.
LICENSE
Copyright 2012-2016 Wakaba <wakaba@suikawiki.org>.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.