File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Expand file tree Collapse file tree 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) {
1717 return doc . activeElement ;
1818 } ;
1919} ;
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)
2929import Web.HTML.HTMLDocument.ReadyState (ReadyState )
3030import Web.HTML.HTMLDocument.ReadyState as ReadyState
3131import Web.HTML.HTMLElement (HTMLElement )
32+ import Web.HTML.HTMLScriptElement (HTMLScriptElement )
3233import Web.Internal.FFI (unsafeReadProtoTagged )
3334
3435foreign import data HTMLDocument :: Type
@@ -77,3 +78,8 @@ foreign import _activeElement :: HTMLDocument -> Effect (Nullable HTMLElement)
7778
7879activeElement :: HTMLDocument -> Effect (Maybe HTMLElement )
7980activeElement = 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