Bug 158385

Summary: REGRESSION: $1 doesn't work in console after selecting an element in jsfiddle
Product: WebKit Reporter: Ryosuke Niwa <rniwa>
Component: Web InspectorAssignee: Nobody <webkit-unassigned>
Status: NEW    
Severity: Normal CC: graouts, inspector-bugzilla-changes, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   

Ryosuke Niwa
Reported 2016-06-04 15:53:02 PDT
Reproduction steps: 1. Open https://jsfiddle.net/kLtkjmLe/ 2. Inspect "y" in the view 3. Type "$1" Expected result: I can access the selected element. Actual result: Get "ReferenceError: Can't find variable".
Attachments
Radar WebKit Bug Importer
Comment 1 2016-06-04 15:53:21 PDT
Ryosuke Niwa
Comment 2 2016-06-04 15:58:34 PDT
This was tested on the latest Safari Tech Preview.
Timothy Hatcher
Comment 3 2016-06-04 17:33:01 PDT
You need to pick the result frame in the console context selector on the right side for $1 to work. We should auto switch this based on the selected frame/element in the DOM tree I think. I'm pretty sure we have other bugs about this.
Ryosuke Niwa
Comment 4 2016-06-06 01:09:00 PDT
(In reply to comment #3) > You need to pick the result frame in the console context selector on the > right side for $1 to work. > > We should auto switch this based on the selected frame/element in the DOM > tree I think. I'm pretty sure we have other bugs about this. I didn't know there was such a thing. I agree it would be great to automatically switch the context.
Note You need to log in before you can comment on or make changes to this bug.