File tree 2 files changed +12
-0
lines changed
2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -17,3 +17,9 @@ exports._activeElement = function (doc) {
17
17
return doc . activeElement ;
18
18
} ;
19
19
} ;
20
+
21
+ exports . _currentScript = function ( doc ) {
22
+ return function ( ) {
23
+ return doc . currentScript ;
24
+ } ;
25
+ } ;
Original file line number Diff line number Diff line change @@ -29,6 +29,7 @@ import Web.Event.EventTarget (EventTarget)
29
29
import Web.HTML.HTMLDocument.ReadyState (ReadyState )
30
30
import Web.HTML.HTMLDocument.ReadyState as ReadyState
31
31
import Web.HTML.HTMLElement (HTMLElement )
32
+ import Web.HTML.HTMLScriptElement (HTMLScriptElement )
32
33
import Web.Internal.FFI (unsafeReadProtoTagged )
33
34
34
35
foreign import data HTMLDocument :: Type
@@ -77,3 +78,8 @@ foreign import _activeElement :: HTMLDocument -> Effect (Nullable HTMLElement)
77
78
78
79
activeElement :: HTMLDocument -> Effect (Maybe HTMLElement )
79
80
activeElement = map toMaybe <<< _activeElement
81
+
82
+ foreign import _currentScript :: HTMLDocument -> Effect (Nullable HTMLScriptElement )
83
+
84
+ currentScript :: HTMLDocument -> Effect (Maybe HTMLScriptElement )
85
+ currentScript = map toMaybe <<< _currentScript
You can’t perform that action at this time.
0 commit comments