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

Add error handling to webelem.js #4774

Open
The-Compiler opened this issue May 11, 2019 · 0 comments
Open

Add error handling to webelem.js #4774

The-Compiler opened this issue May 11, 2019 · 0 comments
Labels
component: QtWebEngine Issues related to the QtWebEngine backend, based on Chromium. language: javascript Issues which require knowing JavaScript. priority: 1 - middle Issues which should be done at some point, but aren't that important.

Comments

@The-Compiler
Copy link
Member

I noticed this when reviewing #4741: We don't really do any error handling in webelem.js.

Similarly to what we did for find_css, anything getting an element from elements should check if it's still there - currently we just fail somewhat silently in JS:

21:01:28 DEBUG    js         shared:javascript_log_message:146 [userscript:_qute_js_creation:502] Uncaught TypeError: Cannot read property 'remove' of undefined

Then, webengineelem.py should handle the error status in _js_call (probably by raising an exception which gets handled in the callers).

@The-Compiler The-Compiler added priority: 1 - middle Issues which should be done at some point, but aren't that important. component: QtWebEngine Issues related to the QtWebEngine backend, based on Chromium. language: javascript Issues which require knowing JavaScript. labels May 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: QtWebEngine Issues related to the QtWebEngine backend, based on Chromium. language: javascript Issues which require knowing JavaScript. priority: 1 - middle Issues which should be done at some point, but aren't that important.
Projects
None yet
Development

No branches or pull requests

1 participant