構造化クローン

構造化クローン (JavaScript)

[13] 構造化 (こうぞうか) クローン (structured clone) は、 JavaScript/DOM オブジェクト深い複製操作です。

[83] 長らく定義されていた「構造化クローン」演算は、 分割されて仕様書上の規定たる概念としては消滅しました。 しかし馴染みがありわかりやすいためか、 廃止後も仕様開発の現場では使われ続けているようですし、 現在も HTML Standard 仕様書中の注記には歴史的経緯として記載が残っています >>12

仕様書

言語

[37]

文脈

[16] 構造化クローンする場面

歴史

[1] Structured clones ( (Anne van Kesteren 著, 版)) http://lists.w3.org/Archives/Public/public-script-coord/2013AprJun/0024.html

[2] dslomov-chromium/ecmascript-structured-clone · GitHub ( 版) https://github.com/dslomov-chromium/ecmascript-structured-clone

[3] IRC logs: freenode / #whatwg / 20131021 ( ( 版)) http://krijnhoetmer.nl/irc-logs/whatwg/20131021

[4] Web Applications 1.0 r8310 Prevent dead Blobs and Files from being cloned ( ( 版)) http://html5.org/tools/web-apps-tracker?from=8309&to=8310

[5] チェンジセット 155008 – WebKit ( ( 版)) http://trac.webkit.org/changeset/155008

[6] Bug 23892 – Add Map and Set to the Structured Clone algorithm somehow ( ( 版)) https://www.w3.org/Bugs/Public/show_bug.cgi?id=23892

[7] dslomov-chromium/ecmascript-structured-clone ( ( 版)) https://github.com/dslomov-chromium/ecmascript-structured-clone

[8] Web Applications 1.0 r8374 Define structured cloning for Map and Set ( ( 版)) http://html5.org/tools/web-apps-tracker?from=8373&to=8374

[9] Typed Array Specification ( ( 版)) https://www.khronos.org/registry/typedarray/specs/latest/#CLONING_AND_TRANSFERRING

[10] Add structured cloning as open issue · 2f694f0 · whatwg/fetch ( ( 版)) https://github.com/whatwg/fetch/commit/2f694f00345b7d08123d1d03f020b9bd1bcf2ab8

[11] Bug 21652 – Should structured clone support FormData? ( ( 版)) https://www.w3.org/Bugs/Public/show_bug.cgi?id=21652

[14] The structured clone algorithm - Web developer guide | MDN ( ( 版)) https://developer.mozilla.org/en-US/docs/Web/Guide/API/DOM/The_structured_clone_algorithm

[15] Re: Exposing structured clone as an API? (Anne van Kesteren 著, 版) https://lists.w3.org/Archives/Public/public-webapps/2015AprJun/0257.html

[17] More precisely specify property creation during structured clone · whatwg/html@36073fc ( 版) https://github.com/whatwg/html/commit/36073fc2f36851dbf855ac49017a5829cd77ac7a

[18] Avoid side-effects when cloning Maps and Sets · whatwg/html@367707a ( 版) https://github.com/whatwg/html/commit/367707af5cd76864be9224e4b5a769fbf44fed96

[19] Fixes and simplification in Map/Set cloning · whatwg/html@6275b07 ( 版) https://github.com/whatwg/html/commit/6275b07ad4ed95a17708d8091ea227f3ab6c9aa5

[20] IRC logs: freenode / #whatwg / 20150917 ( 版) http://krijnhoetmer.nl/irc-logs/whatwg/20150917

[21] Move structured cloning out from under Common DOM Interfaces · whatwg/html@e09b782 ( 版) https://github.com/whatwg/html/commit/e09b7824480ffc9df69b0d830c4b8adad3b000d1

[22] Write structured clone algorithm in terms of ECMAScript · whatwg/html@bfb960c ( 版) https://github.com/whatwg/html/commit/bfb960c938580c95e77365e614218b952f96375b

[23] Fix enumerability checking in StructuredClone · whatwg/html@c681eb6 ( 版) https://github.com/whatwg/html/commit/c681eb6cc1ca3c61f225aac268c34d7206ec1e7f

[24] Only clone own properties of ordinary objects and arrays · whatwg/html@31ef428 ( 版) https://github.com/whatwg/html/commit/31ef4285935eb22516fc054c42db6a0dc36d580b

[25] Make StructuredClone throw if an object is not explicitly cloneable · whatwg/html@32e3822 ( 版) https://github.com/whatwg/html/commit/32e3822b17be39ad2d6dea96f5c5a6b88cd5c47a

[26] Fix #101: always strip U+0009, U+000A, and U+000D · whatwg/url@7b40216 ( 版) https://github.com/whatwg/url/commit/7b40216f809c7fe3c9a1680b5c1b06a771c9ebd8

[27] Collect enumerable keys first when cloning ordinary objects · whatwg/html@679acd0 ( 版) https://github.com/whatwg/html/commit/679acd0c723c77ba636b5aa17042ae6204c69cc1

[28] 28389 – Allow error objects to be structured-clonable ( 版) https://www.w3.org/Bugs/Public/show_bug.cgi?id=28389

[29] 26383 – Structure clones: Should cloned key/values be mutable after cloning? ( 版) https://www.w3.org/Bugs/Public/show_bug.cgi?id=26383

[30] Add a section on performing structured clones from other specifications (domenic著, ) https://github.com/whatwg/html/commit/21d5b5ce69f3e5e0f0641659d426d7b005eefc66

[31] Editorial: remove structured cloning section (annevk著, ) https://github.com/whatwg/fetch/commit/3dc1612fce7ab38673854d0bf26a4e118e52f077

[32] Clarify why we're not using EnumerableOwnProperties (domenic著, ) https://github.com/whatwg/html/commit/fbe5cfef8c439ed81dc47011db0110a3ba4ab53a

[33] Integrate SharedArrayBuffers · Issue #2260 · whatwg/html () https://github.com/whatwg/html/issues/2260

[34] Use StructuredClone() hook (Resolves #135) (inexorabletash著, ) https://github.com/w3c/IndexedDB/commit/4ccf4371e3e1a32a6f3ab1606605e71a8f4f8334

[35] API Concerns with Structured Clone for Wasm Modules · Issue #972 · WebAssembly/design () https://github.com/WebAssembly/design/issues/972

[36] Breaking: refactor structured clone into serialize/deserialize (domenic著, ) https://github.com/whatwg/html/commit/97d644c97335956610a31e8ad98d1a388c063e84

[38] Structured clone architecture significantly changed (Domenic Denicola著, ) https://lists.w3.org/Archives/Public/public-script-coord/2017JanMar/0025.html

[39] Editorial: URL parsing relies on Blob URL Store lookup (annevk著, ) https://github.com/whatwg/html/commit/a0a23b96872a81e224c80881e71d58d8326e472e

[40] Remove StructuredClone call (annevk著, ) https://github.com/whatwg/url/commit/9f1c19dfc90f99b7d4f214ae0234df89689b306e

[41] Use HTML's concepts of serializing and deserializing objects (annevk著, ) https://github.com/whatwg/notifications/commit/8eaabd2b6148696342ecb9427d0d882ed23884bb

[42] Update for changes to HTML's structured cloning/transferring (domenic著, ) https://github.com/whatwg/streams/commit/480b2a364e7f2d2532befed032f597719d05cfa5

[43] Deserialize typed array objects in targetRealm as well (annevk著, ) https://github.com/whatwg/html/commit/d5f63d26ce4b272257696d0da10788a62ecd16e4

[44] Define messageerror (annevk著, ) https://github.com/whatwg/html/commit/25a94f606e983534a863a0559d65bd29bb940a02

[45] Define messageerror (annevk著, ) https://github.com/whatwg/html/commit/25a94f606e983534a863a0559d65bd29bb940a02

[46] Serializing and deserializing SharedArrayBuffer (annevk著, ) https://github.com/whatwg/html/commit/b3f8779c76de7718bc970fdbccda18a5164d2f98

[47] Use StructuredSerializeForStorage (annevk著, ) https://github.com/whatwg/notifications/commit/8323d18ede1f7cfddd34b4260dd8408b16807ddd

[48] [geometry] Define serialize/deserialize steps (zcorpan著, ) https://github.com/w3c/fxtf-drafts/commit/582844c27b009c1144d5d47676c0dcd54182983b

[49] Correct variable names in serialize and deserialize sections (annevk著, ) https://github.com/whatwg/html/commit/48c6b1f5823b2a336fa753f956a28196e0115f03

[50] [geometry] Do not structured serialize -0 for m13 of a 2d matrix (zcorpan著, ) https://github.com/w3c/fxtf-drafts/commit/bc125ded1bc101144646000a38655053bdc58199

[51] Add serialization and deserialization steps to Blob/File/FileList int… (mkruisselbrink著, ) https://github.com/w3c/FileAPI/commit/828c3b6a44195298790b32507c40163703d5ba3e

[52] Add serialization and deserialization steps to Blob/File/FileList int… (mkruisselbrink著, ) https://github.com/w3c/FileAPI/commit/828c3b6a44195298790b32507c40163703d5ba3e

[53] Define cloning of Blob and FileList objects inline · Issue #32 · w3c/FileAPI () https://github.com/w3c/FileAPI/issues/32

[54] Remove FileAPI monkey-patch (mkruisselbrink著, ) https://github.com/whatwg/html/commit/766dcd3b73b9639aad9bbc8529741f7d516f00d7

[55] Remove FileAPI monkey-patch. by mkruisselbrink · Pull Request #3071 · whatwg/html () https://github.com/whatwg/html/pull/3071

[56] Uint8ClampedArray does not have a [[Detached]] internal slot (annevk著, ) https://github.com/whatwg/html/commit/29d83435dac041e56f0f4d7076edfd6f2afadd4b

[57] Fix StructuredDeserializeWithTransfer() (annevk著, ) https://github.com/whatwg/html/commit/1fcbe87de45952104b74ac639b9802fa6fd4a338

[58] Fix StructuredDeserializeWithTransfer() by annevk · Pull Request #3437 · whatwg/html () https://github.com/whatwg/html/pull/3437

[59] Permit structured serialization of BigInt (littledan著, ) https://github.com/whatwg/html/commit/01bc5df44d6db653451e18f7b9d32827a808db18

[60] Normative: Permit serialization of BigInt by littledan · Pull Request #3480 · whatwg/html () https://github.com/whatwg/html/pull/3480

[61] will major browsers support native IndexedDb sorting for BigInt? or will users need to custom-serialize it themselves in sortable form? · Issue #123 · tc39/proposal-bigint () https://github.com/tc39/proposal-bigint/issues/123

[62] Duplicates in StructuredSerializeWithTransfer's transferList (annevk著, ) https://github.com/whatwg/html/commit/869d4512e8eca0b144e8f3b2a61389635a16f662

[63] Duplicates in transferList for structured cloning · Issue #3507 · whatwg/html () https://github.com/whatwg/html/issues/3507

[64] No duplicates in StructuredSerializeWithTransfer's transferList by annevk · Pull Request #3508 · whatwg/html () https://github.com/whatwg/html/pull/3508

[65] Check for transferable detachedness after serializing (annevk著, ) https://github.com/whatwg/html/commit/233d984d09f288643cefd704fa70221eacd50a67

[66] Check for transferable detachedness after serializing by annevk · Pull Request #3557 · whatwg/html () https://github.com/whatwg/html/pull/3557

[67] Merge pull request #1810 from stefhak/struct_serialize (aboba著, ) https://github.com/w3c/webrtc-pc/commit/7ab932b20c6d533ca057191aa0777ae4a9354bce

[68] Update structured cloning for recent changes to HTML by stefhak · Pull Request #1810 · w3c/webrtc-pc () https://github.com/w3c/webrtc-pc/pull/1810

[69] Update for structured cloning changes in HTML · Issue #1089 · w3c/webrtc-pc () https://github.com/w3c/webrtc-pc/issues/1089

[70] Update structured cloning for recent changes to HTML by domenic · Pull Request #1108 · w3c/webrtc-pc () https://github.com/w3c/webrtc-pc/pull/1108

[71] revert PR#1108 by fluffy · Pull Request #1171 · w3c/webrtc-pc () https://github.com/w3c/webrtc-pc/pull/1171

[72] Fix reference to transfer[-receiving] steps (littledan著, ) https://github.com/whatwg/html/commit/0e61f50557e6e97d6f1260836f86b2c87b68af0f

[73] Editorial: Fix reference to transfer[-receiving] steps by littledan · Pull Request #4201 · whatwg/html () https://github.com/whatwg/html/pull/4201

[74] Define serialization and deserialization steps for errors (yutakahirano, , ) https://github.com/whatwg/html/commit/af9f08794fc97d442f8a25c5eeac9f9f70aea498

[75] Mark DOMException as serializable by yutakahirano · Pull Request #732 · heycam/webidl () https://github.com/heycam/webidl/pull/732

[76] Allow structured cloning of native error types · Issue #4268 · whatwg/html () https://github.com/whatwg/html/issues/4268

[77] Structured cloning of errors · Issue #165 · mozilla/standards-positions () https://github.com/mozilla/standards-positions/issues/165

[78] 28389 – Allow error objects to be structured-clonable (, ) https://www.w3.org/Bugs/Public/show_bug.cgi?id=28389

[79] Define serialization and deserialization steps for Error by yutakahirano · Pull Request #4665 · whatwg/html () https://github.com/whatwg/html/pull/4665

[80] Make DOMException serializable (yutakahirano, , ) https://github.com/heycam/webidl/commit/f23ef42038a1d6af6ba19806c8246673711ee7ca

[81] Define serialization and deserialization steps for DOMException · Issue #729 · heycam/webidl () https://github.com/heycam/webidl/issues/729

[82] Mark DOMException as serializable by yutakahirano · Pull Request #732 · heycam/webidl () https://github.com/heycam/webidl/pull/732