Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion src/Web/DOM/Document.purs
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,22 @@
-- |
-- | The DOM API doesn't actually give you any way of getting hold of a
-- | `Document` by itself. To do that, you will need to look at one of the
-- | other APIs which build on the DOM API. For example, `window.document` is
-- | other APIs which build on the DOM API.
-- |
-- | For example, `window.document` is
-- | part of the HTML5 API, and so the relevant binding can be found in
-- | `Web.HTML.Window`, which is part of the `purescript-web-html` package.
-- | So here is one way to acquire an HTML5 `Document` from functions
-- | in `purescript-web-html`:
-- |
-- | ```purescript
-- | import Web.HTML (window)
-- | import Web.HTML.Window (document)
-- | import Web.HTML.HTMLDocument (toDocument)
-- |
-- | do
-- | doc <- map toDocument $ document =<< window
-- | ```
module Web.DOM.Document
( Document
, fromNode
Expand Down