Skip to content

Commit e287d18

Browse files
committed
PR nits
1 parent f289643 commit e287d18

File tree

1 file changed

+16
-15
lines changed

1 file changed

+16
-15
lines changed

css-view-transitions-2/Overview.bs

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ urlPrefix: https://wicg.github.io/navigation-api/; type: interface;
117117
1. Once it's time to [=unload=] the old document, if the navigation is [=same origin=]
118118
and the old {{Document}} has opted in to cross-document view-transitions, the old state is captured.
119119

120-
1. An event named {{ReadyToRenderEvent|readytorender}} is fired on the new {{Document}}, with a `viewTransition` property,
120+
1. An event named {{RevealEvent|reveal}} is fired on the new {{Document}}, with a `viewTransition` property,
121121
which is a {{ViewTransition}} object. This {{ViewTransition}}'s <code>{{ViewTransition/updateCallbackDone}}</code> is already resolved,
122122
and its [=captured elements=] are populated from the old {{Document}}.
123123

@@ -136,7 +136,7 @@ urlPrefix: https://wicg.github.io/navigation-api/; type: interface;
136136

137137
```css
138138
// in both documents:
139-
@view-transition {
139+
@view-transition same-origin {
140140
trigger: navigation;
141141
}
142142
```
@@ -152,7 +152,7 @@ urlPrefix: https://wicg.github.io/navigation-api/; type: interface;
152152

153153
- Opt-in to navigation-triggered view-transitions in both pages.
154154
- Pass the click location to the new document, e.g. via {{WindowSessionStorage/sessionStorage}}.
155-
- Intercept the {{ViewTransition}} object in the new document, using the {{ReadyToRenderEvent}}.
155+
- Intercept the {{ViewTransition}} object in the new document, using the {{RevealEvent}}.
156156

157157
In both pages:
158158
```css
@@ -173,7 +173,7 @@ urlPrefix: https://wicg.github.io/navigation-api/; type: interface;
173173
In the new page:
174174
```js
175175
// This would run both on initial load and on reactivation from BFCache.
176-
addEventListener("readytorender", async event => {
176+
addEventListener("reveal", async event => {
177177
if (!event.viewTransition)
178178
return;
179179

@@ -209,20 +209,21 @@ urlPrefix: https://wicg.github.io/navigation-api/; type: interface;
209209

210210
# CSS rules # {#css-rules}
211211

212-
## The <dfn id="at-view-transition-rule">''@view-transition''</dfn> rule ## {#view-transition}
212+
## The <dfn id="at-view-transition-rule">''@view-transition''</dfn> rule ## {#view-transition-rule}
213213

214214
The ''@view-transition'' rule is used by a document to indicate that cross-document navigations
215215
should setup and activate a {{ViewTransition}}. To take effect, it must be present in the old document
216216
when unloading, and in the new document when it is [=ready to render=].
217217

218218

219-
## @view-transition rule grammar ## {#view-transition-grammer}
219+
## @view-transition rule grammar ## {#view-transition-grammar}
220220

221-
''@view-transition'' rules are [=CSS/parsed=] according to the following grammar,
222-
plus the additional rules noted below:
221+
The ''@view-transition'' rule has the following syntax:
223222

224223
<pre class=prod>
225-
@view-transition = @view-transition same-origin { <<declaration-rule-list>> }
224+
@view-transition same-origin {
225+
<<declaration-rule-list>>
226+
}
226227
</pre>
227228

228229
Note: currently <code>same-origin</code> has to be present, as a future placeholder for customizing
@@ -256,20 +257,20 @@ Note: as per default behavior, the ''@view-transition'' rule can be nested insid
256257

257258
# API # {#api}
258259

259-
## The <dfn interface>ReadyToRenderEvent</dfn> ## {#ready-to-render-event}
260+
## The <dfn interface>RevealEvent</dfn> ## {#ready-to-render-event}
260261

261262
Note: this should go in the HTML spec. See [Issue 9315](https://github.com/whatwg/html/issues/9315).
262263

263264
<xmp class=idl>
264265
[Exposed=Window]
265-
interface ReadyToRenderEvent : Event {
266+
interface RevealEvent : Event {
266267
readonly attribute ViewTransition? viewTransition;
267268
};
268269
</xmp>
269270

270271
Note: this event is fired when the document is [=ready to render=].
271272

272-
The <dfn attribute for=ReadyToRenderEvent>viewTransition</dfn> [=getter steps=] are to return the
273+
The <dfn attribute for=RevealEvent>viewTransition</dfn> [=getter steps=] are to return the
273274
[=inbound cross-document view-transition=] for [=this's=] [=relevant global object's=] [=associated document=].
274275

275276
## Extensions to the <code>CSSRule</code> interface</h3> ## {#extensions-to-cssrule-interface}
@@ -278,7 +279,7 @@ The <code>CSSRule</code> interface is extended as follows:
278279

279280
<pre class='idl'>
280281
partial interface CSSRule {
281-
const unsigned short NAVIGATION_BEHAVIOR_RULE = 15;
282+
const unsigned short VIEW_TRANSITION_RULE = 15;
282283
};
283284
</pre>
284285

@@ -346,8 +347,8 @@ The {{CSSViewTransitionRule}} represents a ''@view-transition'' rule.
346347

347348
1. If |transition| is not null and |document| does not [=opt in to cross-document view transitions=], then [=skip the view transition|skip=] |transition| and set |transition| to null.
348349

349-
1. Fire a new event named <code>readytorender</code> on |document|'s [=relevant global object=],
350-
using {{ReadyToRenderEvent}}.
350+
1. Fire a new event named <code>reveal</code> on |document|'s [=relevant global object=],
351+
using {{RevealEvent}}.
351352

352353
1. If |transition| is not null, then [=activate view transition|activate=] |transition|.
353354

0 commit comments

Comments
 (0)