How to add some external JS with DOM to derby?
IAkumaI opened this issue · 5 comments
For example, when site uses JivoSite or other web-chat script, this script adds some dom elments to body. Button, chat-window etc.
How to save this elements whe derby switch page?
It's just removes from body.
I think you can just wrap this script into Derby component. But it will be recreated on each page. Is it what you want to avoid?
Re-create chat widget on every page change? I don't think this is good idea :(
Ideal, I want to keep some dom elements whe page is changed.
Is there way to keep some elements on the page?
May be...remove them on event and than put it back..
You should use on-create component event. This event is emitted only once when the element is loaded into dom. It's a regular approach. We wrote a ton of wrappers that way.
Thanks, I'll try