Skip to content

Commit fc821ad

Browse files
authored
Merge pull request #234 from sjrd/fix-url
Fix #232: Fix the definition of URL and its static methods.
2 parents 6b8878b + ac070db commit fc821ad

File tree

2 files changed

+4
-12
lines changed

2 files changed

+4
-12
lines changed

src/main/scala/org/scalajs/dom/package.scala

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,6 @@ package object dom {
139139
type NodeList = raw.NodeList
140140
type NodeListOf[TNode <: Node] = raw.NodeListOf[TNode]
141141

142-
type ObjectURLOptions = raw.ObjectURLOptions
143142
type OfflineAudioContext = raw.OfflineAudioContext
144143
@deprecated(
145144
"Use the promise version of OfflineAudioContext.startRendering instead.",
@@ -198,7 +197,7 @@ package object dom {
198197
type TreeWalker = raw.TreeWalker
199198

200199
type UIEvent = raw.UIEvent
201-
type URL = raw.URL
200+
lazy val URL: raw.URL.type = raw.URL
202201

203202
type ValidityState = raw.ValidityState
204203
type VisibilityState = raw.VisibilityState

src/main/scala/org/scalajs/dom/raw/lib.scala

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6067,11 +6067,6 @@ class ClientRectList extends DOMList[ClientRect]
60676067
@js.native
60686068
trait External extends js.Object
60696069

6070-
@js.native
6071-
trait ObjectURLOptions extends js.Object {
6072-
def oneTimeOnly: Boolean = js.native
6073-
}
6074-
60756070
/**
60766071
* The ErrorEvent interface represents events providing information related to
60776072
* errors in scripts or in files.
@@ -6584,13 +6579,12 @@ abstract class File extends Blob {
65846579
}
65856580

65866581
/**
6587-
* The URL interface represent an object providing static methods used for creating
6588-
* object URLs.
6582+
* The URL object provides static methods used for creating object URLs.
65896583
*
65906584
* MDN
65916585
*/
65926586
@js.native
6593-
trait URL extends js.Object {
6587+
object URL extends js.Object {
65946588

65956589
/**
65966590
* The URL.revokeObjectURL() static method releases an existing object URL which
@@ -6610,8 +6604,7 @@ trait URL extends js.Object {
66106604
*
66116605
* MDN
66126606
*/
6613-
def createObjectURL(`object`: js.Any,
6614-
options: ObjectURLOptions = js.native): String = js.native
6607+
def createObjectURL(blob: Blob): String = js.native
66156608
}
66166609

66176610
/**

0 commit comments

Comments
 (0)