4 ms·
It is possible , e.g. if your javascript on the page is already using a common js module system, you can simply "require" the necessary modules. In addition, yo
by v413 13y ago
It is possible , e.g. if your javascript on the page is already using a common js module system, you can simply "require" the necessary modules. In addition, you can have a global pub/sub system in place (that you can "require" from you inlined script) and fire events. This will really help for decoupling. Usually you need inlined js along with the served html so that you attach behavior from within that inlined script. This is again easy to do from a "closured" piece of code.