Home / Function/ scrollToElement() — astro Function Reference

scrollToElement() — astro Function Reference

Architecture documentation for the scrollToElement() function in test-utils.js from the astro codebase.

Entity Profile

Dependency Diagram

graph TD
  f16c187c_deda_00e3_0b31_6ec7d6f81052["scrollToElement()"]
  2ca394f6_a63d_3921_1f12_c5a979ea0039["test-utils.js"]
  f16c187c_deda_00e3_0b31_6ec7d6f81052 -->|defined in| 2ca394f6_a63d_3921_1f12_c5a979ea0039
  4471adac_6b72_7031_4587_e50c8db5a233["prepareTestFactory()"]
  4471adac_6b72_7031_4587_e50c8db5a233 -->|calls| f16c187c_deda_00e3_0b31_6ec7d6f81052
  style f16c187c_deda_00e3_0b31_6ec7d6f81052 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/astro/e2e/test-utils.js lines 106–110

export async function scrollToElement(el) {
	await el.evaluate((node) => {
		node.scrollIntoView({ behavior: 'auto' });
	});
}

Domain

Subdomains

Frequently Asked Questions

What does scrollToElement() do?
scrollToElement() is a function in the astro codebase, defined in packages/astro/e2e/test-utils.js.
Where is scrollToElement() defined?
scrollToElement() is defined in packages/astro/e2e/test-utils.js at line 106.
What calls scrollToElement()?
scrollToElement() is called by 1 function(s): prepareTestFactory.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free