Skip to content

Ability to customize Portal #13

@ChristianKienle

Description

@ChristianKienle

I would like to customize the HTML generated by the Portal/Container. Currently:

<portal selector="#aaa" tag="span"></portal>

generates roughly the following HTML:

<body>
  <div id="app"></div>
  <span id="aaa"></span>

In my case, I would like to apply certain attributes to my span-element that has the id aaa).

<portal class="helloWorld" selector="#aaa" tag="span"></portal>

Generates the exact same HTML. Setting class has no effect.

I had a look at the code and I think I see why. The span-element is created "manually" by using createElement. Thus "syncing" all attributes applied to the portal-instance to the manually created element is a lot of work.

But maybe I am missing something. :D

I would love to help and contribute code and a PR. But before I dig in deeper could you elaborate on that? Is the idea in general bad?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions