SharedWorker 构造函数

SharedWorker(
  1. String scriptURL,
  2. [String? name]
)

实现

factory SharedWorker(String scriptURL, [String? name]) {
  if (name != null) {
    return SharedWorker._create_1(scriptURL, name);
  }
  return SharedWorker._create_2(scriptURL);
}