File

src/api.ts

Index

Methods

Methods

mountEmbedded
mountEmbedded(devtools: HTMLElement)

This method should mount the provided devtools element somewhere in the document. The method is expected to return a function that unmounts the element, undoing all modifications that were to the DOM during mount.

Parameters :
Name Type Optional
devtools HTMLElement No
Returns : void
mountReopenButton
mountReopenButton(onReopenClick: () => void)

This method should show a button on the page that can be clicked to reopen devtools. The onReopenClick callback function should be invoked when clicking the button. The method should return a function that removes the button from the DOM.

If this method is called while devtools is still mounted, then the layout should ensure that the mounted element becomes invisible. The returned cleanup function should then make the mounted element visible again.

Parameters :
Name Type Optional
onReopenClick function No
Returns : void
reposition
reposition(position: ToolbarPosition)

This method should update the position of the mounted element according to the requested position.

Parameters :
Name Type Optional
position ToolbarPosition No
Returns : void
resize
resize(size: string)

This method should apply a requested resize to the mounted element.

Parameters :
Name Type Optional
size string No
Returns : void

results matching ""

    No results matching ""