module Data.DOM.DocumentTraversal
       (createNodeIterator, createTreeWalker) where
import Data.DOM.Traversal
import Control.Monad
import BrownPLT.JavaScript
import Data.DOM.WBTypes
import Data.DOM.Dom
import Data.DOM.Document (createElement)
 
createNodeIterator ::
                   (Monad mn, CDocumentTraversal this, CNode root, CNodeFilter filter,
                    CNodeIterator zz) =>
                     Expression root ->
                       Expression Double ->
                         Expression filter ->
                           Expression Bool -> Expression this -> mn (Expression zz)
createNodeIterator a b c d thisp
  = do let et = undefined :: zz
       let r = DotRef et (thisp /\ et) (Id et "createNodeIterator")
       return (CallExpr et r [a /\ et, b /\ et, c /\ et, d /\ et])
 
createTreeWalker ::
                 (Monad mn, CDocumentTraversal this, CNode root, CNodeFilter filter,
                  CTreeWalker zz) =>
                   Expression root ->
                     Expression Double ->
                       Expression filter ->
                         Expression Bool -> Expression this -> mn (Expression zz)
createTreeWalker a b c d thisp
  = do let et = undefined :: zz
       let r = DotRef et (thisp /\ et) (Id et "createTreeWalker")
       return (CallExpr et r [a /\ et, b /\ et, c /\ et, d /\ et])