Open TreyBoudreau opened 2 years ago
I'd like to set a data attribute on widgets, as per https://developer.mozilla.org/en-US/docs/Learn/HTML/Howto/Use_data_attributes
I've tried using create_element('div', {'data-my-prop': 'my value'}, ...) but something in Flexx seems to strip them out.
create_element('div', {'data-my-prop': 'my value'}, ...)
Any clues?
I wonder whether the way the attribute is set works: https://github.com/flexxui/flexx/blob/69b85b308b505a8621305458a5094f2a6addd720/flexx/ui/_widget.py#L502
Could be that node.setAttribute is needed.
I'd like to set a data attribute on widgets, as per https://developer.mozilla.org/en-US/docs/Learn/HTML/Howto/Use_data_attributes
I've tried using
create_element('div', {'data-my-prop': 'my value'}, ...)
but something in Flexx seems to strip them out.Any clues?