For AI agents: a documentation index is available at the root level at /llms.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Logo

Remove Custom Attribute

element.removeCustomAttribute(name)

Remove an attribute from an element.

Previously, this method removed only custom HTML attributes on an element, but now it can remove any attribute.

This method is equivalent to the element.removeAttribute(name) method.

Syntax

1element.removeCustomAttribute(name: string): Promise<null>

Parameters

  • name : String - The name of the custom attribute.

Returns

Promise<null>

A Promise that resolves to null

Example

1// Get Selected Element
2const selectedElement = await webflow.getSelectedElement()
3
4if (selectedElement?.customAttributes) {
5
6 // Remove Custom Attribute
7 await selectedElement.removeCustomAttribute("tooltip")
8
9}

Designer Ability

Designer AbilityLocaleBranchWorkflowSitemode
canDesignPrimaryMainCanvasDesign
Morty Proxy This is a proxified and sanitized view of the page, visit original site.