This repository was archived by the owner on Oct 4, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -86,6 +86,12 @@ exports._getAttribute = function (name) {
86
86
} ;
87
87
} ;
88
88
89
+ exports . hasAttribute = function ( name ) {
90
+ return function ( element ) {
91
+ return element . hasAttribute ( name ) ;
92
+ } ;
93
+ } ;
94
+
89
95
exports . removeAttribute = function ( name ) {
90
96
return function ( element ) {
91
97
return function ( ) {
Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ module DOM.Node.Element
12
12
, getElementsByClassName
13
13
, setAttribute
14
14
, getAttribute
15
+ , hasAttribute
15
16
, removeAttribute
16
17
, scrollTop
17
18
, setScrollTop
@@ -63,6 +64,7 @@ getAttribute :: forall eff. String -> Element -> Eff (dom :: DOM | eff) (Maybe S
63
64
getAttribute attr = map toMaybe <<< _getAttribute attr
64
65
65
66
foreign import _getAttribute :: forall eff . String -> Element -> Eff (dom :: DOM | eff ) (Nullable String )
67
+ foreign import hasAttribute :: forall eff . String -> Element -> Eff (dom :: DOM | eff ) Boolean
66
68
foreign import removeAttribute :: forall eff . String -> Element -> Eff (dom :: DOM | eff ) Unit
67
69
68
70
foreign import scrollTop :: forall eff . Element -> Eff (dom :: DOM | eff ) Number
You can’t perform that action at this time.
0 commit comments