We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a9ab55f commit ce9293bCopy full SHA for ce9293b
dom/src/main/scala/org/scalajs/dom/SharedWorker.scala
@@ -25,7 +25,14 @@ import scala.scalajs.js.|
25
*/
26
@js.native
27
@JSGlobal
28
-class SharedWorker(scriptURL: String, options: js.UndefOr[String | WorkerOptions] = js.native) extends AbstractWorker {
+class SharedWorker private[this] (scriptURL: String, options: js.UndefOr[String | WorkerOptions] = js.native)
29
+ extends AbstractWorker {
30
+
31
+ def this(scriptURL: String) = this(scriptURL, js.undefined)
32
33
+ def this(scriptURL: String, name: String) = this(scriptURL, js.defined(name))
34
35
+ def this(scriptURL: String, options: WorkerOptions) = this(scriptURL, js.defined(options))
36
37
/** The port property of the SharedWorker interface returns a [[MessagePort]] object used to communicate and control
38
* the shared worker.
0 commit comments