Shaka Player Embedded
Public Member Functions | Public Attributes | List of all members
shaka::js::dom::Attr Class Referencefinal

#include <attr.h>

Inheritance diagram for shaka::js::dom::Attr:
shaka::js::dom::Node shaka::js::events::EventTarget shaka::BackingObject shaka::memory::Traceable

Public Member Functions

 Attr (RefPtr< Document > document, RefPtr< Element > owner, const std::string &local_name, optional< std::string > namespace_uri, optional< std::string > namespace_prefix, const std::string &value)
 
std::string attr_name () const
 
void Trace (memory::HeapTracer *tracer) const override
 
std::string node_name () const override
 
optional< std::string > NodeValue () const override
 
optional< std::string > TextContent () const override
 
- Public Member Functions inherited from shaka::js::dom::Node
 Node (NodeType type, RefPtr< Document > document)
 
void Trace (memory::HeapTracer *tracer) const override
 
bool IsShortLived () const override
 
RefPtr< Documentdocument () const
 
RefPtr< Nodeparent_node () const
 
std::vector< RefPtr< Node > > child_nodes () const
 
NodeType node_type () const
 
RefPtr< Nodefirst_child () const
 
RefPtr< Nodelast_child () const
 
RefPtr< NodeAppendChild (RefPtr< Node > new_child)
 
RefPtr< NodeRemoveChild (RefPtr< Node > to_remove)
 
bool is_document () const
 
bool is_element () const
 
bool is_char_data () const
 
- Public Member Functions inherited from shaka::js::events::EventTarget
 EventTarget ()
 
void Trace (memory::HeapTracer *tracer) const override
 
void AddEventListener (const std::string &type, Listener callback)
 
void SetCppEventListener (EventType type, std::function< void()> callback)
 
void RemoveEventListener (const std::string &type, Listener callback)
 
void UnsetCppEventListener (EventType type)
 
ExceptionOr< bool > DispatchEvent (RefPtr< Event > event)
 
ExceptionOr< bool > DispatchEventInternal (RefPtr< Event > event, bool *did_listeners_throw)
 
template<typename EventType , typename... Args>
std::shared_ptr< ThreadEvent< bool > > ScheduleEvent (Args &&... args)
 
template<typename EventType , typename... Args>
ExceptionOr< bool > RaiseEvent (Args... args)
 
- Public Member Functions inherited from shaka::BackingObject
 BackingObject ()
 
void Trace (memory::HeapTracer *tracer) const override
 
bool IsRootedAlive () const override
 
std::string name () const
 
virtual BackingObjectFactoryBasefactory () const =0
 
bool DerivedFrom (const std::string &base)
 
ReturnVal< JsValue > JsThis () const
 
void SetJsThis (Handle< JsObject > this_)
 
- Public Member Functions inherited from shaka::memory::Traceable
virtual ~Traceable ()
 

Public Attributes

const optional< std::string > namespace_uri
 
const optional< std::string > namespace_prefix
 
const std::string local_name
 
const bool specified = true
 
std::string value
 
const Member< Elementowner_element
 

Additional Inherited Members

- Public Types inherited from shaka::js::dom::Node
enum  NodeType {
  ELEMENT_NODE = 1, ATTRIBUTE_NODE = 2, TEXT_NODE = 3, CDATA_SECTION_NODE = 4,
  ENTITY_REFERENCE_NODE = 5, ENTITY_NODE = 6, PROCESSING_INSTRUCTION_NODE = 7, COMMENT_NODE = 8,
  DOCUMENT_NODE = 9, DOCUMENT_TYPE_NODE = 10, DOCUMENT_FRAGMENT_NODE = 11, NOTATION_NODE = 12
}
 
enum  DocumentPosition {
  DOCUMENT_POSITION_DISCONNECTED = 0x01, DOCUMENT_POSITION_PRECEDING = 0x02, DOCUMENT_POSITION_FOLLOWING = 0x04, DOCUMENT_POSITION_CONTAINS = 0x08,
  DOCUMENT_POSITION_CONTAINED_BY = 0x10, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC = 0x20
}
 
- Public Types inherited from shaka::js::events::EventTarget
using Listener = optional< Callback >
 
- Static Public Member Functions inherited from shaka::BackingObject
static void * operator new[] (size_t size)=delete
 
static void operator delete[] (void *)=delete
 
- Static Public Attributes inherited from shaka::BackingObject
static constexpr const size_t kInternalFieldCount = 2
 
- Static Public Attributes inherited from shaka::memory::Traceable
static constexpr const uint64_t kShortLiveDurationMs = 5000
 
- Protected Member Functions inherited from shaka::js::events::EventTarget
void AddListenerField (EventType type, Listener *on_field)
 
- Protected Member Functions inherited from shaka::BackingObject
 ~BackingObject () override
 

Detailed Description

Implements the Attr interface for DOM. https://dom.spec.whatwg.org/#attr

Definition at line 34 of file attr.h.

Constructor & Destructor Documentation

§ Attr()

shaka::js::dom::Attr::Attr ( RefPtr< Document document,
RefPtr< Element owner,
const std::string &  local_name,
optional< std::string >  namespace_uri,
optional< std::string >  namespace_prefix,
const std::string &  value 
)

Definition at line 24 of file attr.cc.

Member Function Documentation

§ attr_name()

Doxygen_Skip std::string shaka::js::dom::Attr::attr_name ( ) const

Definition at line 40 of file attr.cc.

§ node_name()

std::string shaka::js::dom::Attr::node_name ( ) const
overridevirtual

Implements shaka::js::dom::Node.

Definition at line 51 of file attr.cc.

§ NodeValue()

optional< std::string > shaka::js::dom::Attr::NodeValue ( ) const
overridevirtual

Implements shaka::js::dom::Node.

Definition at line 55 of file attr.cc.

§ TextContent()

optional< std::string > shaka::js::dom::Attr::TextContent ( ) const
overridevirtual

Implements shaka::js::dom::Node.

Definition at line 59 of file attr.cc.

§ Trace()

void shaka::js::dom::Attr::Trace ( memory::HeapTracer tracer) const
overridevirtual

Called during a GC run. This should call HeapTracer::Trace on all Traceable members. Be sure to call the base method when overriding.

Implements shaka::memory::Traceable.

Definition at line 46 of file attr.cc.

Member Data Documentation

§ local_name

const std::string shaka::js::dom::Attr::local_name

Definition at line 44 of file attr.h.

§ namespace_prefix

const optional<std::string> shaka::js::dom::Attr::namespace_prefix

Definition at line 43 of file attr.h.

§ namespace_uri

const optional<std::string> shaka::js::dom::Attr::namespace_uri

Definition at line 42 of file attr.h.

§ owner_element

const Member<Element> shaka::js::dom::Attr::owner_element

Definition at line 48 of file attr.h.

§ specified

const bool shaka::js::dom::Attr::specified = true

Definition at line 45 of file attr.h.

§ value

std::string shaka::js::dom::Attr::value

Definition at line 46 of file attr.h.


The documentation for this class was generated from the following files: