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: manipulate ConsoleLog events on app's side #83

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

juniorklawa
Copy link
Contributor

Hi!

I've added the possibility to handle ConsoleLog events on the app's side, not only on the library's side.

Imagine a scenario where I need to store console.log output on a variable for example, with the actual implementation I can't because the output of console.log events is only accessible on the library's side.

So this code:
image (1)

Will have this output:
image (2)

Because this is how flutter_js is dealing with console events:
image (3)

With my implementation (setting useFlutterTerminal to false) is now possible to choose if you want the console events to be handled by the library or app side

Like this:
image (4)

Giving this output:
image (5)

I am not so sure if useFlutterTerminal is the best name for it, I am accepting suggestions @abner

Thanks!

@MulverineX
Copy link

This will be handled in an upcoming release of mercury, openwebf/mercury#24

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

Successfully merging this pull request may close these issues.

2 participants