Skip to content

Commit 92fb72b

Browse files
authored
Restore ViewTimeline from BCD 6.0.24 (#2066)
Co-authored-by: saschanaz <[email protected]>
1 parent 8669c8c commit 92fb72b

File tree

4 files changed

+204
-6
lines changed

4 files changed

+204
-6
lines changed

baselines/dom.generated.d.ts

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2124,6 +2124,11 @@ interface ScrollOptions {
21242124
behavior?: ScrollBehavior;
21252125
}
21262126

2127+
interface ScrollTimelineOptions {
2128+
axis?: ScrollAxis;
2129+
source?: Element | null;
2130+
}
2131+
21272132
interface ScrollToOptions extends ScrollOptions {
21282133
left?: number;
21292134
top?: number;
@@ -2513,6 +2518,12 @@ interface VideoFrameInit {
25132518
visibleRect?: DOMRectInit;
25142519
}
25152520

2521+
interface ViewTimelineOptions {
2522+
axis?: ScrollAxis;
2523+
inset?: string | (CSSNumericValue | CSSKeywordValue)[];
2524+
subject?: Element;
2525+
}
2526+
25162527
interface WaveShaperOptions extends AudioNodeOptions {
25172528
curve?: number[] | Float32Array;
25182529
oversample?: OverSampleType;
@@ -30479,6 +30490,31 @@ declare var ScriptProcessorNode: {
3047930490
new(): ScriptProcessorNode;
3048030491
};
3048130492

30493+
/**
30494+
* The **`ScrollTimeline`** interface of the Web Animations API represents a scroll progress timeline (see CSS scroll-driven animations for more details).
30495+
*
30496+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ScrollTimeline)
30497+
*/
30498+
interface ScrollTimeline extends AnimationTimeline {
30499+
/**
30500+
* The **`axis`** read-only property of the An enumerated value.
30501+
*
30502+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ScrollTimeline/axis)
30503+
*/
30504+
readonly axis: ScrollAxis;
30505+
/**
30506+
* The **`source`** read-only property of the An Element.
30507+
*
30508+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ScrollTimeline/source)
30509+
*/
30510+
readonly source: Element | null;
30511+
}
30512+
30513+
declare var ScrollTimeline: {
30514+
prototype: ScrollTimeline;
30515+
new(options?: ScrollTimelineOptions): ScrollTimeline;
30516+
};
30517+
3048230518
/**
3048330519
* The **`SecurityPolicyViolationEvent`** interface inherits from Event, and represents the event object of a `securitypolicyviolation` event sent on an Element/securitypolicyviolation_event, Document/securitypolicyviolation_event, or WorkerGlobalScope/securitypolicyviolation_event when its Content Security Policy (CSP) is violated.
3048430520
*
@@ -33682,6 +33718,37 @@ declare var VideoPlaybackQuality: {
3368233718
new(): VideoPlaybackQuality;
3368333719
};
3368433720

33721+
/**
33722+
* The **`ViewTimeline`** interface of the Web Animations API represents a view progress timeline (see CSS scroll-driven animations for more details).
33723+
*
33724+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ViewTimeline)
33725+
*/
33726+
interface ViewTimeline extends ScrollTimeline {
33727+
/**
33728+
* The **`endOffset`** read-only property of the ViewTimeline interface returns a CSSNumericValue representing the ending (100% progress) scroll position of the timeline as an offset from the start of the overflowing section of content in the scroller.
33729+
*
33730+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ViewTimeline/endOffset)
33731+
*/
33732+
readonly endOffset: CSSNumericValue;
33733+
/**
33734+
* The **`startOffset`** read-only property of the ViewTimeline interface returns a CSSNumericValue representing the starting (0% progress) scroll position of the timeline as an offset from the start of the overflowing section of content in the scroller.
33735+
*
33736+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ViewTimeline/startOffset)
33737+
*/
33738+
readonly startOffset: CSSNumericValue;
33739+
/**
33740+
* The **`subject`** read-only property of the ViewTimeline interface returns a reference to the subject element whose visibility within its nearest ancestor scrollable element (scroller) is driving the progress of the timeline.
33741+
*
33742+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ViewTimeline/subject)
33743+
*/
33744+
readonly subject: Element;
33745+
}
33746+
33747+
declare var ViewTimeline: {
33748+
prototype: ViewTimeline;
33749+
new(options?: ViewTimelineOptions): ViewTimeline;
33750+
};
33751+
3368533752
/**
3368633753
* The **`ViewTransition`** interface of the View Transition API represents an active view transition, and provides functionality to react to the transition reaching different states (e.g., ready to run the animation, or animation finished) or skip the transition altogether.
3368733754
*
@@ -39737,6 +39804,7 @@ type ResidentKeyRequirement = "discouraged" | "preferred" | "required";
3973739804
type ResizeObserverBoxOptions = "border-box" | "content-box" | "device-pixel-content-box";
3973839805
type ResizeQuality = "high" | "low" | "medium" | "pixelated";
3973939806
type ResponseType = "basic" | "cors" | "default" | "error" | "opaque" | "opaqueredirect";
39807+
type ScrollAxis = "block" | "inline" | "x" | "y";
3974039808
type ScrollBehavior = "auto" | "instant" | "smooth";
3974139809
type ScrollLogicalPosition = "center" | "end" | "nearest" | "start";
3974239810
type ScrollRestoration = "auto" | "manual";

baselines/ts5.5/dom.generated.d.ts

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2124,6 +2124,11 @@ interface ScrollOptions {
21242124
behavior?: ScrollBehavior;
21252125
}
21262126

2127+
interface ScrollTimelineOptions {
2128+
axis?: ScrollAxis;
2129+
source?: Element | null;
2130+
}
2131+
21272132
interface ScrollToOptions extends ScrollOptions {
21282133
left?: number;
21292134
top?: number;
@@ -2513,6 +2518,12 @@ interface VideoFrameInit {
25132518
visibleRect?: DOMRectInit;
25142519
}
25152520

2521+
interface ViewTimelineOptions {
2522+
axis?: ScrollAxis;
2523+
inset?: string | (CSSNumericValue | CSSKeywordValue)[];
2524+
subject?: Element;
2525+
}
2526+
25162527
interface WaveShaperOptions extends AudioNodeOptions {
25172528
curve?: number[] | Float32Array;
25182529
oversample?: OverSampleType;
@@ -30457,6 +30468,31 @@ declare var ScriptProcessorNode: {
3045730468
new(): ScriptProcessorNode;
3045830469
};
3045930470

30471+
/**
30472+
* The **`ScrollTimeline`** interface of the Web Animations API represents a scroll progress timeline (see CSS scroll-driven animations for more details).
30473+
*
30474+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ScrollTimeline)
30475+
*/
30476+
interface ScrollTimeline extends AnimationTimeline {
30477+
/**
30478+
* The **`axis`** read-only property of the An enumerated value.
30479+
*
30480+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ScrollTimeline/axis)
30481+
*/
30482+
readonly axis: ScrollAxis;
30483+
/**
30484+
* The **`source`** read-only property of the An Element.
30485+
*
30486+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ScrollTimeline/source)
30487+
*/
30488+
readonly source: Element | null;
30489+
}
30490+
30491+
declare var ScrollTimeline: {
30492+
prototype: ScrollTimeline;
30493+
new(options?: ScrollTimelineOptions): ScrollTimeline;
30494+
};
30495+
3046030496
/**
3046130497
* The **`SecurityPolicyViolationEvent`** interface inherits from Event, and represents the event object of a `securitypolicyviolation` event sent on an Element/securitypolicyviolation_event, Document/securitypolicyviolation_event, or WorkerGlobalScope/securitypolicyviolation_event when its Content Security Policy (CSP) is violated.
3046230498
*
@@ -33659,6 +33695,37 @@ declare var VideoPlaybackQuality: {
3365933695
new(): VideoPlaybackQuality;
3366033696
};
3366133697

33698+
/**
33699+
* The **`ViewTimeline`** interface of the Web Animations API represents a view progress timeline (see CSS scroll-driven animations for more details).
33700+
*
33701+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ViewTimeline)
33702+
*/
33703+
interface ViewTimeline extends ScrollTimeline {
33704+
/**
33705+
* The **`endOffset`** read-only property of the ViewTimeline interface returns a CSSNumericValue representing the ending (100% progress) scroll position of the timeline as an offset from the start of the overflowing section of content in the scroller.
33706+
*
33707+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ViewTimeline/endOffset)
33708+
*/
33709+
readonly endOffset: CSSNumericValue;
33710+
/**
33711+
* The **`startOffset`** read-only property of the ViewTimeline interface returns a CSSNumericValue representing the starting (0% progress) scroll position of the timeline as an offset from the start of the overflowing section of content in the scroller.
33712+
*
33713+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ViewTimeline/startOffset)
33714+
*/
33715+
readonly startOffset: CSSNumericValue;
33716+
/**
33717+
* The **`subject`** read-only property of the ViewTimeline interface returns a reference to the subject element whose visibility within its nearest ancestor scrollable element (scroller) is driving the progress of the timeline.
33718+
*
33719+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ViewTimeline/subject)
33720+
*/
33721+
readonly subject: Element;
33722+
}
33723+
33724+
declare var ViewTimeline: {
33725+
prototype: ViewTimeline;
33726+
new(options?: ViewTimelineOptions): ViewTimeline;
33727+
};
33728+
3366233729
/**
3366333730
* The **`ViewTransition`** interface of the View Transition API represents an active view transition, and provides functionality to react to the transition reaching different states (e.g., ready to run the animation, or animation finished) or skip the transition altogether.
3366433731
*
@@ -39714,6 +39781,7 @@ type ResidentKeyRequirement = "discouraged" | "preferred" | "required";
3971439781
type ResizeObserverBoxOptions = "border-box" | "content-box" | "device-pixel-content-box";
3971539782
type ResizeQuality = "high" | "low" | "medium" | "pixelated";
3971639783
type ResponseType = "basic" | "cors" | "default" | "error" | "opaque" | "opaqueredirect";
39784+
type ScrollAxis = "block" | "inline" | "x" | "y";
3971739785
type ScrollBehavior = "auto" | "instant" | "smooth";
3971839786
type ScrollLogicalPosition = "center" | "end" | "nearest" | "start";
3971939787
type ScrollRestoration = "auto" | "manual";

baselines/ts5.6/dom.generated.d.ts

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2124,6 +2124,11 @@ interface ScrollOptions {
21242124
behavior?: ScrollBehavior;
21252125
}
21262126

2127+
interface ScrollTimelineOptions {
2128+
axis?: ScrollAxis;
2129+
source?: Element | null;
2130+
}
2131+
21272132
interface ScrollToOptions extends ScrollOptions {
21282133
left?: number;
21292134
top?: number;
@@ -2513,6 +2518,12 @@ interface VideoFrameInit {
25132518
visibleRect?: DOMRectInit;
25142519
}
25152520

2521+
interface ViewTimelineOptions {
2522+
axis?: ScrollAxis;
2523+
inset?: string | (CSSNumericValue | CSSKeywordValue)[];
2524+
subject?: Element;
2525+
}
2526+
25162527
interface WaveShaperOptions extends AudioNodeOptions {
25172528
curve?: number[] | Float32Array;
25182529
oversample?: OverSampleType;
@@ -30479,6 +30490,31 @@ declare var ScriptProcessorNode: {
3047930490
new(): ScriptProcessorNode;
3048030491
};
3048130492

30493+
/**
30494+
* The **`ScrollTimeline`** interface of the Web Animations API represents a scroll progress timeline (see CSS scroll-driven animations for more details).
30495+
*
30496+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ScrollTimeline)
30497+
*/
30498+
interface ScrollTimeline extends AnimationTimeline {
30499+
/**
30500+
* The **`axis`** read-only property of the An enumerated value.
30501+
*
30502+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ScrollTimeline/axis)
30503+
*/
30504+
readonly axis: ScrollAxis;
30505+
/**
30506+
* The **`source`** read-only property of the An Element.
30507+
*
30508+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ScrollTimeline/source)
30509+
*/
30510+
readonly source: Element | null;
30511+
}
30512+
30513+
declare var ScrollTimeline: {
30514+
prototype: ScrollTimeline;
30515+
new(options?: ScrollTimelineOptions): ScrollTimeline;
30516+
};
30517+
3048230518
/**
3048330519
* The **`SecurityPolicyViolationEvent`** interface inherits from Event, and represents the event object of a `securitypolicyviolation` event sent on an Element/securitypolicyviolation_event, Document/securitypolicyviolation_event, or WorkerGlobalScope/securitypolicyviolation_event when its Content Security Policy (CSP) is violated.
3048430520
*
@@ -33682,6 +33718,37 @@ declare var VideoPlaybackQuality: {
3368233718
new(): VideoPlaybackQuality;
3368333719
};
3368433720

33721+
/**
33722+
* The **`ViewTimeline`** interface of the Web Animations API represents a view progress timeline (see CSS scroll-driven animations for more details).
33723+
*
33724+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ViewTimeline)
33725+
*/
33726+
interface ViewTimeline extends ScrollTimeline {
33727+
/**
33728+
* The **`endOffset`** read-only property of the ViewTimeline interface returns a CSSNumericValue representing the ending (100% progress) scroll position of the timeline as an offset from the start of the overflowing section of content in the scroller.
33729+
*
33730+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ViewTimeline/endOffset)
33731+
*/
33732+
readonly endOffset: CSSNumericValue;
33733+
/**
33734+
* The **`startOffset`** read-only property of the ViewTimeline interface returns a CSSNumericValue representing the starting (0% progress) scroll position of the timeline as an offset from the start of the overflowing section of content in the scroller.
33735+
*
33736+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ViewTimeline/startOffset)
33737+
*/
33738+
readonly startOffset: CSSNumericValue;
33739+
/**
33740+
* The **`subject`** read-only property of the ViewTimeline interface returns a reference to the subject element whose visibility within its nearest ancestor scrollable element (scroller) is driving the progress of the timeline.
33741+
*
33742+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ViewTimeline/subject)
33743+
*/
33744+
readonly subject: Element;
33745+
}
33746+
33747+
declare var ViewTimeline: {
33748+
prototype: ViewTimeline;
33749+
new(options?: ViewTimelineOptions): ViewTimeline;
33750+
};
33751+
3368533752
/**
3368633753
* The **`ViewTransition`** interface of the View Transition API represents an active view transition, and provides functionality to react to the transition reaching different states (e.g., ready to run the animation, or animation finished) or skip the transition altogether.
3368733754
*
@@ -39737,6 +39804,7 @@ type ResidentKeyRequirement = "discouraged" | "preferred" | "required";
3973739804
type ResizeObserverBoxOptions = "border-box" | "content-box" | "device-pixel-content-box";
3973839805
type ResizeQuality = "high" | "low" | "medium" | "pixelated";
3973939806
type ResponseType = "basic" | "cors" | "default" | "error" | "opaque" | "opaqueredirect";
39807+
type ScrollAxis = "block" | "inline" | "x" | "y";
3974039808
type ScrollBehavior = "auto" | "instant" | "smooth";
3974139809
type ScrollLogicalPosition = "center" | "end" | "nearest" | "start";
3974239810
type ScrollRestoration = "auto" | "manual";

inputfiles/overridingTypes.jsonc

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3810,9 +3810,6 @@
38103810
"GPUValidationError": {
38113811
"exposed": ""
38123812
},
3813-
"ScrollTimeline": {
3814-
"exposed": ""
3815-
},
38163813
"TrustedHTML": {
38173814
"exposed": ""
38183815
},
@@ -3828,9 +3825,6 @@
38283825
"TrustedTypePolicyFactory": {
38293826
"exposed": ""
38303827
},
3831-
"ViewTimeline": {
3832-
"exposed": ""
3833-
},
38343828
"WGSLLanguageFeatures": {
38353829
"exposed": ""
38363830
},

0 commit comments

Comments
 (0)