Module

Web.DOM.DOMParser

#DOMParser

data DOMParser :: Type

#makeDOMParser

makeDOMParser :: Effect DOMParser

Create a new DOMParser

#parseFromString

parseFromString :: String -> String -> DOMParser -> Effect Document

Parse a string with the first argumet being a string for a doctype. Does not capture errors; consider using other wrapper functions, e.g. parseXMLFromString.

#parseHTMLFromString

parseHTMLFromString :: String -> DOMParser -> Effect (Either String Document)

Convience function to parse HTML from a string, partially applying parseFromString with "text/html"

#parseSVGFromString

parseSVGFromString :: String -> DOMParser -> Effect (Either String Document)

Convience function to parse SVG from a string, partially applying parseFromString with "image/svg+xml"

#parseXMLFromString

parseXMLFromString :: String -> DOMParser -> Effect (Either String Document)

Convience function to parse XML from a string, partially applying parseFromString with "application/xml"

#_getParserError

_getParserError :: Document -> Effect (Maybe String)

Utility method for extracting Dom Parser errors from document; should only need to be used if calling parseFromString directly.

Modules