element.removeCustomAttribute(name)

Remove a custom HTML attribute from an element.

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
Built with