We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Using latest realms-shim.min.js in code as:
realms-shim.min.js
import Realm from "./lib/realms.js" const realm = Realm();
Getting
(index):75 Uncaught TypeError: Class constructor j cannot be invoked without 'new' at (index):75
But if calling it as constructor realm = new Realm(), getting:
realm = new Realm()
realms.js:1 Uncaught TypeError: Realm is not a constructor at new j (realms.js:1) at (index):75
I'm confused. I guess will try partytown for now.
The text was updated successfully, but these errors were encountered:
I had the same problem.But I use const sandbox = Realm.makeRootRealm(); // root realm , and it worked.
const sandbox = Realm.makeRootRealm(); // root realm
import Realm from "https://cdn.jsdelivr.net/npm/[email protected]/dist/realms-shim.esm.min.js"; console.log(Realm); const sandbox = Realm.makeRootRealm(); // root realm const unsafeCode = "function main(){return 1000};main();"; let result; try { result = sandbox.evaluate(unsafeCode); } catch (e) { result = `Error: ${e}`; } console.log(result);
Sorry, something went wrong.
No branches or pull requests
Using latest
realms-shim.min.js
in code as:Getting
But if calling it as constructor
realm = new Realm()
, getting:I'm confused. I guess will try partytown for now.
The text was updated successfully, but these errors were encountered: