Skip to content

Commit

Permalink
Merge pull request #857 from JPonte/webworker-overload
Browse files Browse the repository at this point in the history
URL constructor for Worker
  • Loading branch information
zetashift authored Oct 4, 2024
2 parents 53f9a1a + 13ac947 commit 5a85518
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions dom/src/main/scala/org/scalajs/dom/Worker.scala
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,12 @@ import scala.scalajs.js.annotation._
*/
@js.native
@JSGlobal
class Worker(scriptURL: String, options: WorkerOptions) extends AbstractWorker {
class Worker extends AbstractWorker {

def this(scriptURL: String) = this(scriptURL, js.native)
def this(scriptURL: String, options: WorkerOptions) = this()
def this(scriptURL: String) = this()
def this(scriptURL: URL, options: WorkerOptions) = this()
def this(scriptURL: URL) = this()

/** The Worker.onmessage property represents an EventHandler, that is a function to be called when the message event
* occurs. These events are of type MessageEvent and will be called when the worker calls its own postMessage()
Expand Down

0 comments on commit 5a85518

Please sign in to comment.