angular-extensions / elements

Lazy load Angular Elements (or any other web components / custom elements ) with ease!
https://angular-extensions.github.io/elements/
MIT License
315 stars 40 forks source link

QUESTION: Why is Intersection Observer and requestIdleCallback not used? #129

Open dianmonblan opened 1 year ago

dianmonblan commented 1 year ago

Hello,

I think it can work like ngx-quicklink does using Intersection Observer and requestIdleCallback taking advantage of browser idle optimizing module download but now modeled to component download.

I recommend use Intersection Observer and requestIdleCallback with animationFrameScheduler for better performance on the browser.

Why is Intersection Observer and requestIdleCallback not used? Thanks for the reply and sorry for my poor english :kissing_closed_eyes:

https://github.com/angular-extensions/elements/blob/d9a4e4936bf4244c301b7eb8e36b67e89b793e2b/projects/elements/src/lib/lazy-elements/lazy-element/lazy-element.directive.ts#L105-L149