���ѧۧݧ�ӧ�� �ާ֧ߧ֧էا֧� - ���֧էѧܧ�ڧ��ӧѧ�� - /home/alphpwcp/public_html/us/alphachat/design/defaulttheme/widget/wrapper/src/util/monitoredVariable.js
���ѧ٧ѧ�
export class monitoredVariable { constructor(value, params) { this.valueInternal = value; this.listeners = []; this.params = params || {}; } get value() { return this.valueInternal; } set value(val) { this.next(val); } next(val) { this.valueInternal = val; this.callListeners(); } nextPropertySilent(key, val) { this.valueInternal[key] = val; } nextProperty(key, val) { this.valueInternal[key] = val; this.callListeners(); } callListeners() { this.listeners.forEach((item) => { if (item && typeof item === "function") { item(this.valueInternal); } }); } unsubscribe(callback) { if (this.listeners.indexOf(callback) !== -1) { this.listeners.splice(this.listeners.indexOf(callback), 1); } } subscribe(callback, ignoreSub) { this.listeners.push(callback); if (!this.params['ignore_sub'] && !ignoreSub) { callback(this.valueInternal); } } }
| ver. 1.4 |
Github
|
.
| PHP 8.2.30 | ���֧ߧ֧�ѧ�ڧ� ����ѧߧڧ��: 0 |
proxy
|
phpinfo
|
���ѧ����ۧܧ