Skip to content

Access button properties in js #242

@finnBsch

Description

@finnBsch

Is your Feature Request Related to a Problem?

No response

Describe the Feature you'd Like

It would be nice if one could parameterize a button and pass that to the .js that's being executed.

E.g.:

meta-bind-button
style: default
label: MyButton
myProperty: propertyValue
action:
  type: "js"
  file: myJS.js

And then enable myJS.js to access the value of myProperty (or all properties of the button) somehow, such that one can easily provide a functionality by JS and configure it via parameter. Currently, this is not possible as the button that called the .js is not passed. One can access the properties of all buttons somehow via the general context, but this would make it problematic if there is more than one button in the related note.

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions