This repository was archived by the owner on Oct 4, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 56
Expand file tree
/
Copy pathElement.purs
More file actions
31 lines (24 loc) · 1.88 KB
/
Element.purs
File metadata and controls
31 lines (24 loc) · 1.88 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
module DOM.Node.Element where
import Control.Monad.Eff (Eff())
import Data.Nullable (Nullable())
import DOM
import DOM.Node.Types
foreign import namespaceURI :: Element -> Nullable String
foreign import prefix :: Element -> Nullable String
foreign import localName :: Element -> String
foreign import tagName :: Element -> String
foreign import id :: forall eff. Element -> Eff (dom :: DOM | eff) ElementId
foreign import setId :: forall eff. ElementId -> Element -> Eff (dom :: DOM | eff) ElementId
foreign import className :: forall eff. Element -> Eff (dom :: DOM | eff) String
foreign import setClassName :: forall eff. String -> Element -> Eff (dom :: DOM | eff) String
foreign import getElementsByTagName :: forall eff. String -> Element -> Eff (dom :: DOM | eff) HTMLCollection
foreign import getElementsByTagNameNS :: forall eff. Nullable String -> String -> Element -> Eff (dom :: DOM | eff) HTMLCollection
foreign import getElementsByClassName :: forall eff. String -> Element -> Eff (dom :: DOM | eff) HTMLCollection
foreign import setAttribute :: forall eff. String -> String -> Element -> Eff (dom :: DOM | eff) String
foreign import setAttributeNS :: forall eff. (Nullable String) -> String -> String -> Element -> Eff (dom :: DOM | eff) String
foreign import getAttribute :: forall eff. String -> Element -> Eff (dom :: DOM | eff) (Nullable String)
foreign import getAttributeNS :: forall eff. (Nullable String) -> String -> Element -> Eff (dom :: DOM | eff) (Nullable String)
foreign import hasAttribute :: forall eff. String -> Element -> Eff (dom :: DOM | eff) Boolean
foreign import hasAttributeNS :: forall eff. (Nullable String) -> String -> Element -> Eff (dom :: DOM | eff) Boolean
foreign import removeAttribute :: forall eff. String -> Element -> Eff (dom :: DOM | eff) String
foreign import removeAttributeNS :: forall eff. (Nullable String) -> String -> Element -> Eff (dom :: DOM | eff) String