keep data-attributes in dijit widgets

依然范特西╮ 提交于 2019-12-11 01:57:06

问题


I've started using the HTML5 data- attributes in my application, but when this is applied to an element that is a dijit widget, it disappears.

<button dojoType="dijit.form.Button" data-id="5">Number 5</button>

Is dojo actually parsing this and keeping it somewhere? Or is it just removed completely because dojo isn't HTML5 compliant?


回答1:


By applying the answer to this question, I was also able to keep the custom data- attributes on the surrounding element.



来源:https://stackoverflow.com/questions/3053713/keep-data-attributes-in-dijit-widgets

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!