Bug 122763 - Objective-C API doesn't provide a means to specify source URL in evaluateScript:
Summary: Objective-C API doesn't provide a means to specify source URL in evaluateScript:
Status: RESOLVED CONFIGURATION CHANGED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Enhancement
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2013-10-14 10:40 PDT by Donald Hays
Modified: 2017-04-11 14:30 PDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Donald Hays 2013-10-14 10:40:10 PDT
As far as I can tell, JSContext only provides evaluateScript:, and provides nothing if you want to specify a source URL or starting line number for a script. Since JSContext exposes the underlying JSContextRef, I'm able to dip down into the C layer to get that functionality while still otherwise using the Objective-C API, but it would be nice to have an Objective-C method in the JSC API that does it.
Comment 1 Oliver Hunt 2013-10-14 16:47:54 PDT
Seems like any such api should piggy back on the jsscript type
Comment 2 Radar WebKit Bug Importer 2013-10-14 16:48:12 PDT
<rdar://problem/15226423>
Comment 3 Joseph Pecoraro 2017-04-11 14:30:30 PDT
We added -[JSContext evaluateScript:withSourceURL:] a while ago. That should satisfy this request. Please reopen if you think this missed your use case.