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?
I would like to customize the HTML generated by the Portal/Container. Currently:
generates roughly the following HTML:
In my case, I would like to apply certain attributes to my span-element that has the id
aaa).Generates the exact same HTML. Setting
classhas no effect.I had a look at the code and I think I see why. The
span-element is created "manually" by usingcreateElement. Thus "syncing" all attributes applied to theportal-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?