Transferable
interface represents an object that can be transfered between different execution contexts, like the main thread and Web workers.
This is an abstract interface and there is no object of this type. This interface does not define any method or property; it is merely a tag indicating objects that can be used in specific conditions, such as being transfered to a
Worker
使用
Worker.postMessage()
方法。
注意:
Transferable
interface technically no longer exists. The
functionality
of
Transferable
objects still exists, however, but is implemented at a more fundamental level (technically speaking, using the
[Transferable]
WebIDL
extended attribute).
ArrayBuffer
,
MessagePort
,
ImageBitmap
and
OffscreenCanvas
types implement this interface.
Transferable
interface does not implement or inherit specific properties.
Transferable
interface does not implement or inherit specific properties.
| 规范 | 状态 | 注释 |
|---|---|---|
|
HTML 实时标准
The definition of 'Transferable' in that specification. |
实时标准 |
Replaced
Transferable
interface with
[Transferable]
Web IDL extended attribute.
|
|
HTML5
The definition of 'Transferable' in that specification. |
推荐 | 初始定义。 |
| 桌面 | 移动 | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
Transferable
|
Chrome Yes | Edge 12 | Firefox 4 |
IE
10
注意事项
|
Opera Yes | Safari Yes | WebView Android Yes | Chrome Android Yes | Firefox Android 4 | Opera Android Yes | Safari iOS Yes | Samsung Internet Android Yes |
完整支持
见实现注意事项。
ArrayBuffer
,
MessagePort
,
ImageBitmap
.
Transferable
AbortController
AbortSignal
AbstractRange
Attr
ByteString
CDATASection
CSSPrimitiveValue
CSSValue
CSSValueList
CharacterData
ChildNode
注释
CustomEvent
DOMConfiguration
DOMError
DOMErrorHandler
DOMException
DOMImplementation
DOMImplementationList
DOMImplementationRegistry
DOMImplementationSource
DOMLocator
DOMObject
DOMParser
DOMPoint
DOMPointInit
DOMPointReadOnly
DOMRect
DOMString
DOMTimeStamp
DOMTokenList
DOMUserData
Document
DocumentFragment
DocumentType
元素
ElementTraversal
Entity
EntityReference
事件
EventTarget
HTMLCollection
MutationObserver
节点
NodeFilter
NodeIterator
NodeList
NonDocumentTypeChildNode
ProcessingInstruction
PromiseResolver
范围
StaticRange
文本
TextDecoder
TextEncoder
TimeRanges
TreeWalker
TypeInfo
USVString
UserDataHandler
XMLDocument