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

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

@RiccardoNizzolo

Description

@RiccardoNizzolo

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>

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions