diff --git a/WebIDL-ja.html b/WebIDL-ja.html index 209af7adb..069469c53 100644 --- a/WebIDL-ja.html +++ b/WebIDL-ja.html @@ -401,7 +401,7 @@ promise_T:Promise<T> sequence_T:sequence<T> FrozenArray_T:FrozenArray<T> - +toJSON: toJSON varT:T iterator0:@@iterator Promise_resolve:%Promise_resolve% @@ -441,7 +441,6 @@ 原型鎖:prototype chain::::プロトタイプチェイン tok:token:::トークン -optional::::オプション 随意:optional::::オプショナル 随意の:optional::::オプショナル 随意~引数 @@ -449,6 +448,7 @@ 省略可:optional::~ 必須:required::~ 必須の:required::~ + ~~不可欠:required to 必須:non-optional 引数:argument:~ 引数個数:argument count:~ @@ -521,11 +521,10 @@ descriptor::::記述子:デスクリプタ field::::フィールド instance::::インスタンス -host::::ホスト nullable: -null: view:::::ビュー class:::::クラス +JSON: 可 null 多重定義:overload::~::オーバーロード 有効:effective:~ @@ -541,6 +540,8 @@ platform:::::プラットフォーム 予約済み:reserved:~ 予約済みの:reserved:~ +予約-:reserve:~ +識別-:identify::~ 識別子:identifier::~ 構築子:constructor:::~:コンストラクタ 取得子:getter:::~:ゲッタ @@ -554,15 +555,9 @@ 旧来:legacy:::~ 旧来の:legacy:::~ LegacyWindowAlias:legacy window alias -直列化-:serialize:::~:シリアライズ -直列化子:serializer:::~:シリアライザ -直列化:serialization:::~:シリアル化 - シリアライゼーション -直列形の:serialized:::~:シリアル形の - 直列化された形:serialized form -直列化可能:serializable:::~:シリアライズ可能 map:::::マップ set:::::セット +stack:::::スタック slot:::::スロット buffer:::::バッファ source:::::ソース @@ -611,7 +606,6 @@ 真偽:boolean::~ 自前の:own::~ native:::::ネイティブ -flag:::::フラグ 大域:global:::~:グローバル 環境:environment:~ 大域環境:global environment:global 環境:~::グローバル環境 @@ -645,9 +639,8 @@ error::::エラー script::::スクリプト -stack::::スタック trace::::トレース -snapshot::::スナップショット +stack-trace:stack trace:::スタックトレース scope::::スコープ octet::::オクテット @@ -659,7 +652,6 @@ realm: configurable: typedef: -valuetype: completion: 普通の:ordinary::~ @@ -667,10 +659,10 @@ 保安的:secure::~:セキュア 保安的でない:insecure 符号位置:code point::~::コードポイント -注釈文:prose:~:::プローズ +注釈文:prose::~::プローズ 隠蔽:shadow:~ 言語:language:~ -合致:match:~:::マッチ +合致:match::~::マッチ 日付時刻:time:~ 時刻:time:~ 変数:variable:~ @@ -681,22 +673,15 @@ entry::::エントリ item::::アイテム 項目/一員 -識別-:identify:~ -宣言:declaration:~ -宣言-:declare:~ 長さ:length:~ writable::書き込み可能 妥当:valid:~ invalid -解決:resolution:~:::レゾリューション -解決-:resolve:~:::リゾルブ -実装:implementation:~ -実装-:implement:~ -実装者:implementor:~ +宣言:declaration::~ +宣言-:declare::~ +解決:resolution::~::レゾリューション +解決-:resolve::~::リゾルブ 伝播-:propagate:~ -適合:conforming:~ -適合性:conformance:~ -test-suite:test suite:::テスト一式:テストスイート 初期:initial:~ 要素:element:~ 範囲:range:~ @@ -706,7 +691,7 @@ 文脈:context::~ 評価-:evaluate:~ 等価:equivalent:~ -構文:syntax:~:::シンタックス +構文:syntax::~::シンタックス 特徴:characteristics:~ 文法:grammar:~:::グラマー @@ -742,9 +727,6 @@ 既存の:existing:~ 空:empty:~ 空の:empty:~ -指定-:specify:~ -所与の:given:与えられた - 設定群:settings:~ ●動詞 @@ -774,8 +756,9 @@ 除去-:remove:~ 付加-:append:~ 追加-:add:~ +追加:addition:~ 追加の:additional:~ - 追加で +追加で:additional に:~ 試み:attempt:~ 試みて:attempt して:~ 試みる:attempt する:~ @@ -829,8 +812,9 @@ 用いる:use する:~ 用いら:use さ:~ 用いて:use して:~ + 利用~中:in use + 用法:usage 存在-:exist:~ - 存在t-:present:存在 在する:present する:在る 存在t:presence:存在 不在:not present:~ @@ -885,13 +869,10 @@ 見出せ:find でき:~ 転送-:forward:~ 準備-:prepare:~ - -代理:proxy:~ -抽象:abstract:~ - 抽象~演算 -抽象的:abstract:~ -仮数:significand:~ -偶数:even:~ +収集-:collect:~ + 転換-:turn into +pop: +push: ●仕様 Web: @@ -899,10 +880,9 @@ 特色機能:feature::~::フィーチャ 仕様:spec:~ 省略符号:ellipsis:~ -特有:-specific:ごとに固有 -特有の:specific な:固有の +特有に:-specific:ごとに特有に +特有の:specific な:~ 特定の:specific な:~ -固有の:specific:~ 文書:document:~ 暗黙的:implicit:~ 明示的:explicit:~ @@ -912,6 +892,7 @@ 相互運用性:interoperability:~ level:::レベル 互換性:compatibility:~ +互換:compatible:~ 技術報告:technical reports:~ 独立:independent:~ 通用する:agnostic な:~ @@ -919,8 +900,9 @@ mailing-list:mailing list::メーリングリスト bug:::バグ リンク:link:~ -規定:normative:~ -参考:informative:~ +規範的:normative:~ +規範:normative:~ + 参考:informative:~ 詳細:details:~ 意味論:semantics:~:::セマンティクス 判定基準:criteria:~ @@ -930,6 +912,7 @@ 手続き:action 系列:variety:~ 便宜性:facility:~ + 便宜:convenience 実質的:effective:~ 実質的:In effect, 共通の:common:~ @@ -951,8 +934,10 @@ 特定0の:particular:ある特定の 概して:typical に:~ 誤った:wrong + 誤った:erroneous 勧める:suggest する:~ 一貫する:consistent になる:~ + 終始:consistently 能:ability:~ 通常通り:as normal に:通常どおり 仕方:way:~ @@ -996,12 +981,78 @@ 人為的:artificial:~ 理由:reason:~ 手引き:guide:~ +クラス:class::~ +事例:case:~ +相応しく:suitableに:~ + よく見れば:The astute reader may よく似ている:very similar 少しばかり/もう少し:slightly 代替:alternative:~ + ~~理由:because + 用語例 + 用途:purpose/ + 目的:purpose + 通常:regular/Fine/ + 通常の: normal な:~ + 通常のようにnormally + 可能 + 必要 + 不要 + 候補:possible + 側面:aspect + 通例:usually/usual + 通例の: + 具体的な:concrete:~ + 分類:categories/ + ~~問題ない:Fine; + 問題:matter + 孕まれる問題:problematic + 方法:how + 手段:means:~ + ~~概念:notion:~ 1 + 概略的:Informally + 用例:examples of + 編集を補助する:editorial aide + 編集者:editor + 編集者草案:editor’s draft + 草案:draft:~ + ~~自動的:no need to also + ~~確認:checked to ensure + 表記: + 表記規約:typographic convention:~ + 記述例:example + 謝意 + 謝辞:acknowledgements + 因る:due to + 有意になる:has significance + ~~例外 + 何故 + 参照文献 + 参考例 + 図式:diagram + 基礎的 + 意図的:deliberate + -:be true + 手法:methods + 把握:unaware + 容易く:easily + 休み:unavailable to do so + もまた,:By extension, + 対照的に:In contrast + -:terminology + 場合分: 2 + 増補:grow + 明白:clear + 明確には:Specifically ●仕様(動詞 +指定-:specify:~ +実装:implementation:~ +実装-:implement:~ +実装者:implementor:~ +適合:conforming:~ +適合性:conformance:~ 言明-:state:~ 予期-:expect:~ 期待-:expect:~ @@ -1066,16 +1117,16 @@ 説明:explanation/description:~ 遂行-:perform:~ 保全-:preserve:~ -決断:decision:~ +決める:decide する:~ + decision 見なさ:consider さ:~ 考える:consider する:~ - 考慮に入れ:consider +考慮-:consider:~ 見做す:assume する:~ 見做さ:assume さ:~ 計画-:plan 発行-:publish:~ 確保-:ensure:~ - 気付く:notice 奨励-:encourage:~ しないことが奨励:discourage:~ 否認-:deny:~ @@ -1084,6 +1135,41 @@ 単純化-:simplify:~ 言及-:mention:~ 望ましくない:undesirable + 注記:note:~ + 警告:warning:~ + 課題:issue:~ + 気付く/注意:notice + 注意:Note that + 取り組まれ:address され + 出荷-:ship + 惑わす:confusing + ~~特別な:discriminated + 保守-:maintain + 表出: + 表現力:expressiveness:~ + 見受: + 見通: + 解消: + ~~調整を通す:coordinate + 意味:mean/meaning + ~~意味がある:it makes sense + 集約 + 極力~避ける:strongly discouraged + 混同:looking like + ~~意図的に:deliberate + ~~提出:file + ~~入力にとる:take + ~~入力の:incoming + 順繰りに挙げ:loop through + + 交換可能に:interchangeably + 強調-:highlight + 予測し得ない:unpredictable + 細心の注意を払う必要がある:Extreme care must be taken + 見つけ易くする:help 〜 look for + 付与:mark/ + 感謝 + ~~寄与:adhere/contributing ●未分類(動詞 変異:mutation::~ @@ -1099,6 +1185,8 @@ 順序付けら:order さ:~ 有順序:ordered:~ 全順序:total order:~ + 昇順 + 降順 実行:execution:~ 実行-:execute:~ 実行-可能:executable @@ -1127,9 +1215,65 @@ 共有-:share:~ 見よ:see 生じ:occur - +中止-:abort:~ +動作:action:~ +操作-:manipulate:~ +操作:manipulation:~ +整列-:sort:~ +検出-:detect:~ + detection + 供され:supplied + 置く:place + 前に〜を置く:precede + 対応-:correspond:~ + 対応付ける:map する:~/correspond + 合格-:pass:~ + 遭遇-:encounter:~ + 選択-:choose + 重複:duplicates + 開始:start + 関係: + 関係無い:unrelated + なくする:prevent + listed in 〜/ + 含む:include + 指す:refer + 指す:address + 束ねる:bundle する + 用いられる:trigger する + 表す:denote + 包含-:contain + 挿入-:insert + 出自に:originate + 実現:done + 変形-: + 導入: + 応答:responding + 併用:declared with/ + ~~併合:mixed + ~~供給-:- + ~~区別-:- + 行われ:carry out + ●未分類 +代理:proxy:~ +抽象:abstract:~ + 抽象~演算 +仮数:significand:~ +偶数:even:~ + Unicode: +UTF-16: +protocol:::プロトコル +binary:::バイナリ +network:::ネットワーク +transaction:::トランザクション +database:::データベース +mode:::モード +polyfill: +mixin: +mix-in:mix in +font::::フォント singleton: 最小:shortest series @@ -1164,13 +1308,10 @@ browser:::ブラウザ clone:::クローン 主thread:main thread::メインスレッド -テスト:testing::~ project::::プロジェクト node:::ノード graph:::グラフ parameter:::パラメタ -hook:::フック -クラス:class::~ page:::ページ text:::テキスト event-handler:event handler:::イベントハンドラ @@ -1191,27 +1332,6 @@ 不可視:invisible:~ 可視:visible:~ -現在の:current:~ -現在:currently:~ - 最初の:first - 最後の:last:~ - 個目:first/second/third:~ - 結果:result:~ - 注記:note:~ - 警告:warning:~ - 課題:issue:~ - - - ●低頻度 -protocol:::プロトコル -binary:::バイナリ -network:::ネットワーク -transaction:::トランザクション -database:::データベース -mode:::モード -polyfill: -mixin: -mix-in:mix in 非同期:asynchronous:~ 同一性:identity:~ 実体:entity:~ @@ -1224,13 +1344,13 @@ 記憶域:memory::~::メモリ 木:tree::~::ツリー 下層の:undelying:~ - 節:section:~ - 一覧:table:~ + 節:section + 下位~節:sub-section + 一覧:table 内容:contents:~ 匿名:anonymous:~ 数学的:mathematical:~ 数学的実数:mathematical real number:~ -hyphen:::ハイフン 連続的な:contiguous:~ 平方根:square root:~ 内側:inside:~ @@ -1238,9 +1358,104 @@ 単語:word:~ 命名法:naming scheme:~ 本体:body:~ - 関連する:relevant な:~ -font::::フォント + + ●指示語 +所与の:given:与えられた +現在の:current:~ +現在:currently:~ + 最初の:first + 最後の:last:~ + 個目:first/second/third:~ + 結果:result:~ + この:this + その:that + 各:each + 別の:another + そのような:such + など:such as + 直後: + 種別: + 多少: + 種: + 項: + 合間: + 余分: + 個 + 個別: + 全体: + 前回: + 前段: + 前述: + 前項: + 既知の:known + 未知の:unknown + 最低:lowest + 最新の:latest + 最終的: + 最良: + 最長:longest + 次項: + 唯一の:only + 常に:always + 同じ:the same + 後続: + 同様: + 自身: + 複数: + 以上 + 以下 + 以外 + 任意: + 場合: + 部分: + 最大: + 最小: + 類似: + 片方 + 他方 + 一方 + 両者 + 両方 + 両方同時 + 一連 + 一部 + 広義 + 時点 + 末尾 + 後者: + 前者: + 末端:most-derived/ + 先頭 + 下端: + 右側:right-hand side/right + 左側:left-hand side/left + 場所: + 個数: + 一定の/ある種の:certain + 一環:as part of + 一種: + 上述: + 一時的: + 今度:this time + 上限: + 中心: + 即時:immediately + 以前: + 同時: + 周囲: + 左右: + 広範囲:wide + 類:category + 数~段~先:subsequently + 不定:indeterminate + 冒頭: + 頭部: + 最終的:eventual + 一例: + ~~唯一の:sole + もっぱら:solely + 代わりに:instead @@ -1286,6 +1501,7 @@ A.IntegerPart:#abstract-opdef-integerpart A.ConvertToInt:#abstract-opdef-converttoint + A.json.stringify:~TC39#sec-json.stringify 引数をとらない:#dfn-xattr-no-arguments @@ -1399,15 +1615,16 @@ ~platform~obj:#dfn-platform-object 旧来の~platform~obj:#dfn-legacy-platform-object +~JSON型:#dfn-json-types +既定の~toJSON演算:#default-tojson-operation +下層の値を取得-:#get-the-underlying-value +対応する既定の演算:#corresponding-default-operation +継承~stackを作成-:#create-an-inheritance-stack +属性~値を収集-:#collect-attribute-values + 読専:#dfn-read-only 正則~属性:#dfn-regular-attribute 正則~演算:#dfn-regular-operation -直列化可能な型:#dfn-serializable-type -直列化~pattern:#dfn-serialization-pattern -直列化-時の挙動:#dfn-serialization-behavior -直列形の値:#dfn-serialized-value -直列形の値に変換-:#dfn-convert-to-serialized-value -直列化子:#dfn-serializer 設定子:#dfn-setter 特殊~keyword:#dfn-special-keyword 特殊~演算:#dfn-special-operation @@ -1559,7 +1776,6 @@ 有名~prop設定子を呼出す:#dfn-invoke-named-setter 有名~構築子:#dfn-named-constructor 演算~関数を作成-:#dfn-create-operation-function -seR.~JS値に変換-:#dfn-convert-serialized-value-to-ecmascript-value 配列~index~prop名:#dfn-array-index-property-name 利用者~objの属性~値を取得する:#get-a-user-objects-attribute-value @@ -1575,13 +1791,17 @@ ~list:~INFRA#list 付加-:~INFRA#list-append ~size:~INFRA#list-size +空:~INFRA#list-is-empty 集合:~INFRA#ordered-set set.付加-:~INFRA#set-append +~stack:~INFRA#stack +~pop:~INFRA#stack-pop +~push:~INFRA#stack-push ~EACH:~INFRA#list-iterate ~EACH:~INFRA#map-iterate ←:~INFRA#map-set - + ~set:~INFRA#map-set 大域~obj:~WAPI#concept-realm-global 関連する~Realm:~WAPI#concept-relevant-realm @@ -1615,6 +1835,7 @@ #idl-objects:~ifcを実装している~obj #idl-types:型 #idl-extended-attributes:拡張属性 +#idl-tojson-operation:~toJSON #idl-special-operations:特殊~演算 #idl-stringifiers:文字列化子 #idl-indexed-properties:有index~prop @@ -1638,7 +1859,6 @@ #es-constants:定数 #es-attributes:属性 #es-operations:演算 -#es-serializer:直列化子 #es-iterators:反復子に共通する挙動 #es-platform-objects:~ifcを実装している~platform~obj #es-legacy-platform-objects:旧来の~platform~obj @@ -1731,7 +1951,6 @@ "namespace" "partial" "required" -"serializer" "setlike" "setter" "static" @@ -1764,7 +1983,6 @@ ●InterfaceMember Const Operation -Serializer Stringifier StaticMember Iterable @@ -1891,30 +2109,6 @@ ReturnType OperationRest ";" -●Serializer -"serializer" SerializerRest - -●SerializerRest -OperationRest -"=" SerializationPattern ";" -";" - -●SerializationPattern -"{" SerializationPatternMap "}" -"[" SerializationPatternList "]" -identifier - -●SerializationPatternMap -"getter" -"inherit" Identifiers -identifier Identifiers -ε - -●SerializationPatternList -"getter" -identifier Identifiers -ε - ●Identifiers "," identifier Identifiers ε @@ -2542,7 +2736,7 @@

Web IDL (Second Edition) — 日本語訳

-更新: +更新: (公開:

@@ -2566,7 +2760,7 @@

Web IDL (Second Edition) — 日本語訳

W3C

Web IDL

-

2017 年 6 月 1 日付 W3C 編集者草案

+

2017 年 6 月 23 日付 W3C 編集者草案

このバージョン
@@ -2775,7 +2969,7 @@

2. ~ifc定義~言語

— それらは、その定義が,言語束縛において どう取扱われるかを制御する。 この仕様が定義する拡張属性の,どの言語束縛にも通用する部分については `idl-extended-attributes$sec -にて論じられ、~JS言語束縛~特有の部分については +にて論じられ、~JS言語束縛に特有の部分については `es-extended-attributes$sec にて論じられる。 ◎ @@ -3042,6 +3236,15 @@

2.1. 名前(識別子)

The identifier of any of the abovementioned IDL constructs must not be “constructor”, “toString”, or begin with a U+005F LOW LINE ("_") character. These are known as reserved identifiers.

+

+`識別子$ `toJSON^l は`予約済み識別子$ではないが、`idl-tojson-operation$secに述べるように,利用されるのは[ +~objを`~JSON型$に変換する`正則~演算$ +]に限られ~MUST。 +◎ +Although the “toJSON” identifier is not a reserved identifier, it must only be used for regular operations that convert objects to JSON types, as described in §2.2.3.1 toJSON. +

+ +

注記: 後の節にて、一部の特定0の構成子に対しては,識別子の名前に更なる制約が課され得る。 ◎ @@ -3376,7 +3579,7 @@

2.2. ~ifc

-仕様~策定者は、既存の~APIの要件の記述に不可欠な場合を除き,単独の`演算$のみを持つ`呼戻~ifc$を定義するべきでない。 +仕様~策定者は、既存の~APIの要件の記述に~~不可欠な場合を除き,単独の`演算$のみを持つ`呼戻~ifc$を定義するべきでない。 代わりに,`呼戻~関数$が利用されるべきである。 ◎ Specification authors should not define callback interfaces that have only a single operation, unless required to describe the requirements of existing APIs. Instead, a callback function should be used. @@ -4132,6 +4335,32 @@

2.2.2. 属性

If an attribute has no static keyword, then it declares a regular attribute. Otherwise, it declares a static attribute. Note that in addition to being interface members, read only regular attributes can be namespace members as well.

+
+

+所与の %~target 上で属性 %属性 の +`下層の値を取得-@ +するときは、次を走らす: +

+ +
    +
  1. +~IF[ +%属性 は`取得子を継承-$するように宣言されている +] +⇒ +%属性 ~SET 継承されている属性 +
  2. +
  3. +~RET +%属性 の取得子の記述に挙げられている動作を +— %~target ~NEQ ~NULL ならば %~target 上で — +遂行した結果 +
  4. +
+ +◎ +To get the underlying value of an attribute attr given a value target, return the result of performing the actions listed in the description of attr that occur on getting, or those listed in the description of the inherited attribute, if attr is declared to inherit its getter, on target if target is not null. +

`属性$の`識別子$は[ @@ -4265,8 +4494,7 @@

2.2.2. 属性

-実装が -`利用者~obj$上の`属性$の値の取得-または設定-を試みたときに(例えば 呼戻~objが実装に供されているとき),その試みによる~~結果,例外が投出される場合、他から指定されない限り,その例外は[ +実装が`利用者~obj$上の`属性$の値を取得-または設定しようと試みたときに(例えば 呼戻~objが実装に供されているとき),その試みによる~~結果,例外が投出される場合、他から指定されない限り,その例外は[ 実装からその属性への~accessを生じさせた,利用者~code ]まで伝播することになる。 同様に、属性の取得-により返される値を~IDL型の値に変換できない場合、それにより生じた例外も[ @@ -4352,14 +4580,13 @@

2.2.3. 演算

( `static^sym `OperationRest$g / `stringifier^sym `OperationRest$g / -`serializer^sym `OperationRest$g / `ReturnType$g `OperationRest$g / `SpecialOperation$g いずれかに合致)は、その~ifcを実装している~obj上で呼出せる挙動を定義する, `~ifc~mb$である。 演算には次の3つの種類がある: ◎ -An operation is an interface member (matching static OperationRest, stringifier OperationRest, serializer OperationRest, ReturnType OperationRest or SpecialOperation) that defines a behavior that can be invoked on objects implementing the interface. There are three kinds of operation: +An operation is an interface member (matching static OperationRest, stringifier OperationRest, ReturnType OperationRest or SpecialOperation) that defines a behavior that can be invoked on objects implementing the interface. There are three kinds of operation:

@@ -4779,7 +5006,7 @@

2.2.3. 演算

`DOMString$T
`列挙$ 型
-%S を UTF-16 符号化したものに対応する, 16 ~bit無符号~整数~符号単位(以下、単に +%S を~UTF-16符号化したものに対応する, 16 ~bit無符号~整数~符号単位(以下、単に `符号単位@ と記される)の並び。 ◎ @@ -4863,12 +5090,13 @@

2.2.3. 演算

演算には、次の拡張属性を適用できる: +`Default$x, `Exposed$x, `NewObject$x, `SecureContext$x, `Unforgeable$x ◎ -The following extended attributes are applicable to operations: [Exposed], [NewObject], [SecureContext], [Unforgeable]. +The following extended attributes are applicable to operations: [Default], [Exposed], [NewObject], [SecureContext], [Unforgeable].

@@ -4888,6 +5116,229 @@

2.2.3. 演算

ReturnType
+
+
2.2.3.1. ~toJSON
+ +

+`~ifc$は、それを実装する~objを`~JSON型$に変換する方法を,~toJSON`正則~演算$を宣言することにより指定する。 +◎ +By declaring a toJSON regular operation, an interface specifies how to convert the objects that implement it to JSON types. +

+ +

+~toJSON`正則~演算$は、この用法のために予約される。 +それは、 +0 個の引数をとり,`~JSON型$を返さ~MUST。 +◎ +The toJSON regular operation is reserved for this usage. It must take zero arguments and return a JSON type. +

+ +

+次に挙げる型が +`~JSON型@ +とされる: +◎ +The JSON types are: +

+ +
    +
  • +`実数~型$ +◎ +numeric types, +
  • +
  • +`boolean$T 型 +◎ +boolean, +
  • +
  • +`文字列~型$ +◎ +string types, +
  • +
  • +`~nullable型$のうち,その`内縁~型$は`~JSON型$であるもの +◎ +nullable types whose inner type is a JSON type, +
  • +
  • +`注釈付きの型$のうち,その`内縁~型$anOは`~JSON型$であるもの +◎ +annotated types whose inner type is a JSON type, +
  • +
  • +`共用体~型$のうち,その`~mb型$は`~JSON型$であるもの +◎ +union types whose member types are JSON types, +
  • +
  • +`連列~型$のうち,その~parameter化された型は`~JSON型$であるもの +◎ +sequence types whose parameterized type is a JSON type, +
  • +
  • +`凍結~配列~型$のうち,その~parameter化された型は`~JSON型$であるもの +◎ +frozen array types whose parameterized type is a JSON type, +
  • +
  • +`辞書$のうち,そのすべての`辞書~mb$は`~JSON型$であるもの +◎ +dictionaries where all of their members are JSON types, +
  • +
  • +`~record型$のうち,そのすべての`値$は`~JSON型$であるもの +◎ +records where all of their values are JSON types, +
  • +
  • +`object$T 型 +◎ +object, +
  • +
  • +`~ifc型$のうち,そのいずれかの[ +`被継承~ifc$/ `広義~帰結~ifc$ +]上で~toJSON演算が宣言されているもの +◎ +interface types that have a toJSON operation declared on themselves or one of their inherited or consequential interfaces. +
  • +
+ +

+言語束縛において~toJSON`正則~演算$を~obj上でどう可用にするか, および +`~JSON型$を~JSON文字列に正確にどう変換するかは、言語束縛~特有になる。 +◎ +How the toJSON regular operation is made available on an object in a language binding, and how exactly the JSON types are converted into a JSON string, is language binding specific. +

+ + +

注記: +~JS言語束縛においては、これは,~toJSON~methを公開することにより行われる +— この~methは、`~JSON型$を[ +`json.stringify$A 関数により~JSON文字列に転換できるような,~JS値 +]に変換して返す。 +加えて,~JS言語束縛においては、~toJSON演算は `Default$x `拡張属性$をとれる +— その事例では、代わりに `既定の~toJSON演算$が公開される。 +◎ +Note: In the ECMAScript language binding, this is done by exposing a toJSON method which returns the JSON type converted into an ECMAScript value that can be turned into a JSON string by the JSON.stringify function. Additionaly, in the ECMAScript language binding, the toJSON operation can take a [Default] extended attribute, in which case the default toJSON operation is exposed instead. +

+ +
+ +

+次の`~IDL片$は、~toJSON~methを持つような `Transaction^T ~ifcを定義する +— ~methは注釈文にて定義されることになる: +◎ +The following IDL fragment defines an interface Transaction that has a toJSON method defined in prose: +

+ + +
+interface Transaction {
+  readonly attribute DOMString from;
+  readonly attribute DOMString to;
+  readonly attribute double amount;
+  readonly attribute DOMString description;
+  readonly attribute unsigned long number;
+  TransactionJSON toJSON();
+};
+
+dictionary TransactionJSON {
+  Account from;
+  Account to;
+  double amount;
+  DOMString description;
+};
+ + +

+`Transaction^T `~ifc$の~toJSON`正則~演算$は、[ +被呼出時には次の手続きを走らす +]ように定義できる: +◎ +The toJSON regular operation of Transaction interface could be defined as follows: +◎ +To invoke the toJSON() operation of the Transaction interface, run the following steps: +

+ +
    +
  1. +%O ~LET 当の `Transaction^T ~obj +◎ +↓
  2. +
  3. +%json ~LET 新たな `TransactionJSON^T 辞書 +◎ +Let json be a new TransactionJSON dictionary. +
  4. +
  5. +

    +属性`識別子$の`~list$ « `from^l, `to^l, `amount^l, `description^l » 内の~EACH( %識別子 ) に対し: +◎ +For each attribute identifier attr in « "from", "to", "amount", "description" »: +

    + +
      +
    1. +%json [ %識別子 ] ~SET %O 上で[ +%識別子 で識別される`属性$ +]の`下層の値を取得-$した結果 +◎ +Let value be result of getting the underlying value of the attribute identified by attr, given this Transaction object. +◎ +Set json[attr] to value. +
    2. +
    +
  6. +
  7. +~RET %json +◎ +Return json. +
  8. +
+ +

+~JS言語束縛においては、 +`Transaction^T ~obj上に `toJSON()^c ~methが存在することになる: +◎ +In the ECMAScript language binding, there would exist a toJSON() method on Transaction objects: +

+ + +
/* 
+`Transaction^T の~instanceを取得する
+◎
+Get an instance of Transaction.
+ */
+var %txn = getTransaction();
+
+/* 
+次の様な~objに評価される:
+◎
+Evaluates to an object like this:
+
+   {
+     from: "Bob",
+     to: "Alice",
+     amount: 50,
+     description: "books"
+   }
+*/
+%txn.toJSON();
+
+/* 
+次の様な文字列に評価される:
+◎
+Evaluates to a string like this:
+
+   '{"from":"Bob","to":"Alice","amount":50,"description":"books"}'
+*/
+JSON.stringify(%txn);
+
+
+

2.2.4. 特殊~演算

@@ -4908,10 +5359,10 @@

2.2.4. 特殊~演算

-`特殊~演算$には、次の一覧に示す6種類がある。 +`特殊~演算$には、次の一覧に示す 5 種類がある。 一覧には、それぞれの種類の特殊~演算に対し,その宣言-時に利用される特殊~keyword, およびその特殊~演算の用途も示す: ◎ -There are six kinds of special operations. The table below indicates for a given kind of special operation what special keyword is used to declare it and what the purpose of the special operation is: +There are five kinds of special operations. The table below indicates for a given kind of special operation what special keyword is used to declare it and what the purpose of the special operation is:

@@ -4929,7 +5380,6 @@

2.2.4. 特殊~演算

◎ Defines behavior for when an object is indexed for property retrieval. -
`設定子@ `setter^c @@ -4938,7 +5388,6 @@

2.2.4. 特殊~演算

◎ Defines behavior for when an object is indexed for property assignment or creation. -
`削除子@ `deleter^c @@ -4947,7 +5396,6 @@

2.2.4. 特殊~演算

◎ Defines behavior for when an object is indexed for property deletion. -
`旧来呼出子@ `legacycaller^c @@ -4955,7 +5403,6 @@

2.2.4. 特殊~演算

◎ Defines behavior for when an object is called as if it were a function. -
`文字列化子@ `stringifier^c @@ -4963,24 +5410,15 @@

2.2.4. 特殊~演算

◎ Defines how an object is converted into a DOMString. - -
`直列化子@ -`serializer^c - -~objを直列化された形に変換する方法を定義する。 -◎ -Defines how an object is converted into a serialized form. - - -
+

すべての言語束縛が、[ -これら6種類の,~objの特殊な挙動 +これら 5 種類の,~objの特殊な挙動 ]すべてを~supportするわけではない。 `特殊~演算$が,識別子を伴わない演算を利用して宣言された場合、その個々の種類の特殊~演算を~supportしない言語束縛においては,単にその機能性が存在しないことになる。 ◎ -Not all language bindings support all of the six kinds of special object behavior. When special operations are declared using operations with no identifier, then in language bindings that do not support the particular kind of special operations there simply will not be such functionality. +Not all language bindings support all of the five kinds of special object behavior. When special operations are declared using operations with no identifier, then in language bindings that do not support the particular kind of special operations there simply will not be such functionality.

@@ -5081,17 +5519,17 @@

2.2.4. 特殊~演算

を見よ。

◎ -Getters and setters come in two varieties: ones that take a DOMString as a property name, known as named property getters and named property setters, and ones that take an unsigned long as a property index, known as indexed property getters and indexed property setters. There is only one variety of deleter: named property deleters. See §2.2.4.4 Indexed properties and §2.2.4.5 Named properties for details. +Getters and setters come in two varieties: ones that take a DOMString as a property name, known as named property getters and named property setters, and ones that take an unsigned long as a property index, known as indexed property getters and indexed property setters. There is only one variety of deleter: named property deleters. See §2.2.4.3 Indexed properties and §2.2.4.4 Named properties for details.

所与の`~ifc$上に存在する,[ -`文字列化子$, `直列化子$, `削除子$ および, 各~系列の[ +`文字列化子$, `削除子$ および, 各~系列の[ `取得子$, `設定子$ ]]は、それぞれ,高々 1 個までで~MUST。 旧来呼出子については、多重定義された~callの挙動を指定する,複数のものが、同じ~ifc上に存在し得る。 ◎ -On a given interface, there must exist at most one stringifier, at most one serializer, at most one named property deleter, and at most one of each variety of getter and setter. Multiple legacy callers can exist on an interface to specify overloaded calling behavior. +On a given interface, there must exist at most one stringifier, at most one named property deleter, and at most one of each variety of getter and setter. Multiple legacy callers can exist on an interface to specify overloaded calling behavior.

@@ -5193,992 +5631,222 @@

2.2.4.1. 旧来呼出子
The following IDL fragment defines an interface with a legacy caller.

-
-interface NumberQuadrupler {
-  // この演算は単純に %x を 4 倍にして返す。
-  legacycaller double compute(double %x);
-};
-
- -

-この~ifcを~supportする~JS実装では,関数として~callされる `NumberQuadrupler^T を実装する`~platform~obj$が許容されることになるであろう: -◎ -An ECMAScript implementation supporting this interface would allow a platform object that implements NumberQuadrupler to be called as a function: -

- -
-var %f = getNumberQuadrupler();  // `NumberQuadrupler^T の~instanceを得る。
-
-%f.compute(3);                   // これは `12^v に評価される。
-%f(3);                           // これも `12^v に評価される。
-
-
- -
-
2.2.4.2. 文字列化子
- - -

-`~ifc$が`文字列化子$を持つとき、 - -その~ifcを実装する~objは,文字列への既定でない変換を持つことになる。 -上で言及したように、文字列化子は -`stringifier^c ~keywordを伴って宣言される`演算$を利用して,指定できる。 -◎ -When an interface has a stringifier, it indicates that objects that implement the interface have a non-default conversion to a string. As mentioned above, stringifiers can be specified using an operation declared with the stringifier keyword. -

- -
-interface `interface_identifier^i {
-  stringifier DOMString `identifier^i();
-  stringifier DOMString ();
-};
-
- -

-`文字列化子$の宣言-時に利用された演算が`識別子$を持たない場合、~ifcに付随する注釈文において,~ifcの -`文字列化の挙動@ -が定義され~MUST。 -演算が識別子を持つ場合、その演算の呼出しにより,~objは文字列に変換される。 -◎ -If an operation used to declare a stringifier does not have an identifier, then prose accompanying the interface must define the stringification behavior of the interface. If the operation does have an identifier, then the object is converted to a string by invoking the operation to obtain the string. -

- -

-演算により宣言される`文字列化子$は、引数をとらず, -`DOMString$T を返すように,宣言され~MUST。 -◎ -Stringifiers declared with operations must be declared to take zero arguments and return a DOMString. -

- -

-略記として、 -`stringifier^c ~keywordが,識別子を伴わない演算により宣言される場合、その演算の`返値型$, および引数~listを省略できる。 -◎ -As a shorthand, if the stringifier keyword is declared using an operation with no identifier, then the operation’s return type and argument list can be omitted. -

- -
-interface `interface_identifier^i {
-  stringifier;
-};
-
- -
-

-次の 2 つの~ifcは等価である: -◎ -The following two interfaces are equivalent: -

- -
-interface A {
-  stringifier DOMString ();
-};
-
- -
-interface A {
-  stringifier;
-};
-
-
- -

-`stringifier^c ~keywordは -`属性$上に置くこともできる。 -この場合、その属性の値が,~objから文字列への変換-を与える。 -`stringifier^c ~keywordが[[ -`DOMString$T/`USVString$T -として宣言されていない属性 -]や -`静的~属性$ -]上に置かれては~MUST_NOT。 -◎ -The stringifier keyword can also be placed on an attribute. In this case, the string to convert the object to is the value of the attribute. The stringifier keyword must not be placed on an attribute unless it is declared to be of type DOMString or USVString. It also must not be placed on a static attribute. -

- -
-interface `interface_identifier^i {
-  stringifier attribute DOMString `identifier^i;
-};
-
- -
-Stringifier -StringifierRest -
- -
-

