Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

URL constructor for Worker #857

Merged
merged 3 commits into from
Oct 4, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading