Class ResizeObserver
- Namespace
- CSharpToJavaScript.APIs.JS
- Assembly
- CSharpToJavaScript.dll
The ResizeObserver interface reports changes to the dimensions of an 'Element''s content or border box, or the bounding box of an 'SVGElement'.
[Value("ResizeObserver")]
public class ResizeObserver
- Inheritance
-
ResizeObserver
- Inherited Members
Remarks
NOTE
The content box is the box in which content can be placed, meaning the border box minus the padding and border width. The border box encompasses the content, padding, and border. See The box model for further explanation.
-Learn: The box model
-'PerformanceObserver'
-'IntersectionObserver' (part of the Intersection Observer API)
-Upcoming container queries may be a viable alternative for implementing responsive design.
Constructors
ResizeObserver()
public ResizeObserver()
ResizeObserver(ResizeObserverCallback)
The ResizeObserver constructor creates a
new ResizeObserver object, which can be used to report changes to the
content or border box of an 'Element' or the bounding box of an
'SVGElement'.
public ResizeObserver(ResizeObserverCallback callback)
Parameters
callbackResizeObserverCallback
Remarks
Methods
Disconnect()
The disconnect() method of the
ResizeObserver interface unobserves all observed 'Element'
or 'SVGElement' targets.
[Value("disconnect")]
public GlobalObject.Undefined Disconnect()
Returns
Remarks
Observe(Element, ResizeObserverOptions)
The observe() method of the
ResizeObserver interface starts observing the specified
'Element' or 'SVGElement'.
[Value("observe")]
public GlobalObject.Undefined Observe(Element target, ResizeObserverOptions options = null)
Parameters
targetElementoptionsResizeObserverOptions
Returns
Remarks
Unobserve(Element)
The unobserve() method of the
ResizeObserver interface ends the observing of a specified
'Element' or 'SVGElement'.
[Value("unobserve")]
public GlobalObject.Undefined Unobserve(Element target)
Parameters
targetElement