Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

convert synchronous js api to asynchronous and remove js interface #14564

Merged
merged 10 commits into from
Dec 7, 2023
Prev Previous commit
Next Next commit
check contract for each api request and remove redudant init method
krmanik committed Dec 3, 2023
commit 9195c17f7bac46b0e4275cc73a8062fbfb488a42
6 changes: 2 additions & 4 deletions AnkiDroid/src/main/assets/scripts/js-api.js
Original file line number Diff line number Diff line change
@@ -66,16 +66,14 @@ class AnkiDroidJS {
constructor({ developer, version }) {
this.developer = developer;
this.version = version;
this.init({ developer, version });
this.initJSRequest();
}

static init({ developer, version }) {
return new AnkiDroidJS({ developer, version });
}

async init({ developer, version }) {
this.developer = developer;
this.version = version;
async initJSRequest() {
return await this.handleRequest(`init`);
}

Loading