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

feat(web): load .kmx keyboard from blob 🎼 #12823

Merged
merged 3 commits into from
Jan 15, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
feat(web): address code review comments
  • Loading branch information
ermshiperete committed Jan 6, 2025
commit 2e5722705b367ca812b8388db538657f738ce3d1
1 change: 1 addition & 0 deletions core/include/keyman/keyman_core_api.h
Original file line number Diff line number Diff line change
@@ -309,6 +309,7 @@ non-zero value is an error).

-->
// keep in sync with web/src/engine/core-processor/src/core-factory.ts
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

// (see https://github.com/emscripten-core/emscripten/issues/18585)
<!--
```c */
enum km_core_status_codes {
19 changes: 7 additions & 12 deletions web/src/engine/core-processor/src/core-factory.ts
Original file line number Diff line number Diff line change
@@ -22,17 +22,12 @@ export enum KM_CORE_STATUS {

export class CoreFactory {
public static async createCoreProcessor(baseurl: string): Promise<MainModule> {
try {
const module = await import(baseurl + '/km-core.js');
const createCoreProcessor = module.default;
return await createCoreProcessor({
locateFile: function (path: string, scriptDirectory: string) {
return baseurl + '/' + path;
}
});
} catch (e: any) {
console.log('got execption in CoreFactory.createCoreProcessor', e);
return null;
}
const module = await import(baseurl + '/km-core.js');
const createCoreProcessor = module.default;
return await createCoreProcessor({
locateFile: function (path: string, scriptDirectory: string) {
return baseurl + '/' + path;
}
});
}
}