Module

Web.DOM.DOMParser

Package
purescript-web-dom-parser
Repository
purescript-web/purescript-web-dom-parser

#DOMParser Source

#makeDOMParser Source

makeDOMParser :: Effect DOMParser

Create a new DOMParser

#parseFromString Source

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 Source

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

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

#parseSVGFromString Source

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

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

#parseXMLFromString Source

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

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

#_getParserError Source

_getParserError :: Document -> Effect (Maybe String)

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