Skip to content

Commit

Permalink
Update CSSOM view module
Browse files Browse the repository at this point in the history
  • Loading branch information
skyclouds2001 authored Jan 19, 2025
1 parent b2ac8c6 commit 3f99b81
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 8 deletions.
1 change: 1 addition & 0 deletions files/en-us/web/api/css_object_model/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ The values of CSS are represented untyped, that is using {{JSxRef("String")}} ob
- {{DOMxRef("StyleSheet")}}
- {{DOMxRef("StyleSheetList")}}
- {{DOMxRef("TransitionEvent")}}
- {{DOMxRef("VisualViewport")}}

Several other interfaces are also extended by the CSSOM-related specifications: {{DOMxRef("Document")}}, {{DOMxRef("Window")}}, {{DOMxRef("Element")}}, {{DOMxRef("HTMLElement")}}, {{DOMxRef("HTMLImageElement")}}, {{DOMxRef("Range")}}, {{DOMxRef("MouseEvent")}}, and {{DOMxRef("SVGElement")}}.

Expand Down
43 changes: 35 additions & 8 deletions files/en-us/web/css/cssom_view/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,45 @@
title: CSSOM view
slug: Web/CSS/CSSOM_view
page-type: css-module
browser-compat: css.properties.scroll-behavior
spec-urls: https://drafts.csswg.org/cssom-view/
---

{{CSSRef}}

The **CSSOM view** module lets you manipulate the visual view of a document, in particular its scrolling behavior.
The **CSSOM view** module lets you manipulate the visual view of a document, including getting the position of element layout boxes, obtaining the width or height of the viewport through script, and also scrolling an element.

## Reference

### Properties

- {{cssxref("scroll-behavior")}}
### Events

- {{domxref("Window")}}: {{domxref("Window/resize_event")}} event
- {{domxref("VisualViewport")}}: {{domxref("VisualViewport/resize_event")}} event
- {{domxref("Document")}}: {{domxref("Document/scroll_event")}} event
- {{domxref("Element")}}: {{domxref("Element/scroll_event")}} event
- {{domxref("VisualViewport")}}: {{domxref("VisualViewport/scroll_event")}} event
- {{domxref("Document")}}: {{domxref("Document/scrollend_event")}} event
- {{domxref("Element")}}: {{domxref("Element/scrollend_event")}} event
- {{domxref("VisualViewport")}}: {{domxref("VisualViewport/scrollend_event")}} event

### Interfaces

- {{domxref("MediaQueryList")}}
- {{domxref("MediaQueryListEvent")}}
- {{domxref("Screen")}}
- {{domxref("CaretPosition")}}
- {{domxref("VisualViewport")}}

The following interfaces are not defined by this module but add some extensions.

- {{domxref("Window")}}
- {{domxref("Document")}}
- {{domxref("Element")}}
- {{domxref("HTMLElement")}}
- {{domxref("HTMLImageElement")}}
- {{domxref("Range")}}
- {{domxref("MouseEvent")}}
- {{domxref("Text")}}
- {{domxref("CSSPseudoElement")}}

## Guides

Expand All @@ -22,12 +49,12 @@ The **CSSOM view** module lets you manipulate the visual view of a document, in

## Related concepts

- {{glossary("cssom")}} glossary term
- {{glossary("CSSOM")}} glossary term

## Specifications

{{Specifications}}

## Browser compatibility
## See also

{{Compat}}
- [CSS Object Model (CSSOM)](/en-US/docs/Web/API/CSS_Object_Model) as Web API

0 comments on commit 3f99b81

Please sign in to comment.