mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-05-10 09:40:21 +08:00
blazy: Support HTMLCollection in 'load' (#27787)
This commit is contained in:
@@ -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();
|
||||
|
||||
2
types/blazy/index.d.ts
vendored
2
types/blazy/index.d.ts
vendored
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user