Shaka Player Embedded
Public Member Functions | Static Public Member Functions | List of all members
shaka::js::dom::DOMParser Class Reference

#include <dom_parser.h>

Inheritance diagram for shaka::js::dom::DOMParser:
shaka::BackingObject shaka::memory::Traceable

Public Member Functions

 DOMParser ()
 
ExceptionOr< RefPtr< Document > > ParseFromString (const std::string &source, const std::string &type) const
 
- 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 ()
 
virtual bool IsShortLived () const
 

Static Public Member Functions

static DOMParserCreate ()
 
- Static Public Member Functions inherited from shaka::BackingObject
static void * operator new[] (size_t size)=delete
 
static void operator delete[] (void *)=delete
 

Additional Inherited Members

- 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::BackingObject
 ~BackingObject () override
 

Detailed Description

Implements the DOMParser interface for DOM. https://w3c.github.io/DOM-Parsing/#the-domparser-interface

Definition at line 34 of file dom_parser.h.

Constructor & Destructor Documentation

§ DOMParser()

shaka::js::dom::DOMParser::DOMParser ( )

Definition at line 26 of file dom_parser.cc.

Member Function Documentation

§ Create()

static DOMParser* shaka::js::dom::DOMParser::Create ( )
inlinestatic

Definition at line 40 of file dom_parser.h.

§ ParseFromString()

Doxygen_Skip ExceptionOr< RefPtr< Document > > shaka::js::dom::DOMParser::ParseFromString ( const std::string &  source,
const std::string &  type 
) const

Parses the given string into a document. Only supports XML documents. The spec says this should always return a non-null document; however to make errors more obvious (and make parsing easier), this throws in the event of error.

Definition at line 31 of file dom_parser.cc.


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