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

import and require() handler like the one in flutter_qjs #139

Open
lin-calvin opened this issue Oct 28, 2023 · 7 comments
Open

import and require() handler like the one in flutter_qjs #139

lin-calvin opened this issue Oct 28, 2023 · 7 comments

Comments

@lin-calvin
Copy link

Would there be any things like this?

flutterJs.addModuleHandler((String name){return "export name=${name}";});
@ekkis
Copy link

ekkis commented Mar 13, 2024

I also need to use a library. is there an answer to this? I see the question is quite old

@khursheed33
Copy link

mee too want to use some library inside js file, using require

@ekkis
Copy link

ekkis commented Apr 29, 2024

this library doesn't seem to have any support but I found something I've made some contributions that will do what you want: https://pub.dev/packages/mercuryjs/example

@khursheed33
Copy link

Hi @ekkis can you provide any example where you're calling async function written in js from dart using same package

@MulverineX
Copy link

MulverineX commented May 1, 2024

Check out the openwebf server for support on using Mercury https://discord.gg/DvUBtXZ5rK

As for import / require, you're better off bundling your code. See this for an example on doing that.

@ekkis
Copy link

ekkis commented May 2, 2024

Hi @ekkis can you provide any example where you're calling async function written in js from dart using same package

wonderful news, Mercury has a new release where fetches work

@jadehh
Copy link

jadehh commented Sep 1, 2024

mee too want to use some library inside js file, using require

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants