kubetail-org / sentineljs

Detect new DOM nodes using CSS selectors (650 bytes)
MIT License
1.13k stars 51 forks source link

About sentinel-load event #10

Closed TheMushrr00m closed 6 years ago

TheMushrr00m commented 6 years ago

Hi, maybe this is a very newbie question but,

In your dist version you have this code to dispatch the event

// dispatch load event
  ev = doc.createEvent('HTMLEvents');
  ev.initEvent('sentinel-load', false, false);
doc.dispatchEvent(ev);``

But where is it in the src version?

How did you get that? I'm trying to understand it but i can't 😢

amorey commented 6 years ago

It's in umd-templates/web.js which is used to create a package for the browser: https://github.com/muicss/sentineljs/blob/master/umd-templates/web.js

TheMushrr00m commented 6 years ago

Thanks for reply, this is helpful to me.

Continue with this great job.