开发者

keep data-attributes in dijit widgets

开发者 https://www.devze.com 2023-01-03 12:02 出处:网络
I\'ve starte开发者_运维技巧d using the HTML5 data- attributes in my application, but when this is applied to an element that is a dijit widget, it disappears.

I've starte开发者_运维技巧d 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?


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

0

精彩评论

暂无评论...
验证码 换一张
取 消