message-event-channel connection
override the default window object
message-event-channel connection
override the default window object
Get the height of the Extension
Returns the extensions total height
const height = sdk.frame.getHeight()
// 200
console.log(height)
Set the height of the frame to the height of the Extension. Can optionally override the measured height with a defined value.
should be used if you want to override the calculated height of your extension
If no height is passed it will try get the extension height or default to 0
// sets height to extension height
sdk.frame.setHeight()
// sets height to 200
sdk.frame.setHeight(200)
Starts the auto-resizer
It creates an event listener on resize and creates a mutation observer that updates the height when the body height changes you should clean up from this function on unmount to avoid memory leaks
If called when already active it does nothing
sdk.frame.startAutoResizer();
Stops the auto-resizer
It tears down the event listeners and observers created from startAutoResizer should be called when you want to mannaully handle the height or when unmounting
If called without autoResizer being active it does nothing
sdk.frame.stopAutoResizer();
Generated using TypeDoc
Use in order to control the re-sizing of the Extension