MCPcopy Create free account
hub / github.com/ampproject/amphtml / createRectInit

Function createRectInit

third_party/resize-observer-polyfill/ResizeObserver.js:369–371  ·  view source on GitHub ↗

* Creates DOMRectInit object based on the provided dimensions and the x/y coordinates. * Spec: https://drafts.fxtf.org/geometry/#dictdef-domrectinit * * @param {number} x - X coordinate. * @param {number} y - Y coordinate. * @param {number} width - Rectangle's width. *

(x, y, width, height)

Source from the content-addressed store, hash-verified

367 * @returns {DOMRectInit}
368 */
369 function createRectInit(x, y, width, height) {
370 return { x: x, y: y, width: width, height: height };
371 }
372
373 /**
374 * Class that is responsible for computations of the content rectangle of

Callers 4

ResizeObserver.jsFile · 0.70
getSVGContentRectFunction · 0.70
ResizeObservationFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected