MCPcopy Index your code
hub / github.com/angular/components / _applyScrollToOptions

Method _applyScrollToOptions

src/cdk/scrolling/scrollable.ts:129–142  ·  view source on GitHub ↗
(options: ScrollToOptions)

Source from the content-addressed store, hash-verified

127 }
128
129 private _applyScrollToOptions(options: ScrollToOptions): void {
130 const el = this.elementRef.nativeElement;
131
132 if (supportsScrollBehavior()) {
133 el.scrollTo(options);
134 } else {
135 if (options.top != null) {
136 el.scrollTop = options.top;
137 }
138 if (options.left != null) {
139 el.scrollLeft = options.left;
140 }
141 }
142 }
143
144 /**
145 * Measures the scroll offset relative to the specified edge of the viewport. This method can be

Callers 1

scrollToMethod · 0.95

Calls 2

supportsScrollBehaviorFunction · 0.90
scrollToMethod · 0.80

Tested by

no test coverage detected