isRemoved( )


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().

Method Declaration
Copy
function isRemoved(selector: string): Promise<void>;
Method Parameters
selectorstringRequired

An element selector.

Check if an element is removed
JavaScript
import wixEditor from "wix-editor"; // ... wixEditor.isRemoved("#title").then((isRemoved) => { // Your code that uses the 'isRemoved' value goes here });
Errors

This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.

Did this help?