-次の`~IDL片$は、 -`name^M -属性の値に文字列化する~ifcを定義する: -◎ -The following IDL fragment defines an interface that will stringify to the value of its name attribute: -

- -
-[Constructor]
-interface Student {
-  attribute unsigned long id;
-  stringifier attribute DOMString name;
-};
-
- -

-~JS言語束縛においては、文字列が期待されている文脈において -`Student^T -~objが利用されたときの結果は、その~objの `name^l ~propの値になる: -◎ -In the ECMAScript binding, using a Student object in a context where a string is expected will result in the value of the object’s “name” property being used: -

- -
-var %s = new Student();
-%s.id = 12345678;
-%s.name = '周杰倫';
-
-var greeting = 'こんにちは、 ' + s + ' さん。';
-    // %greeting は `こんにちは、 周杰倫 さん。^l になる。
-
- -

-次の`~IDL片$は、~IDL自身には指定されない独自の文字列化の挙動を持つ~ifcを定義する。 -◎ -The following IDL fragment defines an interface that has custom stringification behavior that is not specified in the IDL itself. -

- -
-[Constructor]
-interface Student {
-  attribute unsigned long id;
-  attribute DOMString? familyName;
-  attribute DOMString givenName;
-
-  stringifier DOMString ();
-};
-
- -

-したがって、例えば次の段落の様な,文字列化の挙動を説明する注釈文が要求される: -◎ -Thus, prose is required to explain the stringification behavior, such as the following paragraph: -

- -
-`Student^T ~ifc を実装する~objを文字列化した結果は、 -`familyName^M 属性の値が `null^V の場合は -`givenName^M 属性の値,他の場合は[ -`givenName^M 属性の値, -1 個の space 文字, -`familyName^M 属性の値 -]の連結にならなければ~MUST_NOT。 -◎ -Objects that implement the Student interface must stringify as follows. If the value of the familyName attribute is null, the stringification of the object is the value of the givenName attribute. Otherwise, if the value of the familyName attribute is not null, the stringification of the object is the concatenation of the value of the givenName attribute, a single space character, and the value of the familyName attribute. -
- -

-この~IDLの~JS実装は、次に従って挙動することになる: -◎ -An ECMAScript implementation of the IDL would behave as follows: -

- -
-var %s = new Student();
-%s.id = 12345679;
-%s.familyName = 'Smithee';
-%s.givenName = 'Alan';
-
-var %greeting = 'こんにちは、 ' + s + ' さん。';
-    // %greeting は `こんにちは、 Alan Smithee さん^l になる。
-
-
-
-
-
2.2.4.3. 直列化子
- - -

-`~ifc$が`直列化子$を持つとき、その~ifcを実装する~objが,自身を直列化された形に変換する仕方を提供することを指示する。 -直列化子は `serializer^c ~keywordを利用して宣言できる。 -◎ -When an interface has a serializer, it indicates that objects provide a way for them to be converted into a serialized form. Serializers can be declared using the serializer keyword: -

- -
-interface `interface_identifier^i {
-  serializer;
-};
-
- -

-この仕方で`直列化子$を宣言する~ifcにおいては、付随する注釈文にて, -その~ifcの -`直列化-時の挙動@ -が定義され~MUST。 -直列化-時の挙動は、次のいずれかの型による -`直列形の値@ -を返すものとして定義される: -◎ -Prose accompanying an interface that declares a serializer in this way must define the serialization behavior of the interface. Serialization behavior is defined as returning a serialized value of one of the following types: -

- - - -

-[ -言語束縛において,`直列化-時の挙動$が~obj上にて どう可用にされるか -], および[ -抽象的な`直列形の値$が どうやって適切な具体的な値に変換されるか -]については、言語束縛~特有になる。 -◎ -How the serialization behavior is made available on an object in a language binding, and how exactly the abstract serialized value is converted into an appropriate concrete value, is language binding specific. -

- -

注記: -~JS言語束縛においては、`直列化-時の挙動$は,[ -`直列形の値$を[[ -`JSON.stringify^c 関数により JSON に直列化し得る -]ような~JS値 -]に変換したもの -]を返すような `toJSON^c ~methとして,公開される。 -詳細は、 -`es-serializer$sec -を見よ。 -◎ -Note: In the ECMAScript language binding, serialization behavior is exposed as a toJSON method which returns the serialized value converted into an ECMAScript value that can be serialized to JSON by the JSON.stringify function. See §3.6.8.2 Serializers for details. -

- -

-`直列化-時の挙動$は、別途の注釈文を与えずに,~IDLの中で直接的に指定することもできる。 -そのためには、 -~keyword `serializer^c と -文字 -`U+003D EQUALS SIGN ("=")^char -に続けて,以下に述べる6種の形をとり得る -`直列化~pattern@ -を記す: -◎ -Serialization behavior can also be specified directly in IDL, rather than separately as prose. This is done by following the serializer keyword with a U+003D EQUALS SIGN ("=") character and a serialization pattern, which can take one of the following six forms: -

- -
-
-~ifcからの, 0 個~以上の属性に対応する~entryを伴う~map ①: -◎ -↓
-
-または、① に加え,被継承~ifc からの属性に対応する~entryも伴う~map: -◎ -A map with entries corresponding to zero or more attributes from the interface, and optionally attributes from an inherited interface: -
-
- -
-interface `interface_identifier^i {
-  serializer = { `attribute_identifier^i, `attribute_identifier^i /* , ... */ }; // ①
-  serializer = { inherit, `attribute_identifier^i, `attribute_identifier^i /* , ... */ };
-};
-
- -

-どの識別子も,~ifc上で宣言された属性の識別子で~MUST。 -識別されるどの属性も,`直列化可能な型$を持た~MUST。 -◎ -Each identifier must be the identifier of an attribute declared on the interface. The identified attributes all must have a serializable type. -

- -

