Skip to content

Commit 9fe9106

Browse files
authored
Merge pull request #129 from w3c/invoker
Renames: use invoker/invokerType instead of name/type
2 parents 98833a6 + 649977a commit 9fe9106

File tree

1 file changed

+15
-12
lines changed

1 file changed

+15
-12
lines changed

index.bs

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,7 @@ The {{PerformanceLongAnimationFrameTiming/scripts}} attribute's getter steps are
394394
------------------------------------------------------------------------
395395

396396
<pre class="idl">
397-
enum ScriptTimingType {
397+
enum ScriptInvokerType {
398398
"classic-script",
399399
"module-script",
400400
"event-listener",
@@ -415,7 +415,8 @@ The {{PerformanceLongAnimationFrameTiming/scripts}} attribute's getter steps are
415415
readonly attribute DOMString name;
416416
readonly attribute DOMString entryType;
417417

418-
readonly attribute ScriptTimingType type;
418+
readonly attribute ScriptInvokerType invokerType;
419+
readonly attribute DOMString invoker;
419420
readonly attribute DOMHighResTimeStamp executionStart;
420421
readonly attribute DOMString sourceLocation;
421422
readonly attribute DOMHighResTimeStamp pauseDuration;
@@ -432,10 +433,12 @@ A {{PerformanceScriptTiming}} has an associated {{ScriptWindowAttribution}} <dfn
432433

433434
The {{PerformanceScriptTiming/entryType}} attribute's getter step is to return <code>"script"</code>.
434435

435-
The {{PerformanceScriptTiming/type}} attribute's getter step is to return [=this=]'s [=PerformanceScriptTiming/timing info=]'s [=script timing info/type=].
436+
The {{PerformanceScriptTiming/name}} attribute's getter step is to return <code>"script"</code>.
436437

437-
The {{PerformanceScriptTiming/name}} attribute's getter steps are:
438-
1. Switch on |this|'s {{PerformanceScriptTiming/type}}:
438+
The {{PerformanceScriptTiming/invokerType}} attribute's getter step is to return [=this=]'s [=PerformanceScriptTiming/timing info=]'s [=script timing info/invoker type=].
439+
440+
The {{PerformanceScriptTiming/invoker}} attribute's getter steps are:
441+
1. Switch on |this|'s {{PerformanceScriptTiming/invokerType}}:
439442

440443
: "`classic-script`"
441444
: "`module-script`"
@@ -460,9 +463,9 @@ The {{PerformanceScriptTiming/name}} attribute's getter steps are:
460463
::
461464
1. If |this|'s [=PerformanceScriptTiming/timing info=]'s [=script timing info/invoker name=] is the empty string,
462465
then:
463-
1. If |this|'s {{PerformanceScriptTiming/type}} is "`resolve-promise`", then return "`Promise.resolve`".
466+
1. If |this|'s {{PerformanceScriptTiming/invokerType}} is "`resolve-promise`", then return "`Promise.resolve`".
464467
1. Otherwise, return "`Promise.reject`".
465-
1. Let |thenOrCatch| be "`then`" if {{PerformanceScriptTiming/type}} is "`resolve-promise`"; otherwise "`reject-promise`".
468+
1. Let |thenOrCatch| be "`then`" if {{PerformanceScriptTiming/invokerType}} is "`resolve-promise`"; otherwise "`reject-promise`".
466469
1. Return the [=concatenate|concatenation=] of « [=script timing info/invoker name=], ".", |thenOrCatch| ».
467470

468471
The {{PerformanceScriptTiming/startTime}} attribute's getter step is to return the [=relative high resolution time=] given [=this=]'s [=PerformanceScriptTiming/timing info=]'s [=script timing info/start time=] and [=this=]'s [=relevant global object=].
@@ -636,8 +639,8 @@ It has the following [=struct/items=]:
636639
<dfn export>script timing info</dfn> is a [=struct=]. It has the following [=struct/items=]:
637640

638641
<dl dfn-for="script timing info">
639-
: <dfn>type</dfn>
640-
:: A {{ScriptTimingType}}.
642+
: <dfn>invoker type</dfn>
643+
:: A {{ScriptInvokerType}}.
641644

642645
: <dfn>start time</dfn>
643646
: <dfn>end time</dfn>
@@ -823,7 +826,7 @@ Report Long Animation Frames {#loaf-processing-model}
823826
1. Let |document| be |settings|'s {{Window/document}}.
824827
1. Let |frameTimingInfo| be |document|'s [=relevant frame timing info=].
825828
1. If |frameTimingInfo| is null or if |frameTimingInfo|'s [=frame timing info/pending script=] is not null, then return.
826-
1. Assert: |frameTimingInfo|'s [=frame timing info/pending script=]'s [=script timing info/type=] is "`classic-script`".
829+
1. Assert: |frameTimingInfo|'s [=frame timing info/pending script=]'s [=script timing info/invoker type=] is "`classic-script`".
827830
1. Set |frameTimingInfo|'s [=frame timing info/pending script=]'s [=script timing info/execution start time=] to the [=unsafe shared current time=].
828831
</div>
829832

@@ -837,7 +840,7 @@ Report Long Animation Frames {#loaf-processing-model}
837840

838841
<div algorithm="Create script entry point">
839842
To <dfn>create script entry point</dfn> given an [=environment settings object=] |settings|,
840-
a {{ScriptTimingType}} |type|, and |steps|,
843+
a {{ScriptInvokerType}} |invokerType|, and |steps|,
841844
which is an algorithm that takes a [=script timing info=] and an optional [=frame timing info=]:
842845

843846
1. If |settings| is not a {{Window}}, then return.
@@ -848,7 +851,7 @@ Report Long Animation Frames {#loaf-processing-model}
848851
1. If |frameTimingInfo|'s [=frame timing info/pending script=] is not null, then return.
849852
1. Let |scriptTimingInfo| be a new [=script timing info=]
850853
whose [=script timing info/start time=] is the [=unsafe shared current time=],
851-
and whose [=script timing info/type=] is |type|.
854+
and whose [=script timing info/invoker type=] is |invokerType|.
852855
1. Run |steps| given |scriptTimingInfo| and |frameTimingInfo|.
853856
1. Set |scriptTimingInfo|'s [=script timing info/window=] to |settings|.
854857
1. Set |frameTimingInfo|'s [=frame timing info/pending script=] to |scriptTimingInfo|.

0 commit comments

Comments
 (0)