Skip to content

Commit 6f822d2

Browse files
committed
switch over to 2 different methods
1 parent 8b70731 commit 6f822d2

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

api-reports/2_12.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26181,7 +26181,8 @@ URL[JC] var protocol: String
2618126181
URL[JC] var search: String
2618226182
URL[JC] var searchParams: URLSearchParams
2618326183
URL[JC] var username: String
26184-
URL[JO] def createObjectURL(obj: Blob | File | MediaSource): String
26184+
URL[JO] def createObjectURL(obj: Blob): String
26185+
URL[JO] def createObjectURL(src: MediaSource): String
2618526186
URL[JO] def revokeObjectURL(url: String): Unit
2618626187
URLSearchParams[JC] def append(name: String, value: String): Unit
2618726188
URLSearchParams[JC] def delete(name: String): Unit

api-reports/2_13.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26181,7 +26181,8 @@ URL[JC] var protocol: String
2618126181
URL[JC] var search: String
2618226182
URL[JC] var searchParams: URLSearchParams
2618326183
URL[JC] var username: String
26184-
URL[JO] def createObjectURL(obj: Blob | File | MediaSource): String
26184+
URL[JO] def createObjectURL(obj: Blob): String
26185+
URL[JO] def createObjectURL(src: MediaSource): String
2618526186
URL[JO] def revokeObjectURL(url: String): Unit
2618626187
URLSearchParams[JC] def append(name: String, value: String): Unit
2618726188
URLSearchParams[JC] def delete(name: String): Unit

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ package org.scalajs.dom
22

33
import scala.scalajs.js
44
import scala.scalajs.js.annotation._
5-
import scala.scalajs.js.|
65

76
/** The URL object provides static methods used for creating object URLs. */
87
@js.native
@@ -19,7 +18,10 @@ object URL extends js.Object {
1918
* parameter. The URL lifetime is tied to the document in the window on which it was created. The new object URL
2019
* represents the specified File, Blob or MediaSource object.
2120
*/
22-
def createObjectURL(obj: Blob | File | MediaSource): String = js.native
21+
def createObjectURL(obj: Blob): String = js.native
22+
23+
def createObjectURL(src: MediaSource): String = js.native
24+
2325
}
2426

2527
/** The URL() constructor returns a newly created URL object representing the URL defined by the parameters. */

0 commit comments

Comments
 (0)