I am attempting to reduce the vox compose page into a collection of issues. I have run into a problem I would like some help with. For example I have the following type of issue in the Java Script Console: Undefined Value: line 328 Which gives me this: return event.stop();},eventBeforeUnload:function(event){if(this.changed || this.editor.changed){event.returnValue = Template.process("UnsavedChanges");return event.returnValue;} Now, most likely in the scope of this event handler "this" doesn't support a particular method or function. The challenge is figuring out which one and what the context of the problem is. I tried using Drosera but it becomes unresponsive with the size of the java script file on my PPC G4. Any other good ideas on how to identify more quickly the problem? Thanks Shawn -- Shawn Smith shawnsmithj@gmail.com
Shawn, The approach that I typically take is to save the page and all of its resources to my system and verify that the bug still occurs. I then reformat the code to be easier to work with (break JavaScript down to a single expression per line, CSS to a single property declaration, HTML to a single element, etc). From there it becomes, more or less, a process of removing lines while ensuring that things are still broken. Hope this helps, -- Mark Rowe <http://bdash.net.nz/> On 21/12/2006, at 5:53 PM, Shawn Smith wrote:
I am attempting to reduce the vox compose page into a collection of issues. I have run into a problem I would like some help with. For example I have the following type of issue in the Java Script Console:
Undefined Value: line 328
Which gives me this:
return event.stop();},eventBeforeUnload:function(event){if (this.changed || this.editor.changed){event.returnValue = Template.process("UnsavedChanges");return event.returnValue;}
Now, most likely in the scope of this event handler "this" doesn't support a particular method or function. The challenge is figuring out which one and what the context of the problem is.
I tried using Drosera but it becomes unresponsive with the size of the java script file on my PPC G4.
Any other good ideas on how to identify more quickly the problem?
Thanks Shawn
-- Shawn Smith shawnsmithj@gmail.com _______________________________________________ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo/webkit-dev
It's primitive, but you could also sprinkle the code with alert() statements that print out suspect variables or expressions to determine which ones are null. You may also want to be mindful of these bugs (in which "this" is not set properly): http://bugs.webkit.org/show_bug.cgi?id=7831 http://bugs.webkit.org/show_bug.cgi?id=11884 Dave On Dec 21, 2006, at 8:25 PM, Mark Rowe wrote:
Shawn,
The approach that I typically take is to save the page and all of its resources to my system and verify that the bug still occurs. I then reformat the code to be easier to work with (break JavaScript down to a single expression per line, CSS to a single property declaration, HTML to a single element, etc). From there it becomes, more or less, a process of removing lines while ensuring that things are still broken.
Hope this helps,
-- Mark Rowe <http://bdash.net.nz/>
On 21/12/2006, at 5:53 PM, Shawn Smith wrote:
I am attempting to reduce the vox compose page into a collection of issues. I have run into a problem I would like some help with. For example I have the following type of issue in the Java Script Console:
Undefined Value: line 328
Which gives me this:
return event.stop();},eventBeforeUnload:function(event){if (this.changed || this.editor.changed){event.returnValue = Template.process("UnsavedChanges");return event.returnValue;}
Now, most likely in the scope of this event handler "this" doesn't support a particular method or function. The challenge is figuring out which one and what the context of the problem is.
I tried using Drosera but it becomes unresponsive with the size of the java script file on my PPC G4.
Any other good ideas on how to identify more quickly the problem?
Thanks Shawn
-- Shawn Smith shawnsmithj@gmail.com
participants (3)
-
David D. Kilzer
-
Mark Rowe
-
Shawn Smith