Gets a list of all removed widget elements.
The listRemovedElements()
function returns a Promise that resolves to a list of selectors of removed elements that are part of the widget with which the panel is associated, for example: [‘title’, ‘description’]
. To use this function on an inner (nested) widget, use getScopedWixEditor()
.
function listRemovedElements(): Promise<Array<string>>;
import wixEditor from "wix-editor";
// ...
wixEditor.listRemovedElements().then((allRemovedElements) => {
// Code to execute with the allRemovedElements array
});
// For example, allRemovedElements can be: ["#title", "#button1"]
This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.