Side navigation
#8292 closed enhancement (wontfix)
Opened February 16, 2011 10:09AM UTC
Closed February 17, 2011 01:51PM UTC
Last modified March 06, 2011 03:45PM UTC
Naming all eval script in Google Chrome.
Reported by: | Soul_Master | Owned by: | Soul_Master |
---|---|---|---|
Priority: | low | Milestone: | 1.next |
Component: | misc | Version: | 1.5 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
I'm not sure that latest jQuery build support this. But I just see some document about dynamic loading script or eval. You can specify name of eval script in Google Chrome by adding its name at the end of eval text.
http://code.google.com/intl/th/chrome/devtools/docs/scripts-breakpoints.html
Attachments (0)
Change History (4)
Changed February 16, 2011 11:01PM UTC by comment:1
owner: | → Soul_Master |
---|---|
status: | new → pending |
Changed February 17, 2011 05:35AM UTC by comment:2
status: | pending → new |
---|
If I don't misunderstand something, when we try to use html function to replace content in some Dom element, jQuery will search for all script block/tag in html and execute script block/tag by Eval function.
As you see, Google Chrome 9 able to name the dynamic loading script by adding some comments at the end of script. For example,
//@ sourceURL=jqgrid.js
PS. You might add this enhancement to JSON parse.
Changed February 17, 2011 01:51PM UTC by comment:3
component: | unfiled → misc |
---|---|
priority: | undecided → low |
resolution: | → wontfix |
status: | new → closed |
This is a functionality that:
- only developers will need while debugging
- is only useful for Chrome users
- is of limited use as the names would need to be randomly generated
So I think this is nice for Chrome users and can be monkey patched onto the methods where you are interested but isn't something that belongs into jQuery core.
Changed March 06, 2011 03:45PM UTC by comment:4
For the record, this isn't only available in Chrome. See http://pmuellr.blogspot.com/2009/06/debugger-friendly.html and http://blog.getfirebug.com/2009/08/11/give-your-eval-a-name-with-sourceurl/.
I have no idea what you’re asking for. Please provide a test case demonstrating whatever it is you want.