GithubHelp home page GithubHelp logo

Throw errors about scratch-js HOT 3 CLOSED

richgilbank avatar richgilbank commented on June 12, 2024
Throw errors

from scratch-js.

Comments (3)

richgilbank avatar richgilbank commented on June 12, 2024

A little slow to take a look at this, but I finally had a chance to see what was up here. It seems that getting raw access to the page's execution context via chrome.devtools.inspectedWindow.eval still catches errors that occur (https://developer.chrome.com/extensions/devtools_inspectedWindow#method-eval).

There are 2 approaches as I see it: the extension could keep doing what it's doing and just listen for exceptions which is easier and I've pushed a fix for now. The other option would be to allow the exceptions to actually throw using native browser behaviour by executing the script a different way, one which unfortunately sandboxes things so there's no access to page JS. I tried that out too: a3ca928.

Any thoughts on which way is better? Or alternatives?
/cc: @UltCombo in case you have any thoughts on this.

from scratch-js.

UltCombo avatar UltCombo commented on June 12, 2024

I believe it is fine as long as the errors are logged to the console. Getting nice stack traces are usually a complete pain though (regarding sourcemaps/etc), so I usually don't mind ugly stack traces.
Sorry, I don't have any strong feelings in this topic. =]

from scratch-js.

richgilbank avatar richgilbank commented on June 12, 2024

Fixed with fe5ced2

from scratch-js.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.