Open abishekrsrikaanth opened 10 years ago
I was debating this myself - in 0.3
the HTML was inserted via JS, but with 0.5
I was leaning towards having it in the DOM by default. Saves the DOM injection which (in a way) makes it slightly faster.
I'm not married to the idea - I'm open to re-inserting in the JS if it makes sense. But I do like the idea of HTML being HTML. It's a transition towards it being a component.
To be frank, I prefer components that are a no brainer when it comes to setting it up. Personally I prefer to do this when I create my components as well for the following reasons.
css
and js
that is part of the component.This is my opinion. But I am open to other developers views as well.
Perhaps js can look for #alertifyDialog and if node isn't found, inject it via js
I have a suggestion, am not sure what the other things. From the docs of 0.5, I understand that the below HTML needs to be added to the HTML
Any reason why this cannot be directly appended by the JS plugin? This way the plugin looses the dependency of a developer needing to do anything else other than referencing to the
css
andjs
file.