Movatterモバイル変換


[0]ホーム

URL:


  1. Web
  2. Web APIs
  3. SharedWorkerGlobalScope

SharedWorkerGlobalScope

Limited availability

This feature is not Baseline because it does not work in some of the most widely-used browsers.

TheSharedWorkerGlobalScope object (theSharedWorker global scope) is accessible through theself keyword. Some additional global functions, namespaces objects, and constructors, not typically associated with the worker global scope, but available on it, are listed in theJavaScript Reference. See the complete list offunctions available to workers.

EventTarget WorkerGlobalScope SharedWorkerGlobalScope

Instance properties

This interface inherits properties from theWorkerGlobalScope interface, and its parentEventTarget.

SharedWorkerGlobalScope.nameRead only

The name that theSharedWorker was (optionally) given when it was created using theSharedWorker() constructor. This is mainly useful for debugging purposes.

Instance methods

This interface inherits methods from theWorkerGlobalScope interface, and its parentEventTarget.

SharedWorkerGlobalScope.close()

Discards any tasks queued in theSharedWorkerGlobalScope's event loop, effectively closing this particular scope.

Events

Listen to this event usingaddEventListener() or by assigning an event listener to theoneventname property of this interface.

connect

Fired on shared workers when a new client connects.

Specifications

Specification
HTML
# shared-workers-and-the-sharedworkerglobalscope-interface

Browser compatibility

See also

Help improve MDN

Learn how to contribute

This page was last modified on byMDN contributors.


[8]ページ先頭

©2009-2026 Movatter.jp