Skip to content
This repository has been archived by the owner on Jun 4, 2024. It is now read-only.

[BUG] html.ObjectEl does not accept the data keyword #161

Closed
RiccardoNizzolo opened this issue May 20, 2020 · 3 comments · Fixed by #178
Closed

[BUG] html.ObjectEl does not accept the data keyword #161

RiccardoNizzolo opened this issue May 20, 2020 · 3 comments · Fixed by #178

Comments

@RiccardoNizzolo
Copy link

Hi,
I'm using Dash with the following configuration:

dash-core-components==1.5.0
dash-html-components==1.0.1
dash-renderer==1.2.0

The issue is that html.ObjectEl() does not accept the data keyword but only a "data-*" wildcard

Indeed the following python code is raising an exception:

html.ObjectEl("your browser doesn’t support the object tag", data= "/a_link")

Exception:

TypeError: Unexpected keyword argument 'data'
Allowed arguments: accessKey, aria-*, children, className, contentEditable, contextMenu, data-*, dir, draggable, form, height, hidden, id, key, lang, loading_state, n_clicks, n_clicks_timestamp, name, role, spellCheck, style, tabIndex, title, type, useMap, width

Instead the expected behaviour should be the following HTML:

<object data="/a_link"> 
    Your browser doesn’t support the object tag. 
</object>

calling the constructor with the wildcard works, but the produced HTML is different from the expected one:

html.ObjectEl("your browser doesn’t support the object tag", **{'data-test': "/a_link"})

return the HTML:

<object data-test="/a_link"> 
    Your browser doesn’t support the object tag. 
</object>
@alexcjohnson alexcjohnson transferred this issue from plotly/dash May 20, 2020
@alexcjohnson
Copy link
Collaborator

Thanks @RiccardoNizzolo - moved to the dash-html-components repo. I guess either our attribute source is somehow missing data, or we erroneously filter it out because of its similarity to data-*

@rpkyle
Copy link
Contributor

rpkyle commented May 20, 2020

Related to/mentioned in #129, and earlier in #66.

@alexcjohnson
Copy link
Collaborator

Ah, and #129 points to #66 where this was reported ages ago 🙄 This issue has more info though, so I'll close #66

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants