UNPKG

devextreme

Version:

HTML5 JavaScript Component Suite for Responsive Web Development

42 lines (41 loc) 1.2 kB
/** * DevExtreme (cjs/__internal/grids/new/grid_core/lifecycle/controller.js) * Version: 25.1.3 * Build date: Wed Jun 25 2025 * * Copyright (c) 2012 - 2025 Developer Express Inc. ALL RIGHTS RESERVED * Read about DevExtreme licensing here: https://js.devexpress.com/Licensing/ */ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.LifeCycleController = void 0; class LifeCycleEvent { constructor() { this.callbacks = new Set } schedule(cb) { this.callbacks.add(cb) } trigger() { for (const cb of this.callbacks) { cb() } this.callbacks.clear() } } class LifeCycleController { constructor() { this.contentRendered = new LifeCycleEvent } provideContentReadyCallback(cb) { this.contentReadyCallback = cb } fireContentReady() { var _this$contentReadyCal; null === (_this$contentReadyCal = this.contentReadyCallback) || void 0 === _this$contentReadyCal || _this$contentReadyCal.call(this) } } exports.LifeCycleController = LifeCycleController; LifeCycleController.dependencies = [];