MCPcopy Index your code
hub / github.com/ampproject/amphtml / attemptChangeSize

Method attemptChangeSize

src/base-element.js:914–922  ·  view source on GitHub ↗

* Return a promise that requests the runtime to update * the size of this element to the specified value. * The runtime will schedule this request and attempt to process it * as soon as possible. However, unlike in changeSize, the runtime * may refuse to make a change in which ca

(newHeight, newWidth, opt_event)

Source from the content-addressed store, hash-verified

912 * @public
913 */
914 attemptChangeSize(newHeight, newWidth, opt_event) {
915 return Services.mutatorForDoc(this.getAmpDoc()).requestChangeSize(
916 this.element,
917 newHeight,
918 newWidth,
919 /* newMargin */ undefined,
920 opt_event
921 );
922 }
923
924 /**
925 * Runs the specified measure, which is called in the "measure" vsync phase.

Callers

nothing calls this directly

Calls 2

getAmpDocMethod · 0.95
requestChangeSizeMethod · 0.45

Tested by

no test coverage detected