Attribute Mutations

Sets an attribute on an element.

cable_ready["MyChannel"].set_attribute(
selector: "string", # required - string containing a CSS selector or XPath expression
name: "string", # required - the attribute to set
value: "string" # [null] - the value to assign to the attribute
)

JavaScript Events

  • cable-ready:before-set-attribute

  • cable-ready:after-set-attribute

Removes an attribute from an element.

cable_ready["MyChannel"].remove_attribute(
selector: "string", # required - string containing a CSS selector or XPath expression
name: "string" # required - the attribute to remove
)

JavaScript Events

  • cable-ready:before-remove-attribute

  • cable-ready:after-remove-attribute