Open tkapias opened 1 year ago
But, apparently the widget key in [[block.click]] is not implemented or need more documentation, when I use it, the action or cmd are not applied, even on existing parts like prev, play...
I tried with names arguments too (.str(name:'player')) but it makes the configuration fail.
Yeah, the name: ...
was just an idea and nothing more. It would be convenient to use the placeholder name in widget
field of click handler, but I didn't implement it because it would produce even more JSON blocks.
Technically prev
, play
and other "buttons" do have names, but they are undocumented and should not be relied on.
So yes, the widget key is sort of useless right now.
Minor note: there is issue #1962 for documenting "button" names.
Since PR #1686, overriding a default action is easy, you just need to write a
block.click
for the samebutton
.There were many elements that made me think that you could also override the default action for a specific part or write a new
action
orcmd
for a specific part:widget
key for[[block.click]]
in the blocks doc.widget_key+named_arguments
in 2 merged PR conversations here and here.But, apparently the
widget
key in [[block.click]] is not implemented or need more documentation, when I use it, theaction
orcmd
are not applied, even on existing parts likeprev
,play
...I tried with names arguments too (.str(name:'player')) but it makes the configuration fail.
music
block: