mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-19 06:43:51 +02:00
bind ecx to API on callback of API.bulk()
This commit is contained in:
@@ -435,7 +435,7 @@ if (window.CefSharp) {
|
|||||||
|
|
||||||
API.$bulk = function (options, args) {
|
API.$bulk = function (options, args) {
|
||||||
if (typeof options.handle === 'function') {
|
if (typeof options.handle === 'function') {
|
||||||
options.handle(args, options);
|
options.handle.call(this, args, options);
|
||||||
}
|
}
|
||||||
if (args.json.length &&
|
if (args.json.length &&
|
||||||
(options.param.offset += args.json.length,
|
(options.param.offset += args.json.length,
|
||||||
@@ -447,7 +447,7 @@ if (window.CefSharp) {
|
|||||||
: options.param.n === args.json.length)) {
|
: options.param.n === args.json.length)) {
|
||||||
this.bulk(options);
|
this.bulk(options);
|
||||||
} else if (typeof options.done === 'function') {
|
} else if (typeof options.done === 'function') {
|
||||||
options.done(true, options);
|
options.done.call(this, true, options);
|
||||||
}
|
}
|
||||||
return args;
|
return args;
|
||||||
};
|
};
|
||||||
@@ -455,7 +455,7 @@ if (window.CefSharp) {
|
|||||||
API.bulk = function (options) {
|
API.bulk = function (options) {
|
||||||
this[options.fn](options.param).catch((err) => {
|
this[options.fn](options.param).catch((err) => {
|
||||||
if (typeof options.done === 'function') {
|
if (typeof options.done === 'function') {
|
||||||
options.done(false, options);
|
options.done.call(this, false, options);
|
||||||
}
|
}
|
||||||
throw err;
|
throw err;
|
||||||
}).then((args) => this.$bulk(options, args));
|
}).then((args) => this.$bulk(options, args));
|
||||||
|
|||||||
Reference in New Issue
Block a user