blazy: Support HTMLCollection in 'load' (#27787)

This commit is contained in:
Andy
2018-08-02 08:05:27 -07:00
committed by GitHub
parent 9c040fa5f1
commit 12e25558ec
2 changed files with 2 additions and 2 deletions

View File

@@ -38,7 +38,7 @@ var tester: BlazyInstance = new Blazy({
/* Functions tests */
tester.revalidate();
var elements = <NodeList>document.getElementsByTagName('img');
var elements = document.getElementsByTagName('img');
tester.load(elements, true);
tester.destroy();

View File

@@ -53,7 +53,7 @@ interface BlazyInstance {
* Forces the given element(s) to load if not collapsed. If you also want to load a collapsed/hidden elements you can add true as the second parameter.
* You can pass a single element or a list of elements. Tested with getElementById, getElementsByClassName, querySelectorAll, querySelector and jQuery selector.
*/
load(elements: Element|Element[]|HTMLElement|HTMLElement[]|NodeList, force: boolean): void;
load(elements: Element|Element[]|HTMLElement|HTMLElement[]|HTMLCollection|NodeList, force: boolean): void;
/**
* Unbind events and resets image array.