File tree 2 files changed +40
-1
lines changed
2 files changed +40
-1
lines changed Original file line number Diff line number Diff line change
1
+ /* global Audio */
2
+ "use strict" ;
3
+
4
+ exports . create = function ( ) {
5
+ return function ( ) {
6
+ return new Audio ( ) ;
7
+ } ;
8
+ } ;
9
+
10
+ exports . createWithURL = function ( url ) {
11
+ return function ( ) {
12
+ return new Audio ( url ) ;
13
+ } ;
14
+ } ;
Original file line number Diff line number Diff line change 1
- module Web.HTML.HTMLAudioElement where
1
+ module Web.HTML.HTMLAudioElement
2
+ ( HTMLAudioElement
3
+ , fromHTMLElement
4
+ , fromElement
5
+ , fromNode
6
+ , fromChildNode
7
+ , fromNonDocumentTypeChildNode
8
+ , fromParentNode
9
+ , fromEventTarget
10
+ , toHTMLMediaElement
11
+ , toHTMLElement
12
+ , toElement
13
+ , toNode
14
+ , toChildNode
15
+ , toNonDocumentTypeChildNode
16
+ , toParentNode
17
+ , toEventTarget
18
+ , create
19
+ , create'
20
+ ) where
2
21
3
22
import Data.Maybe (Maybe )
4
23
import Unsafe.Coerce (unsafeCoerce )
@@ -57,3 +76,9 @@ toParentNode = unsafeCoerce
57
76
58
77
toEventTarget :: HTMLAudioElement -> EventTarget
59
78
toEventTarget = unsafeCoerce
79
+
80
+ foreign import create :: Unit -> Effect HTMLAudioElement
81
+ foreign import createWithURL :: String -> Effect HTMLAudioElement
82
+
83
+ create' :: String → Effect HTMLAudioElement
84
+ create' = createWithURL
You can’t perform that action at this time.
0 commit comments