Skip to content

Custom Elements are stripped from dashboard widgets #1684

@tajakobsen

Description

@tajakobsen

Problem

We use Custom Elements (Web components) – which is part of the web platform – as the glue between JavaScript and HTML in our applications.

It appears that Custom Elements are stripped away from the rendered markup in dashboard widgets (and perhaps other widgets too).

Example

This controller...

exports.get = function() {
  var markup = '<div><my-element>Testing</my-element></div>'

    return {
        body: '<widget>' + markup + '</widget>',
        contentType: 'text/html'
    };
};

...will render:

<widget class="widget-contents">
  <h5 class="widget-header">My dashboard widget</h5>
  <div>Testing</div>
</widget>

As we can see the <my-element> custom element has been removed.

Expected behaviour

Custom Elements should be present in the markup just like other elements.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions