");--light-color-scheme:light;--dark-color-background:#2b2e33;--dark-color-background-secondary:#1e2024;--dark-color-background-warning:#bebe00;--dark-color-warning-text:#222;--dark-color-icon-background:var(--dark-color-background-secondary);--dark-color-accent:#9096a2;--dark-color-active-menu-item:#5d5d6a;--dark-color-text:#f5f5f5;--dark-color-text-aside:#dddddd;--dark-color-link:#00aff4;--dark-color-ts-keyword:#3399ff;--dark-color-ts-project:#e358ff;--dark-color-ts-module:var(--dark-color-ts-project);--dark-color-ts-namespace:var(--dark-color-ts-project);--dark-color-ts-enum:#f4d93e;--dark-color-ts-enum-member:var(--dark-color-ts-enum);--dark-color-ts-variable:#798dff;--dark-color-ts-function:#a280ff;--dark-color-ts-class:#8ac4ff;--dark-color-ts-interface:#6cff87;--dark-color-ts-constructor:var(--dark-color-ts-class);--dark-color-ts-property:var(--dark-color-ts-variable);--dark-color-ts-method:var(--dark-color-ts-function);--dark-color-ts-call-signature:var(--dark-color-ts-method);--dark-color-ts-index-signature:var(--dark-color-ts-property);--dark-color-ts-constructor-signature:var(--dark-color-ts-constructor);--dark-color-ts-parameter:var(--dark-color-ts-variable);--dark-color-ts-type-parameter:var(--dark-color-ts-type-alias);--dark-color-ts-accessor:var(--dark-color-ts-property);--dark-color-ts-get-signature:var(--dark-color-ts-accessor);--dark-color-ts-set-signature:var(--dark-color-ts-accessor);--dark-color-ts-type-alias:#ff6492;--dark-external-icon:url("data:image/svg+xml;utf8,");--dark-color-scheme:dark}@media (prefers-color-scheme:light){:root{--color-background:var(--light-color-background);--color-background-secondary:var(--light-color-background-secondary);--color-background-warning:var(--light-color-background-warning);--color-warning-text:var(--light-color-warning-text);--color-icon-background:var(--light-color-icon-background);--color-accent:var(--light-color-accent);--color-active-menu-item:var(--light-color-active-menu-item);--color-text:var(--light-color-text);--color-text-aside:var(--light-color-text-aside);--color-link:var(--light-color-link);--color-ts-keyword:var(--light-color-ts-keyword);--color-ts-module:var(--light-color-ts-module);--color-ts-namespace:var(--light-color-ts-namespace);--color-ts-enum:var(--light-color-ts-enum);--color-ts-enum-member:var(--light-color-ts-enum-member);--color-ts-variable:var(--light-color-ts-variable);--color-ts-function:var(--light-color-ts-function);--color-ts-class:var(--light-color-ts-class);--color-ts-interface:var(--light-color-ts-interface);--color-ts-constructor:var(--light-color-ts-constructor);--color-ts-property:var(--light-color-ts-property);--color-ts-method:var(--light-color-ts-method);--color-ts-call-signature:var(--light-color-ts-call-signature);--color-ts-index-signature:var(--light-color-ts-index-signature);--color-ts-constructor-signature:var(--light-color-ts-constructor-signature);--color-ts-parameter:var(--light-color-ts-parameter);--color-ts-type-parameter:var(--light-color-ts-type-parameter);--color-ts-accessor:var(--light-color-ts-accessor);--color-ts-get-signature:var(--light-color-ts-get-signature);--color-ts-set-signature:var(--light-color-ts-set-signature);--color-ts-type-alias:var(--light-color-ts-type-alias);--external-icon:var(--light-external-icon);--color-scheme:var(--light-color-scheme)}:root{--hl-0:var(--light-hl-0);--hl-1:var(--light-hl-1);--hl-2:var(--light-hl-2);--hl-3:var(--light-hl-3);--hl-4:var(--light-hl-4);--hl-5:var(--light-hl-5);--hl-6:var(--light-hl-6);--hl-7:var(--light-hl-7);--code-background:var(--light-code-background)}}@media (prefers-color-scheme:dark){:root{--color-background:var(--dark-color-background);--color-background-secondary:var(--dark-color-background-secondary);--color-background-warning:var(--dark-color-background-warning);--color-warning-text:var(--dark-color-warning-text);--color-icon-background:var(--dark-color-icon-background);--color-accent:var(--dark-color-accent);--color-active-menu-item:var(--dark-color-active-menu-item);--color-text:var(--dark-color-text);--color-text-aside:var(--dark-color-text-aside);--color-link:var(--dark-color-link);--color-ts-keyword:var(--dark-color-ts-keyword);--color-ts-module:var(--dark-color-ts-module);--color-ts-namespace:var(--dark-color-ts-namespace);--color-ts-enum:var(--dark-color-ts-enum);--color-ts-enum-member:var(--dark-color-ts-enum-member);--color-ts-variable:var(--dark-color-ts-variable);--color-ts-function:var(--dark-color-ts-function);--color-ts-class:var(--dark-color-ts-class);--color-ts-interface:var(--dark-color-ts-interface);--color-ts-constructor:var(--dark-color-ts-constructor);--color-ts-property:var(--dark-color-ts-property);--color-ts-method:var(--dark-color-ts-method);--color-ts-call-signature:var(--dark-color-ts-call-signature);--color-ts-index-signature:var(--dark-color-ts-index-signature);--color-ts-constructor-signature:var(--dark-color-ts-constructor-signature);--color-ts-parameter:var(--dark-color-ts-parameter);--color-ts-type-parameter:var(--dark-color-ts-type-parameter);--color-ts-accessor:var(--dark-color-ts-accessor);--color-ts-get-signature:var(--dark-color-ts-get-signature);--color-ts-set-signature:var(--dark-color-ts-set-signature);--color-ts-type-alias:var(--dark-color-ts-type-alias);--external-icon:var(--dark-external-icon);--color-scheme:var(--dark-color-scheme)}}html{color-scheme:var(--color-scheme)}body{margin:0}h1,h2,h3,h4,h5{line-height:1.2}h1{font-size:1.875rem;margin:.67rem 0}h2{font-size:1.5rem;margin:.83rem 0}h3{font-size:1.25rem;margin:1rem 0}h4{font-size:1.05rem;margin:1.33rem 0}h5{font-size:1rem;margin:1.5rem 0}.uppercase{text-transform:uppercase}ul{margin:1em 0}.container{max-width:1700px;padding:0 2rem}.container-main{margin:0 auto;min-height:calc(100vh - 41px - 56px - 4rem)}body{background:var(--color-background);font-family:"Segoe UI",sans-serif;font-size:16px;color:var(--color-text)}a{color:var(--color-link);text-decoration:none}a.external[target="_blank"]{background-image:var(--external-icon);background-position:top 3px right;background-repeat:no-repeat;padding-right:13px}code{font-family:Menlo,Monaco,Consolas,"Courier New",monospace;padding:.2em;margin:0;font-size:.875rem;border-radius:.8em}.tsd-typography{line-height:1.333em}.tsd-typography p{margin:1em 0}.tsd-breadcrumb{margin:0;padding:0;color:var(--color-text-aside)}.tsd-breadcrumb a{color:var(--color-text-aside);text-decoration:none}.tsd-breadcrumb li{display:inline}.tsd-breadcrumb li:after{content:" / "}.tsd-filter-visibility h4{font-size:1rem;padding-top:.75rem;padding-bottom:.5rem;margin:0}.tsd-filter-item:not(:last-child){margin-bottom:.5rem}.tsd-filter-input{display:flex;width:fit-content;width:-moz-fit-content;align-items:center}.tsd-filter-input input[type=checkbox]{position:absolute;width:1.5em;height:1.5em;opacity:0}.tsd-filter-input svg{width:1.5em;height:1.5em;margin-right:.5em;border-radius:.33em;opacity:.99}.tsd-checkbox-background{fill:var(--color-accent)}input[type=checkbox]:checked~svg .tsd-checkbox-checkmark{stroke:var(--color-text)}.tsd-theme-toggle{padding-top:.75rem}.tsd-theme-toggle>h4{display:inline;vertical-align:middle;margin-right:.75rem}.tsd-hierarchy{list-style:square;margin:0}.tsd-panel-group.tsd-index-group{margin-bottom:0}.tsd-index-panel .tsd-index-list{list-style:none;line-height:1.333em;margin:0;padding:.25rem 0 0;overflow:hidden;display:grid;grid-template-columns:repeat(3,1fr);column-gap:1rem;grid-template-rows:auto}@media (max-width:1024px){.tsd-index-panel .tsd-index-list{grid-template-columns:repeat(2,1fr)}}@media (max-width:768px){.tsd-index-panel .tsd-index-list{grid-template-columns:repeat(1,1fr)}}.tsd-anchor{position:relative;top:-100px}.tsd-navigation.settings{margin:1rem 0}.tsd-navigation .tsd-accordion-summary,.tsd-navigation>a{width:calc(100% - .5rem)}.tsd-navigation a,.tsd-page-navigation a{display:inline-flex;align-items:center;padding:.25rem;color:var(--color-text);text-decoration:none;box-sizing:border-box}.tsd-navigation a.current{background:var(--color-active-menu-item)}.tsd-navigation ul,.tsd-page-navigation ul{margin-top:0;margin-bottom:0;padding:0;list-style:none}.tsd-navigation li,.tsd-page-navigation li{padding:0;max-width:100%}.tsd-small-nested-navigation{margin-left:1.5rem}.tsd-page-navigation ul{padding-left:1.75rem}a.tsd-index-link{padding:.25rem 0!important;font-size:1rem;line-height:1.25rem;display:inline-flex;align-items:center;color:var(--color-text)}.tsd-accordion-summary{list-style-type:none;outline:0}.tsd-accordion-summary::-webkit-details-marker{display:none}.tsd-accordion-summary>*{margin-top:0;margin-bottom:0;padding-top:0;padding-bottom:0}.tsd-index-content>:not(:first-child){margin-top:.75rem}.tsd-index-heading{margin-top:1.5rem;margin-bottom:.75rem}.tsd-kind-icon{margin-right:.5rem;width:1.25rem;height:1.25rem;min-width:1.25rem;min-height:1.25rem}.tsd-panel{margin-bottom:2.5rem}.tsd-panel-group{margin:4rem 0}.tsd-panel-group.tsd-index-group{margin:2rem 0}.tsd-panel-group.tsd-index-group details{margin:2rem 0}#tsd-search .title{position:relative;z-index:2}#tsd-search .field{position:absolute;left:0;top:0;right:2.5rem;height:100%}#tsd-search .field input{box-sizing:border-box;position:relative;top:-50px;z-index:1;width:100%;padding:0 10px;opacity:0;outline:0;border:0;background:0 0;color:var(--color-text)}#tsd-search .field label{position:absolute;overflow:hidden;right:-40px}#tsd-search .results{position:absolute;visibility:hidden;top:40px;width:100%;margin:0;padding:0;list-style:none;box-shadow:0 0 4px rgba(0,0,0,.25)}#tsd-search .results li{background-color:var(--color-background);line-height:initial;padding:4px}#tsd-search .results li:nth-child(2n){background-color:var(--color-background-secondary)}#tsd-search .results li.state{display:none}#tsd-toolbar-links{position:absolute;top:0;right:2rem;height:100%;display:flex;align-items:center;justify-content:flex-end}.tsd-signature-type{font-style:italic;font-weight:400}.tsd-sources{margin-top:1rem;font-size:.875em}.tsd-sources a{color:var(--color-text-aside);text-decoration:underline}.tsd-sources ul{list-style:none;padding:0}.tsd-page-toolbar{position:sticky;z-index:1;top:0;left:0;width:100%;color:var(--color-text);background:var(--color-background-secondary);border-bottom:1px var(--color-accent) solid}.tsd-page-toolbar a{color:var(--color-text);text-decoration:none}.tsd-page-toolbar a.title{font-weight:700}.tsd-page-toolbar .tsd-toolbar-contents{display:flex;justify-content:space-between;height:2.5rem;margin:0 auto}.tsd-page-toolbar .table-cell{position:relative;white-space:nowrap;line-height:40px}.tsd-page-toolbar .table-cell:first-child{width:100%}.tsd-page-toolbar .tsd-toolbar-icon{box-sizing:border-box;line-height:0;padding:12px 0}.tsd-widget{display:inline-block;overflow:hidden;opacity:.8;height:40px;vertical-align:bottom}.tsd-widget.no-caption{width:40px}.tsd-widget.no-caption:before{margin:0}.tsd-widget.menu{display:none}.tsd-kind-icon~span{color:var(--color-text)}*{scrollbar-width:thin;scrollbar-color:var(--color-accent) var(--color-icon-background)}::-webkit-scrollbar{width:.75rem}::-webkit-scrollbar-track{background:var(--color-icon-background)}::-webkit-scrollbar-thumb{background-color:var(--color-accent);border-radius:999rem;border:.25rem solid var(--color-icon-background)}@media (max-width:769px){.tsd-widget.menu{display:inline-block}.container-main{display:flex}html .col-content{float:none;max-width:100%;width:100%}html .col-sidebar{position:fixed!important;overflow-y:auto;-webkit-overflow-scrolling:touch;z-index:1024;top:0!important;bottom:0!important;left:auto!important;right:0!important;padding:1.5rem 1.5rem 0 0;width:75vw;visibility:hidden;background-color:var(--color-background);transform:translate(100%,0)}html .col-sidebar>:last-child{padding-bottom:20px}}@media (min-width:770px){.container-main{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,2fr);grid-template-areas:"sidebar content";margin:2rem auto}.col-sidebar{grid-area:sidebar}.col-content{grid-area:content;padding:0 1rem}}@media (min-width:770px) and (max-width:1399px){.col-sidebar{max-height:calc(100vh - 2rem - 42px);overflow:auto;position:sticky;top:42px;padding-top:1rem}.site-menu{margin-top:1rem}}@media (min-width:1200px){.container-main{grid-template-columns:minmax(0,1fr) minmax(0,2.5fr) minmax(0,20rem);grid-template-areas:"sidebar content toc"}.col-sidebar{display:contents}.page-menu{grid-area:toc;padding-left:1rem}.site-menu{grid-area:sidebar}.site-menu{margin-top:1rem 0}.page-menu,.site-menu{max-height:calc(100vh - 2rem - 42px);overflow:auto;position:sticky;top:42px}}:root{--light-hl-0:#6F42C1;--dark-hl-0:#B392F0;--light-hl-1:#24292E;--dark-hl-1:#E1E4E8;--light-hl-2:#032F62;--dark-hl-2:#9ECBFF;--light-hl-3:#D73A49;--dark-hl-3:#F97583;--light-hl-4:#6A737D;--dark-hl-4:#6A737D;--light-hl-5:#22863A;--dark-hl-5:#85E89D;--light-hl-6:#E36209;--dark-hl-6:#FFAB70;--light-hl-7:#005CC5;--dark-hl-7:#79B8FF;--light-code-background:#fff;--dark-code-background:#24292e}code{background:var(--code-background)}:root{--light-color-background-secondary:#fff;--dark-color-background:#1b1c1f;--dark-color-background-secondary:#36393f;--light-color-panel-divider:#dadce0;--dark-color-panel-divider:#47474d;--color-panel-divider:var(--light-color-panel-divider);--dark-color-text-aside:#8486b4}@media (prefers-color-scheme:light){:root{--light-color-background-secondary:#fff;--light-color-panel-divider:#dadce0;--color-panel-divider:var(--light-color-panel-divider)}}@media (prefers-color-scheme:dark){:root{--hl-0:var(--dark-hl-0);--hl-1:var(--dark-hl-1);--hl-2:var(--dark-hl-2);--hl-3:var(--dark-hl-3);--hl-4:var(--dark-hl-4);--hl-5:var(--dark-hl-5);--hl-6:var(--dark-hl-6);--hl-7:var(--dark-hl-7);--code-background:var(--dark-code-background)}:root{--dark-color-background:#1b1c1f;--dark-color-background-secondary:#36393f;--dark-color-panel-divider:#47474d;--color-panel-divider:var(--dark-color-panel-divider);--dark-color-text-aside:#8486b4}}body,html{font-family:Lexend,Manrope,"Century Gothic",sans-serif;font-weight:400}h1{font-weight:300;padding-bottom:.9rem}h2{font-weight:400;color:var(--color-ts)}h3{font-weight:500}h4{font-weight:500}code{border-radius:6px;border:1px solid}.container{max-width:1600px;margin-inline:auto}.container .col-content{max-width:800px;margin-inline:auto}header.tsd-page-toolbar{border-bottom:1px solid var(--color-panel-divider)}.tsd-breadcrumb{padding-block-start:0.5rem}.tsd-typography p{line-height:1.85em;font-weight:300}.tsd-navigation{padding-inline-end:0.25rem}.tsd-accordion-details{padding-inline-start:1.35rem}.container-main{--mask-image:linear-gradient(0deg, transparent 0%, white 2%, white 50%, white 98%, transparent 100%)}@media (min-width:769px){.container-main{grid-template-columns:minmax(0,15rem) minmax(0,2.5fr)}.col-sidebar{border-right:1px solid var(--color-panel-divider);mask-image:var(--mask-image);-webkit-mask-image:var(--mask-image);padding-block:1rem}}@media (min-width:1200px){.container-main{grid-template-columns:minmax(0,18rem) minmax(0,2.5fr) minmax(0,15.5rem)}.page-menu{border-left:1px solid var(--color-panel-divider)}.site-menu{border-right:1px solid var(--color-panel-divider);mask-image:var(--mask-image);-webkit-mask-image:var(--mask-image);padding-block:1rem}}.tsd-accordion-details ul{padding-left:1rem}.tsd-accordion-details>ul{padding-left:0}.tsd-navigation a.current{border-radius:.45rem;padding-block:0.3rem;padding-inline:0.3rem}.tsd-widget.search:after{content:"\f690"}.tsd-widget.menu{position:relative;height:40px;vertical-align:bottom}.tsd-widget.menu:after{content:"\f561"}
Optional
opts: WorkerOptionsThe actual worker that is used, depending on browser support it can be either a SharedWorker
or a normal Worker
.
Is an EventListener that is called whenever an ErrorEvent of type error event occurs.
An EventListener called when MessageEvent of type message is fired on the port—that is, when the port receives a message.
An EventListener called when a MessageEvent of type MessageError is fired—that is, when it receives a message that cannot be deserialized.
Returns a MessagePort object used to communicate with and control the shared worker.
Registers an event handler of a specific event type on the EventTarget
Optional
options: boolean | AddEventListenerOptionsOptional
options: boolean | AddEventListenerOptionsOptional
options: boolean | AddEventListenerOptionsDispatches an event to this EventTarget.
Removes an event listener from the EventTarget.
Optional
options: boolean | EventListenerOptionsOptional
options: boolean | EventListenerOptionsOptional
options: boolean | EventListenerOptionsGenerated using TypeDoc
A polyfill class for
SharedWorker
, it accepts a URL/string as well as any other options the spec. allows forSharedWorker
. It supports all the same methods and properties as the original, except it adds compatibility methods and properties for older browsers that don't supportSharedWorker
, so, it can switch to normalWorkers
instead.