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

Runtime.overwriteConsole problem #10

Open
johneisenheim opened this issue May 9, 2018 · 2 comments
Open

Runtime.overwriteConsole problem #10

johneisenheim opened this issue May 9, 2018 · 2 comments

Comments

@johneisenheim
Copy link

johneisenheim commented May 9, 2018

Hi @christian-bromann
First of all, thanks for your amazing project (and thesis). I'm experiencing some problems on using your devtools-backend: running on my HbbTV the line
window.console = domains.Runtime.overwriteConsole.call(this, window.console)
cause a wrong overwrite of console object into the javascript environment. More in depth, every time I use a console.log it throws an exception (it seems that the overwrite is not done properly).

Can you help me in some way?

P.S.: debugging the application through a screen log, the console object without importing your script in the <head> (to prevent the overwrite) contains a single object memory, that is an empty object. I'm not seeing the log, debug, error, ... methods. Very weird...

Thanks for your help!

@christian-bromann
Copy link
Owner

it throws an exception

What exception is thrown?

@johneisenheim
Copy link
Author

@christian-bromann
a custom exception I throw in a simple try-catch block, like this:

<script>
        try {
            console.log('hi there');
        } catch (e) {
            var p = document.getElementById('content');
            p.innerHTML = "ops...";
        }
</script>

It seems that console.log is not a function anymore!

Thanks again.

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

2 participants