js:add notification plugin
This commit is contained in:
@@ -1310,6 +1310,17 @@ var doric = (function (exports) {
|
||||
register(instance) {
|
||||
this.entity = instance;
|
||||
}
|
||||
function2Id(func) {
|
||||
const functionId = uniqueId('function');
|
||||
this.callbacks.set(functionId, {
|
||||
resolve: func,
|
||||
reject: () => { loge("This should not be called"); }
|
||||
});
|
||||
return functionId;
|
||||
}
|
||||
removeFuncById(funcId) {
|
||||
this.callbacks.delete(funcId);
|
||||
}
|
||||
}
|
||||
const gContexts = new Map;
|
||||
const gModules = new Map;
|
||||
|
@@ -1333,6 +1333,17 @@ class Context {
|
||||
register(instance) {
|
||||
this.entity = instance;
|
||||
}
|
||||
function2Id(func) {
|
||||
const functionId = uniqueId('function');
|
||||
this.callbacks.set(functionId, {
|
||||
resolve: func,
|
||||
reject: () => { loge("This should not be called"); }
|
||||
});
|
||||
return functionId;
|
||||
}
|
||||
removeFuncById(funcId) {
|
||||
this.callbacks.delete(funcId);
|
||||
}
|
||||
}
|
||||
const gContexts = new Map;
|
||||
const gModules = new Map;
|
||||
|
Reference in New Issue
Block a user