Closed jmstacey closed 7 years ago
Eureka! The virtual DOM wrapper expects a hash parameter on the "data" or "dataset" symbol. Thought I had tried that...
def render
...
li class: "dd-item", data: { id: "1", another: "example" } ...
will generate the desired:
<li class="dd-item" data-id="1" data-another="example">
@fazibear I'll leave open for you to close incase you want to document that the DSL is provided by the wrapper in opal-virtual-dom or provide an example or something.
Thanks, good point, I'll add it to documentation.
Can you provide an example of how to access HTML data attributes through the DSL.
For example, to generate this html:
The render would need to look like what?