You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Would be nice to add a better module system compatibility.
What I mean is that I kinda hate libraries adding themselves on the window object.
All I need is the possibility to require or import the module .
It also shouldn't need to parse my html during an init, but I should be able to call myself shareOnTwitter when an action is done on an DOM of my choice.
This would make the library compatible with framework like React.
The text was updated successfully, but these errors were encountered:
I am not familiar with neither require or import, so I won't be able to implement such changes.
However if you decide to make a PR, make sure this library works without require or import too. I kinda hate when sometimes for small script, you have to include 100x heavier dependency or some kind of package manager.
About init part, not sure what do you meant, you can call init() whenever you feel like it, yes it will attach events to all icons at the same time, but that is the main point, to have everything automatically, it is very rare occasion to have only single twitter icon, and even then, you can specify your own selector to target only one element.
I take my words back :) I will try to make it compatible with require and import in nearest time and if won't take too much extra code and weight I will include it.
Would be nice to add a better module system compatibility.
What I mean is that I kinda hate libraries adding themselves on the window object.
All I need is the possibility to
require
orimport
the module .It also shouldn't need to parse my html during an init, but I should be able to call myself
shareOnTwitter
when an action is done on an DOM of my choice.This would make the library compatible with framework like React.
The text was updated successfully, but these errors were encountered: