Bug 134688 - Web Inspector: clicking in console on user script error fails to jump to resource
Summary: Web Inspector: clicking in console on user script error fails to jump to reso...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2014-07-07 13:01 PDT by Antoine Quint
Modified: 2016-12-13 15:35 PST (History)
3 users (show)

See Also:


Attachments
screenshot of prompt to search App Store (96.31 KB, image/png)
2014-07-07 13:01 PDT, Antoine Quint
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Antoine Quint 2014-07-07 13:01:09 PDT
Created attachment 234503 [details]
screenshot of prompt to search App Store

I have a Cocoa app on Yosemite (14A283o) using the Modern WebKit API (WKWebView) to inject user scripts with the WKUserContentController.addUserScript() method. In the injected script source, I use a `//# sourceURL=foo.js` comment to customise the name of the resource in the Resource sidebar, which works fine.

However, when I inspect my WKWebView using Safari 8's OS X remote inspection feature, I can see errors in this user script, but the URL for the error is "user-script:1:90" instead of using the name "foo.js" and clicking on the error shows a dialog saying "There is no application set to open the URL user-script:1." offering to search the App Store for a compatible app.
Comment 1 Radar WebKit Bug Importer 2014-07-07 13:01:44 PDT
<rdar://problem/17578798>
Comment 2 Joseph Pecoraro 2014-07-07 13:21:54 PDT
Arg. This is unfortunate. We could probably fix this in the front-end, but a clean fix would be to have JavaScriptCore understand sourceURL per-Script.