MCPcopy Index your code
hub / github.com/gridstack/gridstack.js / lazyLoad

Method lazyLoad

src/utils.ts:191–193  ·  view source on GitHub ↗

* Check if a widget should be lazy loaded based on node or grid settings. * * @param n the grid node to check * @returns true if the item should be lazy loaded * * @example * if (Utils.lazyLoad(node)) { * // Set up intersection observer for lazy loading * }

(n: GridStackNode)

Source from the content-addressed store, hash-verified

189 * }
190 */
191 static lazyLoad(n: GridStackNode): boolean {
192 return n.lazyLoad || n.grid?.opts?.lazyLoad && n.lazyLoad !== false;
193 }
194
195 /**
196 * Create a div element with the specified CSS classes.

Callers 3

createWidgetDivsMethod · 0.80
_prepareElementMethod · 0.80
utils-spec.tsFile · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected