* 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)
| 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. |
no outgoing calls
no test coverage detected