1. 序論
この仕様は、 指定された誘発体を呼出している様々な利用者ヤリトリに基づく, ~animationの再生に影響するための仕組みを定義する。 ~animation用の誘発体を指定することにより、 当の~animationは `誘発される~animation@ になり,その再生の開始を当の誘発体が生じるまで遅延させる。 これらの誘発体になり得るものには、[ ある種の `Event$I `DOM$r, `時列線$(`~view進捗~時列線$ `SCROLL-ANIMATIONS-1$r など)に基づくもの ]どちらもある。 ◎ This specification defines mechanisms for affecting an animation’s playback based on various user interactions invoking a specified trigger. By specifying a trigger for an animation, that animation becomes a triggered animation, making its playback start delayed until that trigger occurs. These triggers can be certain Events defined in [DOM], or timeline based, such as view progress timelines. [SCROLL-ANIMATIONS-1]
この~moduleは、[ `WEB-ANIMATIONS-1$r の上に築かれる命令的な~API ]および[ `CSS-ANIMATIONS-2$r の上に築かれる宣言的な~API ]を供する ◎ This module provides both an imperative API building on the Web Animations API as well as a declarative API building on CSS Animations. [CSS-ANIMATIONS-2] [WEB-ANIMATIONS-1]
1.1. 他の仕様との関係性
`WEB-ANIMATIONS-1$r は、 ~Web~platform上の~animation用に 抽象的な概念的な~modelを — この~modelを成す要素( `~animation$や`時列線$を含む), それに結付けられる~APIと伴に — 定義する。 この仕様は、 `誘発される~animation$を定義することにより,その~Web~animation~modelを拡張する — それは、[ それらに対し誘発体を利用して,`再生~制御~機能$を遂行する ]ことを許容する。 ◎ Web Animations [WEB-ANIMATIONS-1] defines an abstract conceptual model for animations on the Web platform, with elements of the model including animations and timelines, and associated programming interfaces. This specification extends the Web Animations model by defining triggered animation and allowing to perform playback control functions on them using triggers.
この仕様は、[ これらの概念とヤリトリするための~API ]および[ これらの概念を `CSS-ANIMATIONS-2$r に適用する~CSS~prop ]を導入する。 ~scriptingを~supportしない`~UA@~INFRA#user-agent$であっても、 これらの~CSS~propの挙動が~APIの用語で述べられる所では[ ~CSS特能を下層の~APIが場を占めていたかのように挙動するよう実装する ]ことにより,この仕様に適合し得る。 ◎ This specification introduces both programming interfaces for interacting with these concepts, as well as CSS properties that apply these concepts to CSS Animations [CSS-ANIMATIONS-2]. To the extent the behavior of these CSS properties is described in terms of the programming interfaces, User Agents that do not support scripting may still conform to this specification by implementing the CSS features to behave as if the underlying programming interfaces were in place.
この仕様は、 進捗に基づく[ `時列線$, `~animation$ ]を指定するために, `SCROLL-ANIMATIONS-1$r において導入された各種[ 時列線, 範囲 ]の概念を利用する。 ◎ This specification uses the timeline and ranges concept introduced in the Scroll-Driven Animations module [SCROLL-ANIMATIONS-1] for specifying progress-based timelines and animations.
この仕様における特能は、 ~CSSにおける ほとんどの演算(`選択子$の照合は別として)と同様に, `平坦~化された要素~tree$に対し演算する。 ◎ Like most operations in CSS besides selector matching, features in this specification operate over the flattened element tree.
1.2. 値~定義
【 この節の内容は `~CSS日本語訳 共通~page@~CSScommon#values$に移譲。 】
2. 誘発体
~CSS~animationは,既定では[ 要素~上に適切な `animation$p 値たちが設定され次第, 自動的に稼働する ]が、 `animation-trigger$p ~propは, 当の~animationが`誘発される~animation$になることを許容する — すなわち、 当の~animationの開始を適切な誘発-が生じるまで遅延することに加え, 誘発-により[ 静止する/開始し直す/設定し直す ]ことまでも許容する。 ◎ While CSS animations are, by default, automatically run as soon as the appropriate animation values have been set on an element, the animation-trigger property allows the animation’s start to be delayed until an appropriate trigger occurs, and even paused, restarted, or reset by triggers (making it a triggered animation).
現時点では、 `誘発体@ ( `trigger^en ) には,次に挙げる 2 つの種別が定義される: ◎ Currently, two types of triggers are defined:
- `時列線~誘発体$ ◎ timeline triggers,\
- `timeline-trigger$p ~propの下位propたちにより管理され、 ~animationが,ある種の時列線~範囲[ に入る/から出る ]ことにより誘発されることを許容する。 (通例的には、 `~view進捗~時列線$ — そこでは、 要素が~screen上に来たとき~animationを開始できる。) ◎ managed by the timeline-trigger properties, which allow animations to be triggered by entering or leaving certain timeline ranges. (Usually, view progress timelines, so an animation can be started when an element comes on-screen.)
- `~event誘発体$ ◎ event triggers,\
- `event-trigger$p ~propの下位propたちにより管理され、 ~animationが,ある種の利用者ヤリトリ~event — ある要素を~clickする, ある種の~UIkeyを押下げる, など — により誘発されることを許容する。 ◎ managed by the event-trigger properties, which allow animations to be triggered by certain user-interaction events, such as clicking an element or pressing certain keys.
`誘発体$は、 何らかの特定の要素~上で`定義される^em — それに結付けられた動作が,当の要素に対し誘発されるよう。 すべての`誘発体$は、 `名前@tG を有する。 誘発体の種別は、 それが,いつ, どう作動化されるかを規定する。 誘発体は、 複数の “型” を成す作動化を定義し得る (例えば,`時列線~誘発体$は、 【現-時刻が,指定された範囲】[ 【に】入るとき, 【から】出るとき ]で異なる動作を行い得る) ◎ A trigger is defined on some specific triggering element. All triggers have a trigger name, and the specific type of trigger dictates how and when it’s activated. A trigger can define multiple "types" of activation. (For example, timeline triggers can do different things on entry and exit.)
`誘発体$は、 どの要素にも`利用される^em能性があり, 当の要素に対し `誘発-~instance@ ( `trigger instance^en ) を作成する。 (例えば `animation-trigger$p は、 当の要素~上の`誘発-~instance$を当の要素に対する特定の~animationに結付ける。) `誘発体$を利用している要素は、[ 当の誘発体が作動化されたとき,動作として何をとるか ]を指定する。 ◎ A trigger is used on potentially any element, creating a trigger instance on the element. (For example, animation-trigger associates a trigger instance with a specific animation on the element.) The trigger-using element specifies what actions to take when the trigger activates.
注記: 将来において,`誘発体$を`他の目的^emに利用することを~supportするため、[ `誘発体$, `誘発-~instance$ ]用のこの設計, および それらに[ `誘発される~animation$, `animation-action$t ]を結付ける仕方は, 意図的に いくぶん汎用である。 この特能を利用するものは、 今の所は,`誘発される~animation$しかないが。 【~animation以外の目的にも利用されるかもしれない。】 ◎ Note: This design for triggers and trigger instances, and the way they’re associated with triggered animations and <animation-action>s, is intentionally somewhat generic, intended to support using triggers for other purposes in the future. For now, though, triggered animations are the only user of this feature.
単独の要素が複数個の[ 同じ`名前$tGを伴うが種別は異なる`誘発体$ ]を定義するよう試みた場合、 それらのうち 1 個に限り公開される — `~event誘発体$が`時列線~誘発体$よりも優先される下で。 ◎ If a single element attempts to define multiple triggers of different types with the same trigger name, it only exposes one of the triggers, with event triggers winning over timeline triggers.
注記: この順序は、 完全に恣意的である 【!概念~名の~alphabetic順序に基づく】 — これは、 単なる~error事例なので。 ◎ Note: This order is completely arbitrary (based on alphabetic order of the concept name), as this is just an error case.
2.1. 誘発体の名前の視野~法: `trigger-scope^p ~prop
`誘発体$の`名前$tGは、 既定では大域的であり, 他のどこに位置する要素からも【 `animation-trigger$p を介して】利用-可能になる (それは、 `~tree視野な名前$であり,`~shadow根$との相互作用を有するが)。 複数個の要素が同じ`名前$tGを伴う`誘発体$を定義する場合、 `~tree順序$で後にある要素により定義された`誘発体$が利用される。 ◎ Trigger names are global by default, usable by other elements regardless of their position. (Though they are tree-scoped names, so have interactions with shadow roots). If multiple elements define triggers with the same trigger name, the trigger defined by the later element in tree order is used.
`trigger-scope$p ~propにより, `名前$tGの視野を文書を成すある下位treeへ制限できる — その外側にある要素からは,`名前$tGは見えなくなり、 その内側にある要素からは,当の視野の内側で定義された`名前$tGしか見えなくなるよう。 ◎ The trigger-scope property can limit the scope of a name to a subtree of the document, so elements outside won’t see the chosen trigger name, and elements inside will only see the version of the trigger name defined inside the scope.
この~propは、 `誘発体$の`名前$tGの視野を当の要素を成す下位treeに絞る。 各種~値の意味は: ◎ This property scopes trigger names to the subtree of the matching element. Its values are:
- `none@v
- `名前$tGの視野は変更されない。 ◎ No changes in trigger name scope.
- `all@v
-
次を指定する:
- [[ 当の要素/その子孫たち ]により定義された`誘発体$ ]の`名前$tGが視野に入る要素は、[ 当の要素の`平坦~tree$における子孫 ]に限られる — 子孫のうち[ `trigger-scope$p を利用している【当の要素の】ある子孫により,すでに視野が制限された ]ものを除いて
-
当の要素の子孫たちは、 この下位treeの中の`誘発体$†の`名前$tGにしか合致しないよう視野が制限される
【† たぶん,前項との一貫性から[ [当の要素/その子孫たち] により定義された`誘発体$ ]を指すと思われる。 】
- この値は、 同じ~tree視野~内の`名前$tGに限り影響する — それが,`厳密に照合される$tsN `~tree視野な名前$であったかのように (すなわち, `trigger-scope$p の値に[ 関連な`名前$tGすべてが `dashed-ident$t として — `--foo, --bar, ...^v 等々の様に — 挙げられた ]かのように動作する)。 ◎ This value only affects trigger names in the same tree scope, as if it were a strictly matched tree-scoped name. (That is, trigger-scope: all acts identically to trigger-scope: --foo, --bar, ..., listing all relevant trigger names.)
- 【† 上で述べた “`平坦~tree$における” と “`厳密に照合される$tsN” が整合でないように思われるが? 】
- `dashed-ident$t
- 対象になる`名前$tGが所与の `dashed-ident^t に限定されることを除いて, `all$v と同様になる。 ◎ Specifies that a matching trigger name defined by this element or its descendants—whose scope is not already limited by a descendant using trigger-scope—to be in scope only for this element’s flat tree descendants; and limits descendants to only match these trigger names to triggers within this subtree.
- `dashed-ident$t は、 `厳密に照合される$tsN `~tree視野な名前$を表現する — すなわち、 それが照合し得る`名前$tGは,同じ~shadow~tree内にあるものに限られる。 `CSS-SHADOW-1$r【!CSS-SCOPING-1】 ◎ The <dashed-ident> represents a strictly matched tree-scoped name, i.e. it can only match against trigger names in the same shadow tree.[CSS-SCOPING-1]
2.2. 時列線~誘発体
`時列線~誘発体@ ( `timeline trigger^en )は、 何らかの`時列線$【の`現-時刻$】が当の誘発体の[ `作動化~範囲@tT ( `activation range^en 【作動化されることになる範囲】)に入るとき/ `作動~範囲@tT ( `active range^en 【作動中である範囲】)から出るとき ]に作動化される`誘発体$である。 それは、[ `timeline-trigger$p 略式~propや, その下位propたち ]を伴う【 `timeline-trigger-name$p が初期~値~以外をとる】要素~上で定義される。 ◎ A timeline trigger is a trigger which is activated when some timeline enters the trigger’s activation range, or leaves the trigger’s active range. It is defined on an element with the timeline-trigger shorthand property, or its longhands.
各 `時列線~誘発体$ %誘発体 には、 真偽値をとる `作動中か@tT 【!誘発体~状態】 が結付けられる — 初期~時は ~F とする: ◎ A timeline trigger has a binary trigger state associated with it; it is initially "inactive".\
- ~F をとる間は、 %誘発体 に結付けられた`時列線$【の`現-時刻$】が %誘発体 の`作動化~範囲$tTに入ったとき (または,そこで開始されたとき), %誘発体 に結付けられた `入口~動作@tT 【!entry action】 を遂行することに加え, %誘発体 の`作動中か$tTを ~T へ切替える。 ◎ While it’s "inactive", the associated timeline entering (or starting in) the trigger’s activation range performs an associated entry action and switches the trigger state to "active";\
- ~T をとる間は、 %誘発体 に結付けられた`時列線$【の`現-時刻$】が %誘発体 の`作動~範囲$tTから`出た^emとき, %誘発体 に結付けられた `出口~動作@tT を遂行することに加え, %誘発体 の`作動中か$tTを ~T へ切替える。 ◎ while it’s "active", the associated timeline leaving the trigger’s active range performs an associated exit action and switches the trigger state to "inactive".
【 `作動中か$tTは、 原文では “`trigger state^en(誘発体~状態)” と称され,[ "`inactive^en", "`active^en" ]をとり得るものと定義されるが、 この訳では,真偽-~flagで表現することにする。 】
注記: 既定では、 `作動~範囲$tTは`作動化~範囲$tTと同じになる — 手動で指定されときでも、 `作動~範囲$tTは,常に`作動化~範囲$tTの`上位集合^emになる。 この 2 つの範囲は、 例えば,ある `animation-trigger$p が[ 要素が~screenの中央近くに~scrollされたとき, (`作動化~範囲$tTとして比較的~小さな窓を伴う`~view進捗~時列線$を利用して) ~animationを開始する ]が[ 要素が全部的に~screenから外れるまでは, (`作動~範囲$tTとして `cover@~SCROLL-ANIM#valdef-animation-timeline-range-cover$v を利用して) それを停止しない ]ことを許容する。 ◎ Note: By default, the active range is the same as the activation range; even when manually specified, the active range is always a superset of the activation range. The two ranges allow, for example, an animation-trigger to start an animation when an element is scrolled close to the center of the screen (using a view progress timeline with a relatively small window as the activation range), but not stop it until the element is fully off-screen (using cover as the active range).
`時列線~誘発体$は、 ある要素~上の誘発体として( `animation-trigger$p などにより)利用されるときは, 1 個か 2 個の動作が結付けられ得る。 当の誘発体の`入口~動作$tTは, 1 個目のそれになり、 `出口~動作$tTは, 2 個目も指定されたならば それ, 指定されなかったならば何もしない。 ◎ A timeline trigger can have one or two actions associated with it when used as a trigger on an element (such as by animation-trigger). If two are specified, the first is the trigger’s entry action and the second is the trigger’s exit action; if only one is specified, the first is the trigger’s entry action and its exit action is to do nothing.
要素は,複数個の`時列線~誘発体$を定義し得るが、 それらが利用する`時列線$は[ 同じになる/異なる ]必要はなく,時列線が同じでも異なる範囲を伴い得る。 `timeline-trigger$p の下位propたちが成す集合は、 `協調している~list~prop~group$を形成する。 `timeline-trigger-name$p が, `協調している基底~list~prop$になり、 `協調される値~list$を成す各~itemは, 1 個の`時列線~誘発体$を成す~prop群を定義する。 ◎ An element can define multiple timeline triggers, using the same timeline (potentially with different ranges) or different ones. The set of timeline-trigger longhands form a coordinating list property group, with timeline-trigger-name as the coordinating list base property, and each item in the coordinated value list defining the properties of a single timeline trigger.
2.2.1. 誘発体の命名-法: `timeline-trigger-name^p ~prop
`none^v が指定された場合、 当の要素は,`時列線~誘発体$を定義しない。 ◎ If none is specified, the element does not define any timeline triggers.
~list内に同じ `dashed-ident$t が複数回~現れる場合、 最後のものに限り`時列線~誘発体$を定義する — それ以外のものには効果は無い。 ◎ If the same <dashed-ident> appears multiple times in the list, only the last one defines a timeline trigger; the preceding ones have no effect.
2.2.2. 時列線の~link法: `timeline-trigger-source^p ~prop
`timeline-trigger-source$p ~propは、 当の`時列線~誘発体$に結付けられる`時列線$を指定する。 各種~値の意味は、 次を除いて, `animation-timeline$p 用のそれらと同じである ⇒ 値 `none^v は、 `協調される値~list$を成す対応する~entryが, `時列線~誘発体$を定義しないようにする。 ◎ The timeline-trigger-source property specifies the timeline trigger’s associated timeline. Values have the same meaning as those of animation-timeline, except that none instead causes the corresponding entry in the coordinated value list to not define a timeline trigger.
2.2.3. 作動化~範囲: `timeline-trigger-activation-range^p ~prop
`timeline-trigger-activation-range$p ~propは、 単独の宣言で[ `timeline-trigger-activation-range-start$p, `timeline-trigger-activation-range-end$p ]を一緒に設定する`略式~prop$である。 その構文は、 `animation-range$p ~propと同じである。 ◎ The timeline-trigger-activation-range property is a shorthand property that sets timeline-trigger-activation-range-start and timeline-trigger-activation-range-end together in a single declaration. It has the same syntax as the animation-range property.
`timeline-trigger-activation-range$p の挙動は、 `WEB-ANIMATIONS-2$r `§ ~animation誘発体の範囲@~WANIM2#trigger-ranges$ にて定義される。 ◎ The behavior of timeline-trigger-activation-range is defined in Web Animations 2 § 3.6.5 Animation Trigger Ranges.
次に挙げる時列線~範囲に相対的:
- `timeline-range-name$t と伴に指定された場合 ⇒ それにより指定される`有名~時列線~範囲$
- 他の場合 ⇒ 当の時列線~全体
[ `timeline-trigger-activation-range-start$p / `timeline-trigger-activation-range-end$p ]~propは、 `時列線~誘発体$に結付けられた`作動化~範囲$tTを指定する。 各種~値の意味は、[ `animation-range-start$p, `animation-range-end$p ]用のそれらと同じである。 ◎ The timeline-trigger-activation-range-start and timeline-trigger-activation-range-end properties specify the timeline trigger’s associated activation range. Values have the same meaning as animation-range-start and animation-range-end.
2.2.4. 作動~範囲: `timeline-trigger-active-range^p ~prop
`timeline-trigger-active-range$p ~propは、 単独の宣言で[ `timeline-trigger-active-range-start$p, `timeline-trigger-active-range-end$p ]を一緒に設定する`略式~prop$である。 その構文は、 `animation-range$p ~propと同じである。 ◎ The timeline-trigger-active-range property is a shorthand property that sets timeline-trigger-active-range-start and timeline-trigger-active-range-end together in a single declaration. It has the same syntax as the animation-range property.
`timeline-trigger-active-range$p の挙動は、 `WEB-ANIMATIONS-2$r `§ ~animation誘発体の範囲@~WANIM2#trigger-ranges$ にて定義される。 ◎ The behavior of timeline-trigger-active-range is defined in Web Animations 2 § 3.6.5 Animation Trigger Ranges.
次に挙げる時列線~範囲に相対的:
- `timeline-range-name$t と伴に指定された場合 ⇒ それにより指定される`有名~時列線~範囲$
- 他の場合 ⇒ 当の時列線~全体
[ `timeline-trigger-active-range-start$p / `timeline-trigger-active-range-end$p ]~propは、 当の`時列線~誘発体$に結付けられる`作動~範囲$tTを指定する。 各種~値の意味は、[ `animation-range-start$p, `animation-range-end$p ]用のそれらと同じであるが, 次に挙げる追加を伴う: ◎ The timeline-trigger-active-range-start and timeline-trigger-active-range-end properties specify the timeline trigger’s associated active range. Values have the same meaning as animation-range-start and animation-range-end, with the following addition:
- `auto@v
- [ `timeline-trigger-active-range-start$p / `timeline-trigger-active-range-end$p ]用には、[ 始端/終端 ]は,当の`時列線~誘発体$の`作動化~範囲$tTの[ 始端/終端 ]に等しくなる。 ◎ The start (for timeline-trigger-active-range-start) or end (for timeline-trigger-active-range-end) is equal to the start/end of the timeline trigger’s activation range.
2.2.5. `timeline-trigger^p 略式
`timeline-trigger$p `略式~prop$は、 次に挙げる~propを一緒に設定する ⇒# `timeline-trigger-name$p, `timeline-trigger-source$p, `timeline-trigger-activation-range$p, 任意選択で† `timeline-trigger-active-range$p 【† すなわち,省略時は初期~値に設定される】 ◎ The timeline-trigger shorthand property sets all of timeline-trigger-name, timeline-trigger-source, timeline-trigger-activation-range, and optionally timeline-trigger-active-range at once.
値 `none@v は、 `none none normal^v と等価になる。 ◎ A value of none is equivalent to none none normal.
注記: この略式~propを成す値たちは、 構文に指定されたとおりの順序で与える必要がある — 他では共通的な,どの順序でも設定-可能ではなく。 さもなければ、[ `timeline-trigger-name$p と `timeline-trigger-source$p 内の`時列線$の名前 ]や[ `作動化~範囲$tTと`作動~範囲$tT ]が多義的になり得るので。 ◎ Note: Due to significant potential ambiguities in the syntax (timeline-trigger-name vs timeline names in timeline-trigger-source; activation ranges vs active ranges), this shorthand’s values must be given in the specified order, rather than being settable in any order as is more common.
2.3. ~event誘発体
`~event誘発体@ ( `event trigger^en )は、 当の要素に向けてある種の~event( `Event$I )が発火されたとき作動化される`誘発体$である。 それは、[ `event-trigger$p 略式~propや, その下位propたち ]を伴う【 `event-trigger-name$p が初期~値~以外をとる】要素~上で定義される。 ◎ An event trigger is a trigger which is activated when certain Events are fired at the element. It is defined on an element with the event-trigger shorthand property, or its longhands.
各`~event誘発体$は、[ 無状態, 有状態 ]いずれかとして定義し得る ⇒# 無状態なものは`入口~event群$eTのみを有する。 有状態なものは[ `入口~event群$eT, `出口~event群$eT ]どちらも有する。
[ `入口~event群@eT / `出口~event群@eT ]は、 いずれも, 当の誘発体を作動化することになる~event†たちが成す集合である。 [ 入口~event/出口~event ]は、 そのような~eventの総称である。
【† 精確には、 どの~eventに合致するかを指定する条件。 通例的には、 ~event型を成す文字列( `click^et など)として与えられる — `event-trigger-event$t を見よ。 】
◎ An event trigger can be defined as either stateless or stateful: • If stateless, it has a single set of enter events that activate it. • If stateful, it has two sets of events, its enter events and another set of exit events.`~event誘発体$ %誘発体 は、 ~page上で ~AND↓ を満たす `Event$I ~objが発火されたとき, 作動化されることになる:
-
その`~target$【!`target$m】 ~EQ %誘発体 を定義している要素
この条件(ある提案による)は,[ 当の~eventの`~target$ ~EQ 当の要素 ]か否かしか~careしないものと指定しているが、 おそらく,[ 浮上する/捕捉する ]ことも許容するよう求まれる — 場合によっては、 任意選択で。 【この段落は、原文では他所に記されている(そのため、意図不明になっていた)。】
- %誘発体 の[ `入口~event群$eT/`入口~event群$eT ]を成すいずれかに合致する
各[ 有状態な`~event誘発体$ ] %誘発体 には、 真偽値をとる `作動中か@eT 【!誘発体~状態】 が結付けられる — 初期~時は ~F とする: ◎ If it’s stateful, it has a binary trigger state associated with it, initially "inactive":\
- ~F をとる間は、 %誘発体 は,それを定義している要素が[ %誘発体 の`入口~event群$eTを成すいずれかに合致する~event ]を受取ったとき限り作動化され、 %誘発体 に結付けられた `入口~動作@eT を遂行することに加え, %誘発体 の`作動中か$eTを ~T へ切替える。 ◎ while "inactive", it only activates when the defining element receives one of its enter events, performing an associated enter action and switching its trigger state to "active";\
- ~T をとる間は、 %誘発体 は,それを定義している要素が[ %誘発体 の`出口~event群$eTを成すいずれかに合致する~event ]を受取ったとき限り非作動化され、 %誘発体 に結付けられた `出口~動作@eT を遂行することに加え, %誘発体 の`作動中か$tTを ~F へ切替える。 ◎ while "active", it only deactivates when it receives one of its exit events, performing an associated exit action and switching its trigger state back to "inactive".
【 `作動中か$eTは、 原文では “`trigger state^en(誘発体~状態)” と称され,[ "`inactive^en", "`active^en" ]をとり得るものと定義されるが、 この訳では,真偽-~flagで表現することにする。 】
無状態な`~event誘発体$ %誘発体 には、 その`誘発-~instance$用の動作を正確に 1 個だけ与えなければナラナイ。 有状態な`~event誘発体$には、 1 個か 2 個を与えれる。 %誘発体 の`入口~動作$eTは, 1 個目に供されたそれになる。 %誘発体 が無状態ならば、 その`出口~動作$eTは,[ 2 個目が供されたならば それ/ 他の場合は何もしない動作 ]になる。 ◎ A stateless event trigger must be given exactly one action for its trigger instance. A stateful one can be given one or two: the first is its enter action, and the second, if provided, is its exit action; if the second is not provided, the exit action is to do nothing.
注記: 無状態な`~event誘発体$と有状態な`~event誘発体$は、 【後者に】動作が 1 個【`入口~動作$eT用のそれ】しかアテガわれなかった場合でも,異なるように動作する。 有状態かつ動作が 1 個だけのものは、 `入口~event$を受取ってから,`出口~event$を受取るまでは、 実質的に “オフ” になる — その間に受取った他の`入口~event$を無視して。 一方で,無状態な`~event誘発体$は、 各`入口~event$に対し,毎回~動作を誘発することになる。 ◎ Note: A stateful and stateless event trigger act differently even if you only assign a single action; a single-action stateful event trigger will effectively "turn off" until it receives one of its exit events, ignoring any of the enter events after the first, while a stateless one will repeatedly trigger for every enter event.
要素は,複数個の`~event誘発体$を定義し得るが、 それらが利用する~event型【! `Event$I 】たちは[ 同じになる/異なる ]必要はない。 `event-trigger$p の下位propたちが成す集合は、 `協調している~list~prop~group$を形成する。 `event-trigger-name$p が, `協調している基底~list~prop$になり、 `協調される値~list$を成す各~itemは, 1 個の`~event誘発体$を成す~prop群を定義する。 ◎ An element can define multiple event triggers, using the same Events or different ones. The set of event-trigger longhands form a coordinating list property group, with event-trigger-name as the coordinating list base property, and each item in the coordinated value list defining the properties of a single event trigger. ◎ ↑↑ The proposal I drew this text from specified that it only cares if the element is the target of the event. We probably want to allow for bubbling and/or capturing, possibly as an opt in/out.
2.3.1. 誘発体の命名-法: `event-trigger-name^p ~prop
`none^v が指定された場合、 当の要素は,`~event誘発体$を定義しない。 ◎ If none is specified, the element does not define any event triggers.
~list内に同じ `dashed-ident$t が複数回~現れる場合、 最後のものに限り`~event誘発体$を定義する — それ以外のものには効果は無い。 ◎ If the same <dashed-ident> appears multiple times in the list, only the last one defines an event trigger; the preceding ones have no effect.
2.3.2. ~eventの~link法: `event-trigger-source^p ~prop
`event-trigger-source$p ~propは、 どの~event(たち)が`~event誘発体$を作動化するかを指定する。 その値は: ◎ The event-trigger-source property specifies what event or events activate the event trigger. Its values are
- `none@v
- `協調される値~list$を成す対応する~entryは、 `~event誘発体$を定義しない。 ◎ The corresponding entry in the coordinated value list does not define a trigger.
- `event-trigger-event$t+ [ / `event-trigger-event$t+ ]?
- 当の`~event誘発体$が,どの~event(たち)に応答するようになるかを定義する。 ◎ Defines what event(s) the event trigger responds to.
- 値に `/^c を利用した場合、 当の`~event誘発体$は,有状態になる — `/^c より[ 前/後 ]にある~eventたちが,当の`~event誘発体$の[ `入口~event群$eT/`出口~event群$eT ]を成す。 【!(The same events can occur in both sets.)】 ◎ If a / is used in the value, the event trigger is stateful; the set of events before the / are the event trigger’s enter events, while those after the / are the exit events. (The same events can occur in both sets.)
- 他の場合、 当の`~event誘発体$は,無状態になる — 供された~eventたちは,その`入口~event群$eTを成す。 ◎ Otherwise, the event trigger is stateless, and the provided events are its enter events.
`event-trigger-event@t = activate | interest | click | touch | dblclick | keypress(`string$t) | ...
取扱うことが求まれる~eventたちが成す全部的な集合を解明する。 ◎ Figure out the full set of events we want to handle.
2.3.3. `event-trigger^p 略式
`event-trigger$p `略式~prop$は、 その下位prop[ `event-trigger-name$p, `event-trigger-source$p ]を一緒に設定する。 ◎ The event-trigger shorthand property sets both event-trigger-name and event-trigger-source at once.
値 `none@v は、 `none none^v と等価になる。 ◎ A value of none is equivalent to none none.
2.3.4. `animation-trigger^p ~prop
`animation-trigger$p ~propは、 当の~animationが`誘発される~animation$になるかどうか, および そうなる場合,それは[ どの誘発体に対し,何の動作で応答するか ]を指定する。 この~propは、 `animation$p 略式の`設定し直すのみ$な`下位prop$である。 各種~値は: ◎ The animation-trigger property specifies whether the animation is a triggered animation, and if it is, what trigger it responds to and what actions it takes in response. animation-trigger is a reset-only sub-property of the animation shorthand. Its values are:
- `none@v
- 当の`~animation$は、 `誘発される~animation$にはならない。 ◎ The corresponding animation is not a triggered animation.
- [ `dashed-ident$t `animation-action$t+ ]+
- 当の`~animation$は、 `誘発される~animation$になり,各[ `dashed-ident$t により命名された誘発体 ]に対し[ 対応する `animation-action$t により命名された動作をとる ]ことにより応答する。 (各 `dashed-ident$t が,どう`誘発体$へ解決されるかは、 `§ 誘発体の名前の視野~法@#trigger-scope$ を見よ)。 ◎ The corresponding animation is a triggered animation, responding to the triggers named by each <dashed-ident>, and responding by taking the action named by the corresponding <animation-action>. (See § 2.1 Trigger Name Scoping: the trigger-scope property for how <dashed-ident>s are resolved to triggers.)
-
誘発体が `animation-action$t をいくつ受容するか, 正確に何がそれらを作動化するかは、 当の誘発体の種別により決定される。 間違った(多過ぎる/少な過ぎる)個数の動作を指定しても, 構文上は妥当になるが、 当の誘発体は,効果を発揮しなくなる。
注記: [ `~event誘発体$/`時列線~誘発体$ ]は、 1 個または 2 個とる( 2 個目は省略可能) — うち,無状態な`~event誘発体$は、 1 個しかとらない。
◎ How many <animation-action>s a trigger accepts, and what exactly activates them, is determined by the type of the trigger.\ (Event triggers take one and possibly an optional second, depending on whether they’re stateless or stateful; timeline triggers take one and optionally a second.)\ Specifying the wrong number of actions (too many or too few) is valid syntactically, but causes the trigger to have no effect. - 複数の誘発-が同時に生じた場合、 それらは,指定された順序で効果を発揮する。 ◎ If multiple triggers occur simultaneously, they take effect in the order specified.
- 同じ `dashed-ident$t が複数回~指定された場合、 最後のもの以外は効果を発揮しない。 ◎ If the same <dashed-ident> is specified multiple times, all but the last have no effect.
`animation-action@t 用にアリな値は、 次の表tの 1 列目に挙げられる。 2 列目~以降には、 それらの効果を挙げる(空欄は無し)。 2 列目は、 現在の~animation状態に関わらず,[ 3 列目~以降に挙げる各~状態に特有な動作 ]より前に起こる:
| ~keyword | ~~追加の効果 | 初期 | 再生-中 | 静止中 | 完遂した |
|---|---|---|---|---|---|
| `none@vA | | ||||
| `play@vA | `play()$m | `play()$m | `play()$m | ||
| `play-once@vA | `play()$m | `play()$m | |||
| `play-forwards@vA | 再生~rateを正に設定する | `play()$m | `play()$m | `play()$m | |
| `play-backwards@vA | 再生~rateを負に設定する | `play()$m | `play()$m | `play()$m | |
| `pause@vA | `pause()$m | | |||
| `reset@vA | 進捗を 0 に設定する | `pause()$m | `pause()$m | `pause()$m | |
| `replay@vA | 進捗を 0 に設定する | `play()$m | `play()$m | `play()$m |
~privacyの考慮点
この仕様~内の特能が~privacyに及ぼす既知な影響iは、 無い。 ◎ There are no known privacy impacts of the features in this specification.
~securityの考慮点
この仕様~内の特能が~privacyに及ぼす既知な影響iは、 無い。 ◎ There are no known security impacts of the features in this specification.