| Summary: | Web Inspector: Suppress cross-origin restrictions when accessing $0 from the console | ||||||
|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Nikita Vasilyev <nvasilyev> | ||||
| Component: | Web Inspector | Assignee: | Joseph Pecoraro <joepeck> | ||||
| Status: | RESOLVED INVALID | ||||||
| Severity: | Normal | CC: | bburg, graouts, joepeck, mattbaker, nvasilyev, timothy, webkit-bug-importer | ||||
| Priority: | P2 | Keywords: | InRadar | ||||
| Version: | WebKit Local Build | ||||||
| Hardware: | All | ||||||
| OS: | All | ||||||
| See Also: | https://bugs.webkit.org/show_bug.cgi?id=147962 | ||||||
| Attachments: |
|
||||||
|
Description
Nikita Vasilyev
2015-08-26 23:07:21 PDT
This seems like expected behavior to me. Switching the Console's Execution Context from "Main Frame" to "CodePen – index.html" eliminates the error and makes it work. In fact now, attempting to access the element from the Main Frame results in `null`, while accessing it on the sub-frame results in the Element. I'm going to move this to Behaves Correctly. However if you have ideas about how we can improve this situation for developers those would be good enhancements to file. For instance, we may want to give elements in a sub-frame a Context Menu to change the console to that Execution Context. Already "Log Element" does the right thing. |