Checks if an element is removed from the widget.
The isRemoved()
function returns a Promise that resolves to true
if the element is removed.
The element selector is a string with the hash symbol (#
) followed by the ID of the item you want to select (e.g. "#myElement"
). To use this function on an inner (nested) widget, use getScopedWixEditor()
.
function isRemoved(selector: string): Promise<void>;
An element selector.
import wixEditor from "wix-editor";
// ...
wixEditor.isRemoved("#title").then((isRemoved) => {
// Your code that uses the 'isRemoved' value goes here
});
This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.