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 +22
-0
lines changed Expand file tree Collapse file tree 2 files changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -69,3 +69,22 @@ exports.getElementsByClassName = function (classNames) {
6969 } ;
7070 } ;
7171} ;
72+
73+ exports . setAttribute = function ( name ) {
74+ return function ( value ) {
75+ return function ( element ) {
76+ return function ( ) {
77+ element . setAttribute ( name , value ) ;
78+ return { } ;
79+ } ;
80+ } ;
81+ } ;
82+ } ;
83+
84+ exports . getAttribute = function ( name ) {
85+ return function ( element ) {
86+ return function ( ) {
87+ return element . getAttribute ( name ) ;
88+ } ;
89+ } ;
90+ } ;
Original file line number Diff line number Diff line change @@ -20,3 +20,6 @@ foreign import setClassName :: forall eff. String -> Element -> Eff (dom :: DOM
2020foreign import getElementsByTagName :: forall eff . String -> Element -> Eff (dom :: DOM | eff ) HTMLCollection
2121foreign import getElementsByTagNameNS :: forall eff . Nullable String -> String -> Element -> Eff (dom :: DOM | eff ) HTMLCollection
2222foreign import getElementsByClassName :: forall eff . String -> Element -> Eff (dom :: DOM | eff ) HTMLCollection
23+
24+ foreign import setAttribute :: forall eff . String -> String -> Element -> Eff (dom :: DOM | eff ) String
25+ foreign import getAttribute :: forall eff . String -> Element -> Eff (dom :: DOM | eff ) (Nullable String )
You can’t perform that action at this time.
0 commit comments