liveview-native / liveview-native-core

Provides core language-agnostic functionality for LiveView Native across platforms
MIT License
146 stars 10 forks source link

JS command - set_attribute, remove_attribute, & toggle_attribute #217

Open bcardarella opened 3 weeks ago

bcardarella commented 3 weeks ago

JS:

set_attribute & remove_attribute toggle_attribute


Data:

# set_attribute
["set_attr", %{attr: ["aria-expanded", "true"]}]

# remove_attribute
["remove_attr", %{attr: "aria-expanded"}]

# toggle_attribute
["toggle_attr", %{attr: ["open", "true"]}]

Docs:

set_attribute remove_attribute toggle_attribute