-`inherit^c ~keywordを利用する~ifcは、次を満たしてい~MUST -⇒ -[ -`直列化子$を定義する別の~ifcを継承している -]~AND[ -そのような~ifcのうち最も末端のものは[ -この形, または次項の形(すなわち, `{ attribute }^c ) -]による`直列化~pattern$を利用して直列化子を定義している -] -◎ -The inherit keyword must not be used unless the interface inherits from another that defines a serializer, and the closest such interface defines its serializer using this serialization pattern form or the following form (i.e. { attribute }). -

- -

-この形の直列化~patternに対する`直列化-時の挙動$は、次で与えられる: -◎ -The serialization behavior for this form of serialization pattern is as follows: -

- -
    -
  1. -%map ~LET 空の~map -◎ -Let map be an empty map. -
  2. -
  3. -~IF[ -`inherit^c ~keywordが利用されている -] -⇒ -%map ~SET `直列化子$を宣言する最も末端の被継承~ifc の`直列化-時の挙動$の結果 -◎ -If the inherit keyword was used, then set map to be the result of the serialization behavior of the closest inherited interface that declares a serializer. -
  4. -
  5. -

    -~FOR -直列化~pattern内の~EACH ( 属性~識別子 %i ) に対し,順に: -◎ -For each attribute identifier i in the serialization pattern, in order: -

    - -
      -
    1. -%map 内から[ -~key ~EQ %i -]なる~entryをすべて除去する -◎ -Remove any entry in map with key name i. -
    2. -
    3. -%V ~LET 識別子 %i の属性の値 -◎ -Let V be the value of the attribute with identifier i. -
    4. -
    5. -[ -~key ~EQ %i, -~value ~EQ [ -%V を`直列形の値に変換-$した結果 -]]なる~entryを %map に追加する -◎ -Add an entry to map whose key name is i and whose value is result of converting V to a serialized value. -
    6. -
    -
  6. -
  7. -~RET %map -◎ -Return map. -
  8. -
-
-
-~ifcからの,すべての[ -`直列化可能な型$を持つ属性 -]に対応する~entryを伴う~map ②: -◎ -↓
-
-または、② に加え,被継承~ifc からの属性に対応する~entryも伴う~map: -◎ -A map with entries corresponding to all attributes from the interface that have a serializable type, and optionally attributes from an inherited interface: -
-
- -
-interface `interface_identifier^i {
-  serializer = { attribute }; // ②
-  serializer = { inherit, attribute };
-};
-
- -

-`inherit^c ~keywordを利用する~ifcは、次を満たしてい~MUST -⇒ -[ -`直列化子$を定義する別の~ifcを継承している -]~AND[ -そのような~ifcのうち最も末端のものは[ -この形, または前項の形 -]による`直列化~pattern$を利用して直列化子を定義している -] -◎ -The inherit keyword must not be used unless the interface inherits from another that defines a serializer, and the closest such interface defines its serializer using this serialization pattern form or the previous form. -

- - - -
    - - -
  1. -

    -~FOR -~ifc上の ~EACH ( -`直列化可能な型$を持つ属性の識別子 %i -) に対し,それが~ifc上に現れる順に: -◎ -For each identifier i of an attribute on the interface whose type is a serializable type, in the order they appear on the interface: -

    - -
      - - - -
    -
  2. - -
-
-
-`有名~prop$に対応している~entryを伴う~map: -◎ -A map with entries corresponding to the named properties: -
-
- -
-interface `interface_identifier^i {
-  serializer = { getter };
-};
-
- -

-この形を利用する~ifcは、次を満たしてい~MUST -⇒ -[ -自身または継承している~ifcは,有名~propを~supportする -]~AND[ -その`有名~prop取得子$の返値型は直列化可能である -] -◎ -This form must not be used unless the interface or one it inherits from supports named properties and the return type of the named property getter is a serializable type. -

- - - -
    - - -
  1. -

    -~FOR -~obj上の~EACH ( `被support~prop名$ %n ) に対し,順に: -◎ -For each supported property name n on the object, in order: -

    - -
      -
    1. -%V ~LET 名前 %n の有名~propの値 -◎ -Let V be the value of the named property with name n. -
    2. -
    3. -[ -~key ~EQ %n, -~value ~EQ [ -%V を`直列形の値に変換-$した結果 -]]なる~entryを %map に追加する -◎ -Add an entry to map whose key name is n and whose value is result of converting V to a serialized value. -
    4. -
    -
  2. - -
-
-
-~ifc上の 0 個~以上の属性の値の~list: -◎ -A list of value of zero or more attributes on the interface: -
-
- -
-interface `interface_identifier^i {
-  serializer = [ `attribute_identifier^i, `attribute_identifier^i /* , ... */ ];
-};
-
- - - - - -
    -
  1. -%list ~LET 空~list -◎ -Let list be an empty list. -
  2. -
  3. -

    -~FOR -直列化~pattern内の ~EACH ( 属性~識別子 %i ) に対し,順に: -◎ -For each attribute identifier i in the serialization pattern: -

    - -
      - -
    1. -%V を`直列形の値に変換-$した結果の値を %list に付加する -◎ -Append to list the value that is the result of converting V to a serialized value. -
    2. -
    -
  4. -
  5. -~RET %list -◎ -Return list. -
  6. -
-
-
-`有index~prop$に対応している~entryの~list -◎ -A list with entries corresponding to the indexed properties: -
-
- -
-interface `interface_identifier^i {
-  serializer = [ getter ];
-};
-
- -

-この形を利用する~ifcは、次を満たしてい~MUST -⇒ -[ -自身または継承している~ifcは,`有index~propを~support$する -]~AND[ -その`有index~prop取得子$の返値型は直列化可能である -] -◎ -This form must not be used unless the interface or one it inherits from supports indexed properties and the return type of the indexed property getter is a serializable type. -

- - - -
    - -
  1. -%i ~LET 0 -◎ -Let i be 0. -
  2. -
  3. -

    -~WHILE %i ~LTE ~obj上の`被support~prop~index$の最大: -◎ -While i is less than or equal to the greatest supported property index on the object: -

    - -
      -
    1. -%V ~LET [ -%i は`被support~prop~index$であるならば ~index %i に位置する有index~propの値 / -~ELSE_ `null^V -] -◎ -Let V be the value of the indexed property with index i if i is a supported property index, or null otherwise. -
    2. - -
    3. -%i ~SET %i + 1 -◎ -Set i to i + 1. -
    4. -
    -
  4. - -
-
-
-単独の属性: -◎ -A single attribute: -
-
- -
-interface `interface_identifier^i {
-  serializer = `attribute_identifier^i;
+
+interface NumberQuadrupler {
+  // この演算は単純に %x を 4 倍にして返す。
+  legacycaller double compute(double %x);
 };
 

-識別子は,~ifc上で宣言された属性の識別子で~MUST。 -その属性は,`直列化可能な型$を持た~MUST。 +この~ifcを~supportする~JS実装では,関数として~callされる `NumberQuadrupler^T を実装する`~platform~obj$が許容されることになるであろう: ◎ -The identifier must be the identifier of an attribute declared on the interface, and this attribute must have a serializable type. +An ECMAScript implementation supporting this interface would allow a platform object that implements NumberQuadrupler to be called as a function:

- - -
    -
  1. -~RET -指定された識別子を伴う属性の値を`直列形の値に変換-$した結果 -◎ -Let V be the value of the attribute with the specified identifier. -◎ -Return the result of converting V to a serialized value. -
  2. -
-
-
+
+var %f = getNumberQuadrupler();  // `NumberQuadrupler^T の~instanceを得る。
 
+%f.compute(3);                   // これは `12^v に評価される。
+%f(3);                           // これも `12^v に評価される。
+
+ +
+
+
2.2.4.2. 文字列化子
-

注記: -一連の~entryは,特定0の順序により~mapに追加される。 -~JS言語束縛においては,~propが~objに追加される順序に従うものと定義される。 -この順序は -`JSON.stringify^c -から生成される直列化に波及するので。 +

+`~ifc$が`文字列化子$を持つとき、 + +その~ifcを実装する~objは,文字列への既定でない変換を持つことになる。 +上で言及したように、文字列化子は +`stringifier^c ~keywordを伴って宣言される`演算$を利用して,指定できる。 ◎ -Note: Entries are added to maps in a particular order so that in the ECMAScript language binding it is defined what order properties are added to objects. This is because this order can influence the serialization that JSON.stringify can produce. +When an interface has a stringifier, it indicates that objects that implement the interface have a non-default conversion to a string. As mentioned above, stringifiers can be specified using an operation declared with the stringifier keyword.

- - +
+interface `interface_identifier^i {
+  stringifier DOMString `identifier^i();
+  stringifier DOMString ();
+};
+

-各種 -`直列化可能な型@, および -それらを -`直列形の値に変換-@ -する方法は、次で与えられる: +`文字列化子$の宣言-時に利用された演算が`識別子$を持たない場合、~ifcに付随する注釈文において,~ifcの +`文字列化の挙動@ +が定義され~MUST。 +演算が識別子を持つ場合、その演算の呼出しにより,~objは文字列に変換される。 ◎ -The list of serializable types and how they are converted to serialized values is as follows: +If an operation used to declare a stringifier does not have an identifier, then prose accompanying the interface must define the stringification behavior of the interface. If the operation does have an identifier, then the object is converted to a string by invoking the operation to obtain the string.

-
-
`long long$T
-
`unsigned long long$T
-
-最も近い等価な `double$T 値に変換される( -この~IDL整数~型を~JS `Number^t 値に変換する -ときと同様に) -◎ -converted by choosing the closest equivalent double value (as when converting a long long to an ECMAScript Number value) -◎ -converted by choosing the closest equivalent double value (as when converting a unsigned long long to an ECMAScript Number value) -
-
他のすべての`整数~型$
-
`float$T
-
-等価な `double$T 値に変換される -◎ -converted by choosing the equivalent double value -
-
`double$T
-
`boolean$T
-
`DOMString$T
-
-それぞれの型の,同じ値 -◎ -the same value of the respective type -
-
`列挙~型$◎an enumeration type
-
-等価な `DOMString$T 値 -◎ -the equivalent DOMString value -
- -
`USVString$T◎a USVString
-
-所与の`~Unicode~scalar値$の並びを UTF-16 に符号化して生産される `DOMString$T -◎ -the DOMString produced by encoding the given sequence of Unicode scalar values in UTF-16 -
- -
`ByteString$T◎a ByteString
-
-各~符号単位と対応する~byteが数として同じであるような,等価な `DOMString$T 値 -◎ -the equivalent DOMString value where each code unit has the same value as the corresponding byte value -
- - -
`~nullable型$であって,その`内縁~型$は直列化可能であるもの -◎a nullable serializable type
-
-値が `null^T ならば `null^T に変換され、他の場合は,その`内縁~型$に従って変換される -◎ -converted to null if that is its value, otherwise converted as per its inner type -
-
-`共用体~型$であって,そのどの`~mb型$も直列化可能であるもの -◎ -a union type where all of its member types are serializable types -
-
-その`固有型$に従って変換される -◎ -converted as per its specific type -
-
-`連列~型$であって,その要素~型は直列化可能であるもの -◎ -a sequence type that has a serializable type as its element type -
-
-~listに変換される。 -その各~要素は,連列の中の対応する要素を`直列形の値に変換-$した結果で与えられる。 -◎ -converted to a list where each element is the result of converting its corresponding sequence element to a serialized value -
-
- -`辞書~型$であって,そのどの`辞書~mb$も直列化可能な型であるもの -◎ -a dictionary where all of its members have serializable types -
-
-~mapに変換される。 -その一連の~entryは、辞書に`在する$各~mb %m に対する~entry[ -~key ~EQ %m の識別子, -~value ~EQ [ -%m の値を`直列形の値に変換-$した結果 -]]で与えられる。 -◎ -converted to a map consisting of an entry for each dictionary member that is present, where the entry’s key is the identifier of the dictionary member and its value is the result of converting the dictionary member’s value to a serializable type -
-
-`~ifc型$であって,`直列化子$を持つもの -◎ -an interface type that has a serializer -
-
-~objの直列化子を呼出して変換される +

+演算により宣言される`文字列化子$は、 +0 個の引数をとり `DOMString$T を返すように,宣言され~MUST。 ◎ -converted by invoking the object’s serializer -

-
+Stringifiers declared with operations must be declared to take zero arguments and return a DOMString. +

-`直列化子$は `serializer^c ~keywordを伴う`演算$を利用して指定することもできる: +略記として、 +`stringifier^c ~keywordが,識別子を伴わない演算により宣言される場合、その演算の`返値型$, および引数~listを省略できる。 ◎ -Serializers can also be specified using an operation with the serializer keyword: +As a shorthand, if the stringifier keyword is declared using an operation with no identifier, then the operation’s return type and argument list can be omitted.

 interface `interface_identifier^i {
-  serializer `identifier^i();
+  stringifier;
 };
 
+

-演算を伴って宣言される`直列化子$は、[ -0 個の引数をとる -~AND -`直列化可能な型$を返す -]ものとして,宣言され~MUST。 +次の 2 つの~ifcは等価である: ◎ -Serializers declared with operations must be declared to take zero arguments and return a serializable type. +The following two interfaces are equivalent:

+
+interface A {
+  stringifier DOMString ();
+};
+
+ +
+interface A {
+  stringifier;
+};
+
+
+

-`直列化子$が演算を伴って宣言されている~ifcにおける,`直列化-時の挙動$ -は、その演算を呼出して返される値を`直列形の値に変換-$した結果で与えられる。 +`stringifier^c ~keywordは +`属性$上に置くこともできる。 +この場合、その属性の値が,~objから文字列への変換-を与える。 +`stringifier^c ~keywordが[[ +`DOMString$T/`USVString$T +として宣言されていない属性 +]や +`静的~属性$ +]上に置かれては~MUST_NOT。 ◎ -The serialization behavior of the interface with a serializer declared with an operation is the result of converting the value returned from invoking the operation to a serialized value. +The stringifier keyword can also be placed on an attribute. In this case, the string to convert the object to is the value of the attribute. The stringifier keyword must not be placed on an attribute unless it is declared to be of type DOMString or USVString. It also must not be placed on a static attribute.

+
+interface `interface_identifier^i {
+  stringifier attribute DOMString `identifier^i;
+};
+
+
-Serializer -SerializerRest -SerializationPattern -SerializationPatternMap -SerializationPatternList -Identifiers +Stringifier +StringifierRest

-次の -`~IDL片$は、注釈文にて定義される`直列化子$を持つ, `Transaction^T ~ifcを定義する: +次の`~IDL片$は、 +`name^M +属性の値に文字列化する~ifcを定義する: ◎ -The following IDL fragment defines an interface Transaction that has a serializer defines in prose: +The following IDL fragment defines an interface that will stringify to the value of its name attribute:

-interface Transaction {
-  readonly attribute Account from;
-  readonly attribute Account to;
-  readonly attribute double amount;
-  readonly attribute DOMString description;
-  readonly attribute unsigned long number;
-
-  serializer;
-};
-
-interface Account {
-  attribute DOMString name;
-  attribute unsigned long number;
+[Constructor]
+interface Student {
+  attribute unsigned long id;
+  stringifier attribute DOMString name;
 };
 

-直列化子は、次に従うように定義できる: +~JS言語束縛においては、文字列が期待されている文脈において +`Student^T +~objが利用されたときの結果は、その~objの `name^l ~propの値になる: ◎ -The serializer could be defined as follows: +In the ECMAScript binding, using a Student object in a context where a string is expected will result in the value of the object’s “name” property being used:

-
-

-`Transaction^T ~ifcの`直列化-時の挙動$は、次の~algoで与えられる。 -ここで %O は `Transaction^T を実装する~objであるとする: -◎ -The serialization behavior of the Transaction interface is to run the following algorithm, where O is the object that implements Transaction: -

+
+var %s = new Student();
+%s.id = 12345678;
+%s.name = '周杰倫';
 
-		
    - -
  1. -[ -~key ~EQ `from^l, -~value ~EQ [ -%O 上の `from^M 属性から参照されている `Account^T ~obj上の `number^M 属性~値に対する`直列形の値$ -]]なる~entryを %map に追加する。 -◎ -Add an entry to map whose key is “from” and whose value is the serialized value of the number attribute on the Account object referenced by the from attribute on O. -
  2. -
  3. -[ -~key ~EQ `to^l, -~value ~EQ [ -%O 上の `to^M 属性から参照されている `Account^T ~obj上の `number^M 属性~値に対する`直列形の値$ -]]なる~entryを %map に追加する。 -◎ -Add an entry to map whose key is “to” and whose value is the serialized value of the number attribute on the Account object referenced by the to attribute on O. -
  4. -
  5. -属性 `amount^c, `description^c のそれぞれに対し,[ -~key ~EQ その属性の`識別子$, -~value ~EQ [ -%O 上のその属性~値に対する`直列形の値$ -]]なる~entryを %map に追加する。 -◎ -For both of the attributes amount and description, add an entry to map whose key is the identifier of the attribute and whose value is the serialized value of the value of the attribute on O. -
  6. - +var greeting = 'こんにちは、 ' + s + ' さん。'; + // %greeting は `こんにちは、 周杰倫 さん。^l になる。 +
- -

-`Account^T ~obj自身を直列化可能にしてもよいのであれば、`直列化~pattern$の利用により,注釈文による`直列化-時の挙動$を定義せずに済ませられるようになる: +次の`~IDL片$は、~IDL自身には指定されない独自の文字列化の挙動を持つ~ifcを定義する。 ◎ -If it was acceptable for Account objects to be serializable on their own, then serialization patterns could be used to avoid having to define the serialization behavior in prose: +The following IDL fragment defines an interface that has custom stringification behavior that is not specified in the IDL itself.

-interface Transaction {
-  readonly attribute Account from;
-  readonly attribute Account to;
-  readonly attribute double amount;
-  readonly attribute DOMString description;
-  readonly attribute unsigned long number;
-
-  serializer = { from, to, amount, description };
-};
-
-interface Account {
-  attribute DOMString name;
-  attribute unsigned long number;
+[Constructor]
+interface Student {
+  attribute unsigned long id;
+  attribute DOMString? familyName;
+  attribute DOMString givenName;
 
-  serializer = number;
+  stringifier DOMString ();
 };
 

-~JS言語束縛においては、 -`Transaction^T ~obj上に `toJSON^c ~methが存在することになる: +したがって、例えば次の段落の様な,文字列化の挙動を説明する注釈文が要求される: ◎ -In the ECMAScript language binding, there would exist a toJSON method on Transaction objects: +Thus, prose is required to explain the stringification behavior, such as the following paragraph:

-
-// `Transaction^T の~instanceを取得-
-var %txn = getTransaction();
-
+
+`Student^T ~ifc を実装する~objを文字列化した結果は、 +`familyName^M 属性の値が `null^V の場合は +`givenName^M 属性の値,他の場合は[ +`givenName^M 属性の値, +1 個の space 文字, +`familyName^M 属性の値 +]の連結にならなければ~MUST_NOT。 +◎ +Objects that implement the Student interface must stringify as follows. If the value of the familyName attribute is null, the stringification of the object is the value of the givenName attribute. Otherwise, if the value of the familyName attribute is not null, the stringification of the object is the concatenation of the value of the givenName attribute, a single space character, and the value of the familyName attribute. +
-/* 次の様な~objに評価される: - { - from: 1234 - to: 5678 - amount: 110.75 - description: "dinner" - } -*/ +

+この~IDLの~JS実装は、次に従って挙動することになる: +◎ +An ECMAScript implementation of the IDL would behave as follows: +

-%txn.toJSON(); +
+var %s = new Student();
+%s.id = 12345679;
+%s.familyName = 'Smithee';
+%s.givenName = 'Alan';
 
-// 次の様な文字列に評価される:
-// '{"from":1234,"to":5678,"amount":110.75,"description":"dinner"}'
-JSON.stringify(%txn);
+var %greeting = 'こんにちは、 ' + s + ' さん。';
+    // %greeting は `こんにちは、 Alan Smithee さん^l になる。
 
-
-
2.2.4.4. 有index~prop
+
2.2.4.3. 有index~prop

`有index~prop取得子$を定義する`~ifc$は、 @@ -6457,7 +6125,7 @@

2.2.4.4. 有index~prop
-
2.2.4.5. 有名~prop
+
2.2.4.4. 有名~prop

@@ -8857,7 +8525,7 @@

2.5.1. ~error名

注記: -ここに挙げられていない~error名があれば、この仕様の冒頭に指示したように, ~bugを申請されるよう願う。 +ここに挙げられていない~error名があれば、この仕様の冒頭に指示したように, ~bugを~~提出されるよう願う。 間もなく解消に向けて取り組まれることになる。 Thanks! ◎ @@ -8940,7 +8608,7 @@

2.5.1. ~error名

`InUseAttributeError@E -属性は使用中にある。 +属性は利用~中にある。 ◎ The attribute is in use. `INUSE_ATTRIBUTE_ERR@Ec (10) @@ -9117,7 +8785,7 @@

2.5.1. ~error名

`OperationError@E -演算~特有の事由により,演算に失敗した。 +演算に特有の事由により,演算に失敗した。 ◎ The operation failed for an operation-specific reason. — @@ -9172,7 +8840,7 @@

2.6. 列挙

例えば、~objが作成されるべきであることを指示する列挙~値は, `createobject^l や `create-object^l などと命名できる。 -列挙~値の単語を~dashで区切るか区切らないか決めるときは、類似の他の~APIと一貫するように,関係する列挙~値の利用を考慮に入れること。 +列挙~値の単語を~dashで区切るかどうか決めるときは、類似の他の~APIと一貫するように,関係する列挙~値の利用を考慮すること。 ◎ It is strongly suggested that enumeration values be all lowercase, and that multiple words be separated using dashes or not be separated at all, unless there is a specific reason to use another value naming scheme. For example, an enumeration value that indicates an object should be created could be named "createobject" or "create-object". Consider related uses of enumeration values when deciding whether to dash-separate or not separate enumeration value words so that similar APIs are consistent.

@@ -9661,7 +9329,7 @@

2.9. ~implements文

F implements H; F implements I; // `H::z^M と `I::z^M が `F^T 内に併合される際に衝突- +>`H::z^M と `I::z^M が `F^T 内に~~併合される際に衝突- @@ -9778,7 +9446,7 @@

2.10. ~ifcを実装している~obj< これは、所与の~objに[ その~objが実装における~platform~objであるかどうかを記録するための,何らかの内部~状態 ]を~~実際に持たせるか、あるいは, おそらく,[ -~objが一定の内部 C++ クラスにより実装されているかどうか +~objが一定の内部 C++ ~classにより実装されているかどうか ]を見ることにより、実現し得るであろう。 ~platform~objが,正確に どう実装から認識されるかについては、実装~特有になる。 ◎ @@ -9926,7 +9594,7 @@

2.11. 型

-`演算$の呼出しや`属性$に値を代入する際に必要になる,言語束縛~特有の型から~IDL型への変換はすべて、[ +`演算$の呼出しや`属性$に値を代入する際に必要になる,言語束縛に特有の型から~IDL型への変換はすべて、[ 演算に指定された機能性や 属性~代入 ]が~~実行に移される前に遂行される。 変換が遂行できない場合、演算は走らされず, 属性は更新されないことになる。 @@ -10181,8 +9849,7 @@

2.11.15. `DOMString^T

`DOMString$T 型は、可能なすべての[ `符号単位$の並び ]の集合に対応する。 -そのような並びは、共通的に, -UTF-16 符号化~文字列 `RFC2781$r +そのような並びは、共通的に,~UTF-16符号化~文字列 `RFC2781$r として解釈されるが、要求されてはいない。 `DOMString$T は DOM Level 3 Core §The DOMString Type @@ -10206,7 +9873,7 @@

2.11.15. `DOMString^T

この仕様においては、 -`DOMString$T 値が妥当な UTF-16 文字列であることは要求されない。 +`DOMString$T 値が妥当な~UTF-16文字列であることは要求されない。 例えば, `DOMString$T 値は、対を成さない代用対( surrogate pair)文字も含み得る。 しかしながら,~Web~IDLを利用する仕様の策定者は、所与の個々の[ @@ -10516,8 +10183,8 @@

2.11.19. ~ifc型

`呼戻~文脈$ ]の組により表現される。 `呼戻~文脈@ -とは、言語束縛~特有の値であり、[ -言語束縛~特有の~obj参照が~IDL値に変換される時点における,実行~文脈についての情報 +とは、言語束縛に特有の値であり、[ +言語束縛に特有の~obj参照が~IDL値に変換される時点における,実行~文脈についての情報 ]を格納するために利用されるものである。 ◎ For non-callback interfaces, an IDL value of the interface type is represented just by an object reference. For callback interfaces, an IDL value of the interface type is represented by a tuple of an object reference and a callback context. The callback context is a language binding specific value, and is used to store information about the execution context at the time the language binding specific object reference is converted to an IDL value. @@ -11568,7 +11235,7 @@

2.11.31. ~buffer~source型

仕様において、[ ~buffer~sourceに保持されている~byteへの参照を取得する ]ような ~textを書くときには、細心の注意を払う必要がある -— 下層の~dataは、予測し得ない時に作者や他の~APIにより,容易に変更され得るので。 +— 下層の~dataは、作者や他の~APIにより,予測し得ない時に容易く変更され得るので。 改変されないような ~binary~dataの~chunkを得るために,演算~引数として~buffer~source型を利用する場合は、その演算を定義する注釈文の始めの方で,~buffer~sourceの~byte列の複製を取得することが、強く推奨される。 ◎ Extreme care must be taken when writing specification text that gets a reference to the bytes held by a buffer source, as the underyling data can easily be changed by the script author or other APIs at unpredictable times. If you are using a buffer source type as an operation argument to obtain a chunk of binary data that will not be modified, it is strongly recommended to get a copy of the buffer source’s bytes at the beginning of the prose defining the operation. @@ -11596,7 +11263,7 @@

2.11.31. ~buffer~source型

-`切離された$ `ArrayBuffer$T ~objに対し,~buffer~sourceに保持されている~byte列の`参照/複製を取得-$しようと試みたときは、言語束縛~特有の方式で失敗することになる。 +`切離された$ `ArrayBuffer$T ~objに対し,~buffer~sourceに保持されている~byte列の`参照/複製を取得-$しようと試みたときは、言語束縛に特有の方式で失敗することになる。 ◎ Attempting to get a reference to or get a copy of the bytes held by a buffer source when the ArrayBuffer has been detached will fail in a language binding-specific manner.

@@ -12014,15 +11681,8 @@

3.1. ~JS環境

  • 文字列化子 に対応する `Function^t ~obj - ◎ the Function objects that correspond to stringifiers -
  • -
  • -直列化子 -に対応する `Function^t ~obj -◎ -the Function objects that correspond to serializers
  • 反復子 @@ -13063,7 +12723,7 @@

    3.2.11. `USVString^T

    Let scalarValues be the sequence of Unicode scalar values the USVString represents.
  • -%string ~LET %scalarValues を UTF-16 に符号化した結果の`符号単位$の並び +%string ~LET %scalarValues を~UTF-16に符号化した結果の`符号単位$の並び ◎ Let string be the sequence of code units that results from encoding scalarValues in UTF-16.
  • @@ -13999,7 +13659,7 @@

    3.2.19. ~record — ~record_KV

    -~recordが考慮に入れるのは, +~recordが考慮するのは, own enumerable ~propに限られるので、引数を返すだけの~IDL演算 @@ -15012,12 +14672,12 @@

    3.2.25. 凍結~配列 — ~Fr
    1. -%values ~LET %V を ~sequence_T 型の`~IDL値に変換-$した結果 +%値~list ~LET %V を ~sequence_T 型の`~IDL値に変換-$した結果 ◎ Let values be the result of converting V to IDL type sequence<T>.
    2. -~RET %values から`凍結~配列を作成-$した結果 +~RET %値~list から`凍結~配列を作成-$した結果 ◎ Return the result of creating a frozen array from values.
    3. @@ -15071,7 +14731,7 @@
      3.2.25.1. 可反復から
      1. -%values ~LET +%値~list ~LET ( %iterable, %method ) から 型 %T の`連列~値を作成-$した結果 @@ -15079,7 +14739,7 @@
        3.2.25.1. 可反復から Let values be the result of creating a sequence of type sequence<T> from iterable and method.
      2. -~RET %values から`凍結~配列を作成-$した結果 +~RET %値~list から`凍結~配列を作成-$した結果 ◎ Return the result of creating a frozen array from values.
      3. @@ -15089,7 +14749,7 @@
        3.2.25.1. 可反復から

    -

    3.3. ~JS固有の拡張属性

    +

    3.3. ~JSに特有の拡張属性

    @@ -15124,7 +14784,7 @@

    3.3.1. `Allowshared^x

    -`AllowShared$x の利用に課される固有の要件については、 +`AllowShared$x の利用に課される特有の要件については、 `es-buffer-source-types$secの[ ~JS値から~IDL`~buffer~source型$へ変換する規則 ]を見よ。 @@ -15193,7 +14853,7 @@

    3.3.2. `Clamp^x

    -`Clamp$x の利用に課される固有の要件については、 +`Clamp$x の利用に課される特有の要件については、 `es-integer-types$secの[ ~JS値から種々の~IDL整数~型へ変換する規則 ]を見よ。 @@ -15357,7 +15017,7 @@

    3.3.3. `Constructor^x

    -var %x = new Circle();      
    +var %x = new Circle();
            /* 
    +

    3.3.4. `Default^x

    + +

    +`Default$x `拡張属性$が`正則~演算$上に現れた場合、[ +その演算が呼出されたときには,`対応する既定の演算$に述べられる手続きが行われ~MUST +]ことを指示する。 +◎ +If the [Default] extended attribute appears on a regular operation, then it indicates that steps described in the corresponding default operation must be carried out when the operation is invoked. +

    + +

    +`Default$x 拡張属性は: +◎ +↓

    + +
      +
    • +`引数をとらない$ことが要求される。 +◎ +The [Default] extended attribute must take no arguments. +
    • +
    • +次のもの以外に利用されては~MUST_NOT +⇒ +`正則~演算$であって,`対応する既定の演算$が定義されているもの +◎ +The [Default] extended attribute must not be used on anything other than a regular operation for which a corresponding default operation has been defined. +
    • +
    + +
    + +

    +例として、 `Default$x 拡張属性は,~toJSON`正則~演算$の利用に相応しくなる: +◎ +As an example, the [Default] extended attribute is suitable for use on toJSON regular operations: +

    + + +
    +interface Animal {
    +  attribute DOMString name;
    +  attribute unsigned short age;
    +  [Default] object toJSON();
    +};
    +
    +interface Human : Animal {
    +  attribute Dog? pet;
    +  [Default] object toJSON();
    +};
    +
    +interface Dog : Animal {
    +  attribute DOMString? breed;
    +};
    +
    + +

    +~JS言語束縛においては、 +`toJSON()^c ~methは, +`Animal^T, `Human^T +~obj上に, および +継承を介して `Dog^T ~obj上にも存在することになる: +◎ +In the ECMAScript language binding, there would exist a toJSON() method on Animal, Human, and (via inheritance) Dog objects: +

    + +
    +/* 
    +`Human^T の~instanceを取得する
    +◎
    +Get an instance of Human.
    + */
    +var %alice = getHuman();
    +
    +/* 
    +次の様な~objに評価される(この時点で, `Dog^T の~instanceは依然として `pet^l を保持することに注意):
    +◎
    +Evaluates to an object like this (notice how "pet" still holds an instance of Dog at this point):
    +
    +   {
    +     name: "Alice",
    +     age: 59,
    +     pet: Dog
    +   }
    +*/
    +%alice.toJSON();
    +
    +/* 
    +次の様な~objに評価される( `Dog^T ~ifcは既定の~toJSON演算を宣言していないので, `breed^l は不在になることに注意):
    +◎
    +Evaluates to an object like this (notice how "breed" is absent, as the Dog interface doesn’t declare a default toJSON operation):
    +
    +   {
    +     name: "Tramp",
    +     age: 6
    +   }
    +*/
    +%alice.pet.toJSON();
    +
    +/* 
    +次の様な文字列に評価される:
    +◎
    +Evaluates to a string like this:
    +
    +   '{"name":"Alice","age":59,"pet":{"name":"Tramp","age":6}}'
    +*/
    +JSON.stringify(%alice);
    +
    + +
    +
    -

    3.3.4. `EnforceRange^x

    +

    3.3.5. `EnforceRange^x

    @@ -15416,7 +15189,7 @@

    3.3.4. `EnforceRange^x

    -`EnforceRange$x の利用に課される固有の要件については、 +`EnforceRange$x の利用に課される特有の要件については、 `es-type-mapping$secの[ ~JS値から種々の~IDL整数~型へ変換する規則 ]を見よ。 @@ -15478,7 +15251,7 @@

    3.3.4. `EnforceRange^x

    -

    3.3.5. `Exposed^x

    +

    3.3.6. `Exposed^x

    `Exposed$x `拡張属性$が[ @@ -15648,7 +15421,7 @@

    3.3.5. `Exposed^x

    注記: -~JS大域~objに`関連する設定群~obj$が`保安的~文脈$であるかどうかは,変化し得ないので、 -%X に対する~propを作成するかどうかの実装による決断は、`初期~obj$を作成する時点の一度限りになる。 +~JS大域~objに`関連する設定群~obj$が`保安的~文脈$であるかどうかは,変化し得ないので、実装が %X に対する~propを作成するかどうか決めるのは、`初期~obj$を作成する時点の一度限りになる。 ◎ Note: Since it is not possible for the relevant settings object for an ECMAScript global object to change whether it is a secure context or not over time, an implementation’s decision to create properties for an interface or interface member can be made once, at the time the initial objects are created.

    -`Exposed$x の利用に課される固有の要件については、 +`Exposed$x の利用に課される特有の要件については、 `es-interfaces$sec, `es-constants$sec, `es-attributes$sec, @@ -15792,7 +15564,7 @@

    3.3.5. `Exposed^x

    -

    3.3.6. `Global^x と `PrimaryGlobal^x

    +

    3.3.7. `Global^x と `PrimaryGlobal^x

    [ @@ -15918,13 +15690,12 @@

    3.3.6. `Global^x と `PrimaryGlobal^x【混在も含む】 ]]が存在しては~MUST_NOT。 ◎ -If an interface is declared with the [Global] or [PrimaryGlobal] extended attribute, then there must not be more than one interface member across the interface and its consequential interfaces with the same identifier. There also must not be more than one stringifier, more than one serializer, or more than one iterable declaration, maplike declaration or setlike declaration across those interfaces. +If an interface is declared with the [Global] or [PrimaryGlobal] extended attribute, then there must not be more than one interface member across the interface and its consequential interfaces with the same identifier. There also must not be more than one stringifier or more than one iterable declaration, maplike declaration or setlike declaration across those interfaces.

    注記: @@ -15980,7 +15751,7 @@

    3.3.6. `Global^x と `PrimaryGlobal^x 有名~propにおける `Global$x / `PrimaryGlobal$x -の利用に課される固有の要件については、 +の利用に課される特有の要件については、 `named-properties-object$sec を見よ。 `~ifc~mb$に対応する~propの所在に関する要件については、 @@ -16071,7 +15842,7 @@

    3.3.6. `Global^x と `PrimaryGlobal^x
    -

    3.3.7. `LegacyArrayClass^x

    +

    3.3.8. `LegacyArrayClass^x

    `LegacyArrayClass$x `拡張属性$が[ @@ -16109,7 +15880,7 @@

    3.3.7. `LegacyArrayClass^x

    -`LegacyArrayClass$x の利用に課される固有の要件については、 +`LegacyArrayClass$x の利用に課される特有の要件については、 `interface-prototype-object$sec を見よ。 ◎ @@ -16179,7 +15950,7 @@

    3.3.7. `LegacyArrayClass^x

    -

    3.3.8. `LegacyUnenumerableNamedProperties^x

    +

    3.3.9. `LegacyUnenumerableNamedProperties^x

    `LegacyUnenumerableNamedProperties$x `拡張属性$が[ @@ -16206,7 +15977,7 @@

    3.3.8. `LegacyUnenumerableNamedProperties^x

    -`LegacyUnenumerableNamedProperties$x の利用に課される固有の要件については、 +`LegacyUnenumerableNamedProperties$x の利用に課される特有の要件については、 `legacy-platform-object-property-enumeration$sec を見よ。 ◎ @@ -16217,7 +15988,7 @@

    3.3.8. `LegacyUnenumerableNamedProperties^x

    -

    3.3.9. `LegacyWindowAlias^x

    +

    3.3.10. `LegacyWindowAlias^x

    `LegacyWindowAlias$x `拡張属性$が `~ifc$ %I 上に現れた場合、[ @@ -16341,7 +16112,7 @@

    3.3.9. `LegacyWindowAlias^x

    -

    3.3.10. `LenientSetter^x

    +

    3.3.11. `LenientSetter^x

    `LenientSetter$x `拡張属性$が[ @@ -16446,7 +16217,7 @@

    3.3.10. `LenientSetter^x

    -

    3.3.11. `LenientThis^x

    +

    3.3.12. `LenientThis^x

    `LenientThis$x `拡張属性$が `正則~属性$上に現れた場合、その属性が現れる`~ifc$を実装する~objとは異なる `this^v 値を伴うような,その属性の取得子や設定子の呼出は、無視されることになる。 @@ -16539,7 +16310,7 @@

    3.3.11. `LenientThis^x

    -

    3.3.12. `NamedConstructor^x

    +

    3.3.13. `NamedConstructor^x

    @@ -16669,7 +16440,7 @@

    3.3.12. `NamedConstructor^x

    -

    3.3.13. `NewObject^x

    +

    3.3.14. `NewObject^x

    `NewObject$x `拡張属性$が[ @@ -16724,7 +16495,7 @@

    3.3.13. `NewObject^x

    -

    3.3.14. `NoInterfaceObject^x

    +

    3.3.15. `NoInterfaceObject^x

    @@ -16776,7 +16547,7 @@

    3.3.14. `NoInterfaceObject^x

    -`NoInterfaceObject$x の利用に課される固有の要件については、 +`NoInterfaceObject$x の利用に課される特有の要件については、 `es-interfaces$sec を見よ。 ◎ @@ -16834,7 +16605,7 @@

    3.3.14. `NoInterfaceObject^x

    -

    3.3.15. `OverrideBuiltins^x

    +

    3.3.16. `OverrideBuiltins^x

    @@ -16868,7 +16639,7 @@

    3.3.15. `OverrideBuiltins^x

    -`OverrideBuiltins$x の利用に課される固有の要件については、 +`OverrideBuiltins$x の利用に課される特有の要件については、 `es-legacy-platform-objects$sec, `legacy-platform-object-defineownproperty$sec を見よ。 @@ -16957,13 +16728,13 @@

    3.3.15. `OverrideBuiltins^x

    -

    3.3.16. `PutForwards^x

    +

    3.3.17. `PutForwards^x

    `PutForwards$x `拡張属性$が[ `~ifc型$の`読専$の`正則~属性$宣言 -]上に現れた場合、その属性への代入ingは 固有の挙動を持つことになる。 +]上に現れた場合、その属性への代入ingは 特有の挙動を持つことになる。 すなわち,その代入は、代入-が試みられた属性から,現在~参照されている~objの属性(その拡張属性の引数で指定される)に “転送-” される。 ◎ If the [PutForwards] extended attribute appears on a read only regular attribute declaration whose type is an interface type, it indicates that assigning to the attribute will have specific behavior. Namely, the assignment is “forwarded” to the attribute (specified by the extended attribute argument) on the object that is currently referenced by the attribute being assigned to. @@ -17109,7 +16880,7 @@

    3.3.16. `PutForwards^x

    -

    3.3.17. `Replaceable^x

    +

    3.3.18. `Replaceable^x

    @@ -17156,7 +16927,7 @@

    3.3.17. `Replaceable^x

    -`Replaceable$x の利用に課される固有の要件については、 +`Replaceable$x の利用に課される特有の要件については、 `es-attributes$sec を見よ。 ◎ @@ -17204,8 +16975,7 @@

    3.3.17. `Replaceable^x

    %counter.value = 'a'; // `Counter::value^V に関係無いもので~propを隠蔽する。 %counter.hasOwnProperty("value"); // @@ -17226,7 +16996,7 @@

    3.3.17. `Replaceable^x

    -

    3.3.18. `SameObject^x

    +

    3.3.19. `SameObject^x

    @@ -17279,7 +17049,7 @@

    3.3.18. `SameObject^x

    -

    3.3.19. `SecureContext^x

    +

    3.3.20. `SecureContext^x

    `SecureContext$x `拡張属性$が[ @@ -17454,7 +17224,7 @@

    3.3.19. `SecureContext^x

    -

    3.3.20. `TreatNonObjectAsNull^x

    +

    3.3.21. `TreatNonObjectAsNull^x

    @@ -17479,7 +17249,7 @@

    3.3.20. `TreatNonObjectAsNull^x

    -`TreatNonObjectAsNull$x の利用に課される固有の要件については、 +`TreatNonObjectAsNull$x の利用に課される特有の要件については、 `es-nullable-type$sec を見よ。 ◎ @@ -17545,7 +17315,7 @@

    3.3.20. `TreatNonObjectAsNull^x

    -

    3.3.21. `TreatNullAs^x

    +

    3.3.22. `TreatNullAs^x

    `TreatNullAs$x `拡張属性$が `DOMString$T 型に現れた場合、次に従ってふるまう,新たな型を作成する @@ -17578,7 +17348,7 @@

    3.3.21. `TreatNullAs^x

    -`TreatNullAs$x の利用に課される固有の要件については、 +`TreatNullAs$x の利用に課される特有の要件については、 `es-DOMString$sec を見よ。 ◎ @@ -17635,7 +17405,7 @@

    3.3.21. `TreatNullAs^x

    -

    3.3.22. `Unforgeable^x

    +

    3.3.23. `Unforgeable^x

    @@ -17732,7 +17502,7 @@

    3.3.22. `Unforgeable^x

    -`Unforgeable$x の利用に課される固有の要件については、 +`Unforgeable$x の利用に課される特有の要件については、 `es-attributes$sec, `es-operations$sec, `es-platform-objects$sec, @@ -17798,7 +17568,7 @@

    3.3.22. `Unforgeable^x

    -

    3.3.23. `Unscopable^x

    +

    3.3.24. `Unscopable^x

    `Unscopable$x `拡張属性$が[ @@ -17848,7 +17618,7 @@

    3.3.23. `Unscopable^x

    -`Unscopable$x の利用に課される固有の要件については、 +`Unscopable$x の利用に課される特有の要件については、 `interface-prototype-object$sec を見よ。 ◎ @@ -18056,7 +17826,7 @@

    3.5. 多重定義~解決~algo

    If there is more than one entry in S, then set d to be the distinguishing argument index for the entries of S.
  • -%values ~LET 空~list(各項は[ +%値~list ~LET 空~list(各項は[ ~IDL値, または特殊~値 `missing^C ]のいずれかになる) ◎ @@ -18122,14 +17892,14 @@

    3.5. 多重定義~解決~algo

    ~index %i に位置する引数は `既定~値$を伴って宣言されている ] ⇒ -その既定~値を %values に付加する +その既定~値を %値~list に付加する ◎ If the argument at index i is declared with a default value, then append to values that default value.
  • ~ELSE ⇒ -特殊~値 `missing^C を %values に付加する +特殊~値 `missing^C を %値~list に付加する ◎ Otherwise, append to values the special value “missing”.
  • @@ -18138,7 +17908,7 @@

    3.5. 多重定義~解決~algo

  • ~ELSE ⇒ -%V を %type 型の`~IDL値に変換-$した結果を %values に付加する +%V を %type 型の`~IDL値に変換-$した結果を %値~list に付加する ◎ Otherwise, append to values the result of converting V to IDL type type.
  • @@ -18556,7 +18326,7 @@

    3.5. 多重定義~解決~algo

    ⇒ ( %V, %method ) から -型 %T の`連列~値を作成-$した結果を, %values に付加する +型 %T の`連列~値を作成-$した結果を, %値~list に付加する ◎ If T is a sequence type, then append to values the result of creating a sequence of type T from V and method. @@ -18566,7 +18336,7 @@

    3.5. 多重定義~解決~algo

    ⇒ ( %V, %method ) から -型 %T の`凍結~配列~値を作成-$した結果を, %values に付加する +型 %T の`凍結~配列~値を作成-$した結果を, %値~list に付加する ◎ Otherwise, T is a frozen array type. Append to values the result of creating a frozen array of type T from V and method. @@ -18616,7 +18386,7 @@

    3.5. 多重定義~解決~algo

    が宣言されている ] ⇒ -その既定~値を %values に付加する +その既定~値を %値~list に付加する ◎ If callable’s argument at index i is declared with a default value, then append to values that default value. @@ -18625,7 +18395,7 @@

    3.5. 多重定義~解決~algo

    %callable の~index %i に位置する引数は`可変個~引数$でない ] ⇒ -特殊~値 `missing^Cを %values に付加する +特殊~値 `missing^Cを %値~list に付加する ◎ Otherwise, if callable’s argument at index i is not variadic, then append to values the special value “missing”. @@ -18633,7 +18403,7 @@

    3.5. 多重定義~解決~algo

  • -~RET ~pair <%callable, %values> +~RET ~pair <%callable, %値~list> ◎ Return the pair <callable, values>.
  • @@ -18652,7 +18422,7 @@

    3.5. 多重定義~解決~algo

    -まず、関数に渡された~JS引数の個数を考慮に入れつつ,妥当な多重定義の選定が行われる: +まず、関数に渡された~JS引数の個数を考慮しつつ,妥当な多重定義の選定が行われる: ◎ First, the selection of valid overloads is done by considering the number of ECMAScript arguments that were passed in to the function:

    @@ -18663,7 +18433,7 @@

    3.5. 多重定義~解決~algo

    If there are more arguments passed in than the longest overload argument list, then they are ignored.
  • -余分な引数を無視した後の引数の個数と,同じ個数の引数をとれる多重定義のみが考慮の対象になる。 +考慮する必要があるのは、余分な引数を無視した後の引数の個数, および同じ個数の引数をとれる多重定義に限られる。 もし無ければ, `TypeError^eE が投出される。 ◎ After ignoring these trailing arguments, only overloads that can take this exact number of arguments are considered. If there are none, then a TypeError is thrown. @@ -18945,13 +18715,13 @@

    3.6.1. ~ifc~obj

    Initialize S to the effective overload set for constructors with identifier id on interface I and with argument count n.
  • -<%constructor, %values> ~LET +<%constructor, %値~list> ~LET %S と %args を`多重定義~解決~algo$に渡した結果 ◎ Let <constructor, values> be the result of passing S and arg0..n−1 to the overload resolution algorithm.
  • -%R ~LET %values を一連の引数~値として, %constructor の記述に挙げられている手続きを遂行した結果 +%R ~LET %値~list を一連の引数~値として, %constructor の記述に挙げられている手続きを遂行した結果 — 例外は再~投出する ◎ Let R be the result of performing the actions listed in the description of constructor with values as the argument values. Rethrow any exceptions. @@ -19472,7 +19242,7 @@
    3.6.5.1. `GetOwnProperty^es

    1. -%operation ~LET `有名~prop取得子$の宣言-時に利用された演算 +%演算 ~LET `有名~prop取得子$の宣言-時に利用された演算 ◎ Let operation be the operation used to declare the named property getter.
    2. @@ -19483,7 +19253,7 @@
      3.6.5.1. `GetOwnProperty^es
    3. ~IF[ -%operation は `識別子$なしに定義されている +%演算 は `識別子$なしに定義されている ] ⇒ %value ~SET [ @@ -19499,7 +19269,7 @@
      3.6.5.1. `GetOwnProperty^es
      ⇒ %value ~SET [ ( %P ) -を引数に, %operation の記述に挙げられている手続きを遂行した結果 +を引数に, %演算 の記述に挙げられている手続きを遂行した結果 ] ◎ Otherwise, operation was defined with an identifier. Set value to the result of performing the steps listed in the description of operation with P as the only argument value. @@ -19858,14 +19628,9 @@

      3.6.7. 属性

  • -%R ~LET [ -%属性,あるいは[ -%属性 がその`取得子を継承-$するように宣言されている場合は,継承された属性 -]]の記述に挙げられている,取得-時に生じる手続きを -— %O ~NEQ `null^v ならば %O 上で — -遂行した結果 +%R ~LET %O 上で %属性 の`下層の値を取得-$した結果 ◎ -Let R be the result of performing the actions listed in the description of attribute that occur on getting (or those listed in the description of the inherited attribute, if this attribute is declared to inherit its getter), on O if O is not null. +Let R be the result of getting the underlying value of attribute given O.
  • ~RET %R を @@ -20205,7 +19970,7 @@

    3.6.7. 属性

    ]には,[[ その~IDL属性に対応する~prop ]が~accessされた -]~objを指す `this^v 値が渡されるので、それらの~propは,~instance特有の~dataを公開できる。 +]~objを指す `this^v 値が渡されるので、それらの~propは,~instanceに特有の~dataを公開できる。 ◎ Note: Although there is only a single property for an IDL attribute, since accessor property getters and setters are passed a this value for the object on which property corresponding to the IDL attribute is accessed, they are able to expose instance-specific data.

    @@ -20412,28 +20177,53 @@

    3.6.8. 演算

    Let S be the effective overload set for regular operations (if op is a regular operation) or for static operations (if op is a static operation) with identifier id on target and with argument count n.
  • -<%operation, %values> ~LET +<%演算, %値~list> ~LET %S と %arg0..%n−1 を`多重定義~解決~algo$に渡した結果 ◎ Let <operation, values> be the result of passing S and arg0..n−1 to the overload resolution algorithm. +
  • +
  • +%R ~LET ~NULL +◎ +Let R be null. +
  • +
  • +~IF[ +%演算 は `Default$x 拡張属性を伴って宣言されている +] +⇒ +%R ~SET %値~list を一連の引数~値として, +%演算 に`対応する既定の演算$に挙げられている動作を %O 上で遂行した結果 +◎ +If operation is declared with a [Default] extended attribute, then: +• Set R be the result of performing the actions listed in operation’s corresponding default operation on O, with values as the argument values.
  • -%R ~LET -( %operation, %values ) を引数に,演算の記述に挙げられている手続きを +~ELSE : +◎ +Otherwise: +

    +
      +
    1. +%R ~SET +( %演算, %値~list ) を引数に,演算の記述に挙げられている手続きを — %O ~NEQ `null^v ならば %O 上で — 遂行した結果 ◎ -Let R be the result of performing the actions listed in the description of operation, on O if O is not null, with values as the argument values. +Set R be the result of performing the actions listed in the description of operation, on O if O is not null, with values as the argument values.
    2. -
    3. +
    4. ~RET %R を[ %op の返値に宣言された型 ]の`~JS値に変換-$した結果 ◎ Return the result of converting R to an ECMAScript value of the type op is declared to return.
    5. +
    +
  • +

    上で例外 %e が投出された場合の手続き: ◎ @@ -20484,19 +20274,351 @@

    3.6.8. 演算

  • %length ~LET %S 内の各~entryの引数~listの長さのうち,最小 ◎ -Let length be the length of the shortest argument list in the entries in S. -
  • - -
  • -~RET %F +Let length be the length of the shortest argument list in the entries in S. +
  • + +
  • +~RET %F +◎ +Return F. +
  • + + + +
    +
    3.6.8.1. 既定の演算
    + +

    +`Default$x `拡張属性$を宣言してよい`正則~演算$は、下に定義される +`対応する既定の演算@ +持つものに限られる。 +`現時点では、~toJSONしかない。^tnote +◎ +Only regular operations which have a corresponding default operation defined below may be declared with a [Default] extended attribute. +

    + +
    +
    3.6.8.1.1. 既定の~toJSON演算
    + +

    +~toJSON演算に`対応する既定の演算$は、`既定の~toJSON演算$で与えられる。 +◎ +The corresponding default operation of the toJSON operation is the default toJSON operation. +

    + +

    +`既定の~toJSON演算$の`返値型$は、 +`object$T で~MUST。 +◎ +The return type of the default toJSON operation must be object. +

    + +

    +`~ifc$ %I の +`既定の~toJSON演算@ +を %O 上で呼出すときは、次の手続きを走らす: +◎ +To invoke the default toJSON operation of interface I on O, run the the following steps: +

    + +
      +
    1. +%~map ~LET 新たな`有順序~map$ +◎ +Let map be a new ordered map. +
    2. +
    3. +%~stack ~LET %I に対する`継承~stackを作成-$した結果 +◎ +Let stack be the result of creating an inheritance stack for interface I. +
    4. +
    5. +%O 上の`属性~値を収集-$する( %~stack, %~map ) +◎ +Invoke collect attribute values on O, passing it stack and map as arguments. +
    6. +
    7. +%結果 ~LET +! `ObjectCreate$A( `ObjectPrototype$esI ) +◎ +Let result be ! ObjectCreate(%ObjectPrototype%). +
    8. +
    9. +

      +%~map 内の~EACH( %key → %value ) に対し: +◎ +For each key → value of map, +

      +
        +
      1. +%k ~LET %key を`~JS値に変換-$した結果 +◎ +Let k be key converted to an ECMAScript value. +
      2. +
      3. +%v ~LET %value を`~JS値に変換-$した結果 +◎ +Let v be value converted to an ECMAScript value. +
      4. +
      5. +! `CreateDataProperty$A( %結果, %k, %v ) +を遂行する +◎ +Perform ! CreateDataProperty(result, k, v). +
      6. +
      +
    10. +
    11. +~RET %結果 +◎ +Return result. +
    12. +
    + + +

    +%O 上の +`属性~値を収集-@ +する抽象~演算は、所与の +( `~stack$ %~stack, `有順序~map$ %~map ) +に対し,次を走らす: +◎ +To invoke the collect attribute values abstract operation on O with stack stack and ordered map map as arguments, run the the following steps: +

    + +
      +
    1. +%I ~LET %~stack から`~pop$した結果 +◎ +Let I be the result of popping from stack. +
    2. +
    3. +

      +~IF[ +%I 上に[ +`Default$x `拡張属性$を伴う~toJSON演算 +]は宣言されている +] +⇒ +%I 上に`公開され$ている`~ifc~mb$のうち,`正則~属性$である ~EACH( %属性 ) に対し: +◎ +If a toJSON operation with a [Default] extended attribute is declared on I, then for each exposed regular attribute attr that is an interface member of I, in order: +

      +
        +
      1. +%id ~LET %属性 の`識別子$ +◎ +Let id be the identifier of attr. +
      2. +
      3. +%値 ~LET %O 上で %属性 の`下層の値を取得-$した結果 +◎ +Let value be the result of getting the underlying value of attr given O. +
      4. +
      5. +~IF[ +%値 は`~JSON型$である +] +⇒ +%~map[ %id ] ~SET %値 +◎ +If value is a JSON type, then set map[id] to value. +
      6. +
      +
    4. +
    5. +

      +[ +左側の`識別子$は %I を参照する +]ような ~EACH( `~implements文$ %文 ) に対し: +◎ +For each implements statements where the left-hand side identifier references I: +

      +
        +
      1. +%R ~LET %文 の右側の`識別子$により表現される`~ifc$ +◎ +Let rhs be the interface represented by the right-hand side identifier. +
      2. +
      3. +%~ifc~list ~LET %R に対する`継承~stackを作成-$した結果 +◎ +Let interfaces be the result of creating an inheritance stack for interface rhs. +
      4. +
      5. +%O 上の`属性~値を収集-$する( %~ifc~list, %~map ) +◎ +Invoke collect attribute values on O, passing it interfaces and map as arguments. +
      6. +
      +
    6. +
    7. +~IF[ +%~stack は`空$でない +] +⇒ +%O 上の`属性~値を収集-$する( %~stack, %~map ) +◎ +If stack is not empty, then invoke collect attribute values on O, passing it stack and map as arguments. +
    8. + +
    + + +

    +`~ifc$ %I に対する +`継承~stackを作成-@ +するときは、次を走らす: +◎ +To create an inheritance stack for interface I, run the the following steps: +

    + +
      +
    1. +%~stack ~LET 新たな`~stack$ +◎ +Let stack be a new stack. +
    2. +
    3. +%~stack に %I を`~push$する +◎ +Push I onto stack. +
    4. +
    5. +%I の`被継承~ifc$である~EACH( `~ifc$ %J ) に対し,最も末端のものから順に +⇒ +%J を %~stack に`~push$する +◎ +While I inherits from an interface, +• Let I be that interface. +• Push I onto stack. +
    6. +
    7. +~RET %~stack +◎ +Return stack. +
    8. +
    + +
    + +

    +下に与える`~IDL片$は、`~ifc$ `A^T の[ +`被継承~ifc$/`広義~帰結~ifc$ +]を成す,いくつかの`~ifc$を定義する +— 次の継承~木に示されるような: +◎ +The following IDL fragment defines a number of interfaces which are inherited or consequential interfaces of A, as show in the below inheritance tree. +

    + + +
    +          F*
    +          |
    +     C    E - I*
    +     |    |
    +     B* - D*
    +     |
    +G* - A - H*
    +
    + +

    +`*^c が付与されている~ifcは、 +`Default$x `拡張属性$を伴う~toJSON`演算$を宣言する。 +◎ +Interfaces markes with an asterisk ("*") declare a toJSON operation with a [Default] extended attribute. +

    + + +
    +interface A : B {
    +  attribute DOMString a;
    +};
    +
    +interface B : C {
    +  [Default] object toJSON();
    +  attribute DOMString b;
    +};
    +
    +interface C {
    +  attribute DOMString c;
    +};
    +
    +interface D : E {
    +  [Default] object toJSON();
    +  attribute DOMString d;
    +};
    +
    +interface E : F {
    +  attribute DOMString e;
    +};
    +
    +interface F {
    +  [Default] object toJSON();
    +  attribute DOMString f;
    +};
    +
    +interface G {
    +  [Default] object toJSON();
    +  attribute DOMString g;
    +};
    +
    +interface H {
    +  [Default] object toJSON();
    +  attribute DOMString h;
    +};
    +
    +interface I {
    +  [Default] object toJSON();
    +  attribute DOMString i;
    +};
    +
    +A implements G;
    +A implements H;
    +B implements D;
    +E implements I;
    +
    + +

    +上に定義した~ifc `A^T を実装している~obj上で `toJSON()^c を~methを~callした場合、次のような~JSON~objを返すことになる: +◎ +Calling the toJSON() method of an object implementing interface A defined above would return the following JSON object: +

    + + +
    +{
    +    "b": "...",
    +    "f": "...",
    +    "i": "...",
    +    "d": "...",
    +    "g": "...",
    +    "h": "..."
    +}
    +
    + +

    +~ifc `B^T を実装している~objでは、次のような~JSON~objを返すことになる: ◎ -Return F. - - +An object implementing interface B would return: +

    + + +
    +{
    +    "b": "...",
    +    "f": "...",
    +    "i": "...",
    +    "d": "..."
    +}
    +
    +
    +
    +
    -
    3.6.8.1. 文字列化子
    +
    3.6.8.2. 文字列化子

    `~ifc$が`公開され$ている`文字列化子$(以下 %文字列化子 と記す)を持つ場合、次の特徴を有する~propが存在し~MUST: @@ -20542,7 +20664,7 @@

    3.6.8.1. 文字列化子

      -
    1. +
    2. %O ~LET `this^v 値~上で `ToObject$A を~callした結果 ◎ Let O be the result of calling ToObject on the this value. @@ -20640,256 +20762,6 @@
      3.6.8.1. 文字列化子
      The value of the Function object’s “name” property is the String value “toString”.

      -
    -
    -
    3.6.8.2. 直列化子
    - -
    -

    -`公開され$ている`直列化子$(以下 %直列化子 と記す)を持つ`~ifc$に対しては、次の特徴を有する~propが存在し~MUST: -

    - -
      -
    • -名前は `toJSON^l -
    • -
    • -値は 下に与える `Function^t ~obj %F 。 -◎ -↓
    • -
    • -属性 `TTT^desc を持つ -
    • -
    - -◎ -If the interface has an exposed serializer, then a property must exist whose name is “toJSON”, with attributes { [[Writable]]: true, [[Enumerable]]: true, [[Configurable]]: true } and whose value is a Function object. -
    - -

    -~propは ~ifcに対する`通例の場所に存在する$。 -◎ -The location of the property is determined as follows: -• If the interface was declared with the [Global] or [PrimaryGlobal] extended attribute, then the property exists on the single object that implements the interface. -• Otherwise, if the interface is a consequential interface of a [Global]- or [PrimaryGlobal]-annotated interface, then the property exists on the single object that implements the [Global]- or [PrimaryGlobal]-annotated interface as well as on the consequential interface’s interface prototype object. -• Otherwise, the property exists solely on the interface’s interface prototype object. -

    - -

    -~prop値 %F は、被呼出時には次に従って挙動し~MUST: -◎ -The property’s Function object, when invoked, must behave as follows: -

    - -
      - -
    1. -~IF[ -%O は `~platform~obj$である -] -⇒ -( %O, %直列化子 の`識別子$, `~meth^C ) -に対し,`保安~検査を遂行する$ -◎ -If O is a platform object, then perform a security check, passing: -• the platform object O, -• the identifier of the serializer, and -• the type “method”. -
    2. -
    3. -~IF[ -%O は[ -%直列化子 を宣言する~ifc -]を実装する~objでない -] -⇒ -~throwTypeError -◎ -If O is not an object that implements the interface on which the serializer was declared, then throw a TypeError. -
    4. -
    5. -

      -%直列化子 の `serializer^c の指定のされ方に応じて: -◎ -Depending on how serializer was specified: -

      - -
      -
      -識別子を伴う`演算$上に指定されたものである場合 -◎ -on an operation with an identifier -
      -
      -
        -
      1. -~RET %O を `this^v 値に利用して, 引数を渡さずに,演算の記述に挙げられている手続きを遂行した結果 -◎ -Return the result of performing the actions listed in the description of the operation, using O as the this value and passing no arguments. -
      2. -
      -
      -
      -~keywordとして指定されたものである場合 -— `直列化~pattern$の有無に関わらず -◎ -as a keyword, either with or without a serialization pattern -
      -
      -
        -
      1. -%S ~LET ~obj %O に対する~ifcの`直列化-時の挙動$を呼出した結果の`直列形の値$ -◎ -Let S be the serialized value that is the result of invoking the serialization behavior of the interface for object O. -
      2. -
      3. -~RET -%S を`~JS値に変換-$seRした結果 -◎ -Return the result of converting S to an ECMAScript value. -
      4. -
      -
      -
      -
    6. -
    - - - -

    -この `Function^t ~objの `name^l ~propの値は、 -`String^t 値 `toJSON^l である。 -◎ -The value of the Function object’s “name” property is the String value “toJSON”. -

    - -

    -直列形の値から -`~JS値に変換-@seR -する手続きは,次で定義される: -◎ -The following steps define how to convert a serialized value to an ECMAScript value: -

    - -
      -
    1. -%S ~LET `直列形の値$ -◎ -Let S be the serialized value. -
    2. -
    3. -

      -%S の型に応じて: -◎ -Depending on the type of S: -

      - -
      -
      ~map◎a map
      -
      -
        -
      1. -%O ~LET 式 `({})^c により作成されるものと同じ,新たな~obj - -◎ -Let O be a new object created as if by the expression ({}). -
      2. -
      3. -

        -~FOR -%S 内の~EACH ( ~entry ) に対し,それらが~mapに追加された順に: -◎ -For each entry in S, in the order they were added to the map: -

        - -
          -
        1. -%V ~LET ~entryの~valueを`~JS値に変換-$seRした結果 -◎ -Let V be the result of converting the value of the entry to an ECMAScript value. -
        2. -
        3. -%P ~LET ~entryの~key -◎ -Let P be the entry’s key. -
        4. -
        5. -`CreateDataProperty$A( %O, %P, %V ) を~callする -◎ -Call CreateDataProperty(O, P, V). -
        6. -
        -
      4. -
      5. -~RET %O -◎ -Return O. -
      6. -
      -
      -
      ~list◎a list
      -
      -
        -
      1. -%A ~LET -式 `[]^c で作成されるものと同じ,新たな `Array^t ~obj -◎ -Let A be a new Array object created as if by the expression []. -
      2. -
      3. -%index ~LET 0 -◎ -Let index be 0. -
      4. -
      5. -

        -~WHILE %index ~LT %S 内の要素~数: -◎ -While index is less than the number of elements in S: -

        - -
          -
        1. -%V ~LET %S 内の~index %index に位置する要素の値を`~JS値に変換-$seRした結果 -◎ -Let V be the result of converting the value of the element in S at index index to an ECMAScript value. -
        2. -
        3. -%P ~LET `ToString$A( %index ) -◎ -Let P be ToString(index). -
        4. -
        5. -`CreateDataProperty$A( %A, %P, %V ) を~callする -【原文の %O を %A に修正】 -◎ -Call CreateDataProperty(O, P, V). -
        6. -
        -
      6. -
      7. -~RET %A -◎ -Return A. -
      8. -
      -
      -
      他の直列形の値◎any other serialized value
      -
      -
        -
      1. -~RET %S を`~JS値に変換-$した結果 -◎ -Let V be the result of converting S to an ECMAScript value. -◎ -Return V. -
      2. -
      -
      -
      -
    4. -
    -
    @@ -20938,7 +20810,10 @@
    3.6.9.1. ~iterator0
  • 名前は ~iterator0 ~symbol
  • - +
  • +値は 下に与える `Function^t ~obj %F +◎ +↓
  • @@ -20946,7 +20821,14 @@
    3.6.9.1. ~iterator0
    then a property must exist whose name is the @@iterator symbol, with attributes { [[Writable]]: true, [[Enumerable]]: false, [[Configurable]]: true } and whose value is a function object. - +

    +~propは ~ifcに対する`通例の場所に存在する$。 +◎ +The location of the property is determined as follows: +• If the interface was declared with the [Global] or [PrimaryGlobal] extended attribute, then the property exists on the single object that implements the interface. +• Otherwise, if the interface is a consequential interface of a [Global]- or [PrimaryGlobal]-annotated interface, then the property exists on the single object that implements the [Global]- or [PrimaryGlobal]-annotated interface as well as on the consequential interface’s interface prototype object. +• Otherwise, the property exists solely on the interface’s interface prototype object. +

    ~prop値 %F は、次で与えられる: @@ -21148,7 +21030,9 @@

    3.6.9.2. forEach
    名前は `forEach^l - +
  • +属性 `TTT^desc を持つ +
  • ◎ @@ -21643,7 +21527,7 @@
    3.6.10.4. 既定の反復子~obj
    ~target
    -反復される値を供給する~obj +反復される値を~~供給する~obj ◎ its target, which is an object whose values are to be iterated,
    @@ -21772,12 +21656,12 @@
    3.6.10.5. 反復子~原型~obj
    Let kind be object’s kind.
  • -%values ~LET `反復される値~pair$の~list +%値~list ~LET `反復される値~pair$の~list ◎ Let values be the list of value pairs to iterate over.
  • -%len ~LET %values の長さ +%len ~LET %値~list の長さ ◎ Let len be the length of values.
  • @@ -21792,7 +21676,7 @@
    3.6.10.5. 反復子~原型~obj
    If index is greater than or equal to len, then return CreateIterResultObject(undefined, true).
  • -%pair ~LET %values 内の %index に位置する~entry +%pair ~LET %値~list 内の %index に位置する~entry ◎ Let pair be the entry in values at index index.
  • @@ -23321,14 +23205,14 @@

    3.9.4. `Delete^es

    If O does not implement an interface with a named property deleter, then return false.
  • -%operation ~LET `有名~prop削除子$の宣言-時に利用された演算 +%演算 ~LET `有名~prop削除子$の宣言-時に利用された演算 ◎ Let operation be the operation used to declare the named property deleter.
  • ~IF[ -%operation は `識別子$を伴わずに定義されている +%演算 は `識別子$を伴わずに定義されている ]: ◎ If operation was defined without an identifier, then: @@ -23363,13 +23247,13 @@

    3.9.4. `Delete^es

  • ( %P ) を引数に, -%operation の記述に挙げられている手続きを遂行する +%演算 の記述に挙げられている手続きを遂行する ◎ Perform the steps listed in the description of operation with P as the only argument value.
  • ~IF[ -%operation は `返値型$ `boolean$T を伴って宣言されている +%演算 は `返値型$ `boolean$T を伴って宣言されている ]~AND[ その手続きから `false^V が返された ] @@ -23448,14 +23332,14 @@

    3.9.5. `Call^es

  • -( %values ) -を引数に,旧来呼出子 %operation の記述に挙げられている手続きを遂行する +( %値~list ) +を引数に,旧来呼出子 %演算 の記述に挙げられている手続きを遂行する ◎ Perform the actions listed in the description of the legacy caller operation with values as the argument values.
  • ~RET [ -その %operation の返値として宣言されている型が +その %演算 の返値として宣言されている型が `void$T ならば `undefined^v / ~ELSE_ 前段の返値を`~JS値に変換-$した結果 ] @@ -23750,12 +23634,12 @@

    3.9.8. 各種 抽象~演算

    Let creating be true if index is not a supported property index, and false otherwise.
  • -%operation ~LET `有index~prop設定子$の宣言-時に利用された演算 +%演算 ~LET `有index~prop設定子$の宣言-時に利用された演算 ◎ Let operation be the operation used to declare the indexed property setter.
  • -%T ~LET %operation の 2 個目の引数の型 +%T ~LET %演算 の 2 個目の引数の型 ◎ Let T be the type of the second argument of operation.
  • @@ -23796,7 +23680,7 @@

    3.9.8. 各種 抽象~演算

    ⇒ ( %index, %value ) を引数に, -%operation の記述に挙げられている手続きを遂行する +%演算 の記述に挙げられている手続きを遂行する ◎ Otherwise, operation was defined with an identifier. Perform the steps listed in the description of operation with index and value as the two argument values. @@ -23816,7 +23700,7 @@

    3.9.8. 各種 抽象~演算

    1. -%operation ~LET `有名~prop設定子$の宣言-時に利用された演算 +%演算 ~LET `有名~prop設定子$の宣言-時に利用された演算 ◎ Let operation be the operation used to declare the named property setter.
    2. @@ -23854,7 +23738,7 @@

      3.9.8. 各種 抽象~演算

      ⇒ ( %P, %value ) を引数に, -%operation の記述に挙げられている手続きを遂行する +%演算 の記述に挙げられている手続きを遂行する ◎ Otherwise, operation was defined with an identifier. Perform the steps listed in the description of operation with P and value as the two argument values. @@ -23886,14 +23770,14 @@

      3.9.8. 各種 抽象~演算

      1. -%operation ~LET `有index~prop取得子$の宣言-時に利用された演算 +%演算 ~LET `有index~prop取得子$の宣言-時に利用された演算 ◎ Let operation be the operation used to declare the indexed property getter.
      2. ~IF[ -%operation は `識別子$を伴わずに定義されている +%演算 は `識別子$を伴わずに定義されている ] ⇒ %value ~SET [ @@ -23909,7 +23793,7 @@

        3.9.8. 各種 抽象~演算

        ⇒ %value ~SET [ ( %index ) -を引数に, %operation の記述に挙げられている手続きを遂行した結果 +を引数に, %演算 の記述に挙げられている手続きを遂行した結果 ] ◎ Otherwise, operation was defined with an identifier. Set value to the result of performing the steps listed in the description of operation with index as the only argument value. @@ -23963,7 +23847,7 @@

        3.9.8. 各種 抽象~演算

        1. -%operation ~LET `有名~prop取得子$の宣言-時に利用された演算 +%演算 ~LET `有名~prop取得子$の宣言-時に利用された演算 ◎ Let operation be the operation used to declare the named property getter.
        2. @@ -25160,7 +25044,7 @@

          3.14. 例外~obj

          `code^l ~propを持つこと ]を除いて,~JS仕様が定義する他の種々の~native `Error^t ~objと同様になることである。 ~native `Error^t ~obj上に -— 例えば~stack~traceや~error行番号などを公開するような — +— 例えば~stack-traceや~error行番号などを公開するような — 非標準の~propを与える実装は、それらを例外~obj上にも公開しなければならないことになる。 ◎ Note: The intention is for DOMException objects to be just like the other various native Error objects that the ECMAScript specification defines, apart from responding differently to being passed to Object.prototype.toString and it having a “code” property. If an implementation places non-standard properties on native Error objects, exposing for example stack traces or error line numbers, then these ought to be exposed on exception objects too. @@ -25474,7 +25358,7 @@

          5. 拡張性

          言語束縛の要件に対する拡張は、この文書~内で定義される拡張属性と競合しない`拡張属性$を利用して指定できる。 [ -私的な~project特有の利用 +私的な~projectに特有の利用 ]のための拡張は、他の仕様に現れる`~IDL片$に含められるべきではない。 他の仕様の用途に要求される拡張は、この文書の将来~versionに取り込まれるためには, Web IDL の担当グループ(この文書が書かれた時点では @@ -25696,7 +25580,7 @@

          ~IDL文法

          ~IDL構文においては、文字の大小は,文法~内で利用される引用符で括られた終端~記号と -`identifier$g 終端~記号に利用される値の,いずれにおいても区別される。 +`identifier$g 終端~記号に利用される値の,いずれにおいても~~区別される。 したがって、例えば入力~text “Const” は,終端~記号 `const^sym ではなく `identifier$g として~tok化され、 @@ -25892,7 +25776,7 @@

          表記規約

        3. -規定でない注記: +規範的でない注記: ◎ Non-normative notes:

          @@ -25905,7 +25789,7 @@

          表記規約

        4. -規定でない例: +規範的でない例: ◎ Non-normative examples:

          @@ -25920,7 +25804,7 @@

          表記規約

        5. -規定の警告: +規範的な警告: ◎ Normative warnings:

          @@ -26005,7 +25889,7 @@

          適合性

          -この仕様では、次に挙げる主体が適合性の対象になるものと定義される: +この仕様では、次に挙げるものが適合性クラスとして定義される: ◎ The following conformance classes are defined by this specification:

          @@ -26099,237 +25983,21 @@

          文献(参考)

          +