MCPcopy Create free account
hub / github.com/Vanilagy/webcodecs-polyfill / toJSON

Method toJSON

src/dom_rect_read_only.ts:85–96  ·  view source on GitHub ↗

* Serializes the rectangle to a JSON object.

()

Source from the content-addressed store, hash-verified

83 * Serializes the rectangle to a JSON object.
84 */
85 toJSON() {
86 return {
87 x: this.x,
88 y: this.y,
89 width: this.width,
90 height: this.height,
91 top: this.top,
92 right: this.right,
93 bottom: this.bottom,
94 left: this.left,
95 };
96 }
97}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected