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) {
8686 } ;
8787} ;
8888
89+ exports . hasAttribute = function ( name ) {
90+ return function ( element ) {
91+ return element . hasAttribute ( name ) ;
92+ } ;
93+ } ;
94+
8995exports . removeAttribute = function ( name ) {
9096 return function ( element ) {
9197 return function ( ) {
Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ module DOM.Node.Element
1212 , getElementsByClassName
1313 , setAttribute
1414 , getAttribute
15+ , hasAttribute
1516 , removeAttribute
1617 , scrollTop
1718 , setScrollTop
@@ -63,6 +64,7 @@ getAttribute :: forall eff. String -> Element -> Eff (dom :: DOM | eff) (Maybe S
6364getAttribute attr = map toMaybe <<< _getAttribute attr
6465
6566foreign 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
6668foreign import removeAttribute :: forall eff . String -> Element -> Eff (dom :: DOM | eff ) Unit
6769
6870foreign import scrollTop :: forall eff . Element -> Eff (dom :: DOM | eff ) Number
You can’t perform that action at this time.
0 commit comments