Advertisement · 728 × 90
#
Hashtag
#invokerCommands
Advertisement · 728 × 90
Code Screenshot of the Source Dataset Pattern for custom invoker commands: 
html-code: 

<button commandfor="my-snap"
command="--download" data-filename="my-image" data-format="jpeg">
Download Snapshot as JPEG
</button>

Code Screenshot of the Source Dataset Pattern for custom invoker commands: html-code: <button commandfor="my-snap" command="--download" data-filename="my-image" data-format="jpeg"> Download Snapshot as JPEG </button>

#webcomponents and #invokerCommands are a match made in heaven. With the CommandEvents source property you can easily access the dataset or any other attribute of the element that invoked the command.

1 0 0 0

Check out this very simple code example over on @codepen.io

#html #customElement #webComponent #invokerCommands
powered by #zumerlab / #snapdom

codepen.io/g12n/pen/vEX...

0 0 0 0