Set style name
style.setName(name)
Rename an existing style in place. The rename preserves the style’s CSS properties, its combo class parent relationship, and any elements the style is applied to.
Syntax
Parameters
name: string - The new name for the style. The name must:- Be 1–150 characters long.
- Not match another existing style’s name (including parents of combo classes).
- Not match a reserved tag-style name.
Returns
Promise<null>
A Promise that resolves to null once the rename is committed to the Designer.
The Promise rejects with an Error when validation fails. Inspect the error’s cause.tag to determine the failure: