Transferable - Web APIs 编辑
The 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
using the Worker.postMessage()
method.
Note: The 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).
The ArrayBuffer
, MessagePort
, ImageBitmap
and OffscreenCanvas
types implement this interface.
Properties
The Transferable
interface does not implement or inherit specific properties.
Methods
The Transferable
interface does not implement or inherit specific properties.
Specifications
Specification | Status | Comment |
---|---|---|
HTML Living Standard The definition of 'Transferable' in that specification. | Living Standard | Replaced Transferable interface with [Transferable] Web IDL extended attribute. |
HTML5 The definition of 'Transferable' in that specification. | Recommendation | Initial definition. |
Browser compatibility
BCD tables only load in the browser
See also
- Interfaces implementing it:
ArrayBuffer
,MessagePort
,ImageBitmap
.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论