Widgets that aren’t needed anymore (because they have been superseded by a new version, for example), can be easily removed from a page by calling delete()
on them.
Deletes the widget.
Widgets that aren’t needed anymore (because they have been superseded by a new version, for example), can be easily removed from a page by calling delete()
on them.
After deleting a widget using widget.
, it can no longer be accessed. The result of a function call on a deleted widget is not defined.delete
()
In earlier versions of the Scrivito JS SDK, this functionality is available under the name destroy
, which is deprecated as of version 1.37.0.
Examples
Directly delete a single widget:
Delete specific widgets from a page:
See Performing Bulk Operations for further usage examples.