/
githubmirror
/
node
Обзор
Документация
Войти
/
githubmirror
/
node
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
lib/internal/test/transfer.js
41 строка
732 B
Chengzhong Wu
src: distinguish HTML transferable and cloneable
07 июл 2023, 20:00
Не верифицирован
07 июл 2023, 20:00
38dee8a
Код
Авторство
О чём код?
'use strict'; const { markTransferMode, kClone, kDeserialize, } = require('internal/worker/js_transferable'); process.emitWarning( 'These APIs are for internal testing only. Do not use them.', 'internal/test/transfer'); // Used as part of parallel/test-messaging-maketransferable. // This has to exist within the lib/internal/ path in order // for deserialization to work. class E { constructor(b) { this.b = b; } } class F extends E { constructor(b) { super(b); markTransferMode(this, true, false); } [kClone]() { return { data: { b: this.b }, deserializeInfo: 'internal/test/transfer:F', }; } [kDeserialize]({ b }) { this.b = b; } } module.exports = { E, F };