Lazyloader icon indicating copy to clipboard operation
Lazyloader copied to clipboard

Specify a window object

Open jcbp opened this issue 8 years ago • 2 comments

It would be really useful if I could specify a different window/document on which to load a file, for example into a contentWindow of an iframe.

jcbp avatar Mar 28 '17 16:03 jcbp

Good idea! Do you have a suggestion for a way to specify it (as a user of the lib)?

LukasBombach avatar Mar 28 '17 19:03 LukasBombach

Maybe it could have a method to get a new instance of LazyLoader by specifying a different window than itself. Something like this: LukesLazyLoader.getInstance(iframe.contentWindow).load('your', 'css', 'and', 'js', 'files').then(callback).then(anotherCallback);

jcbp avatar Mar 28 '17 20:03 jcbp