On Fri, Feb 24, 2012 at 11:26:26AM -0800, Sean McAfee wrote: > On Thu, Feb 23, 2012 at 11:51 PM, Philip Hudson <[email protected]> wrote: > > // FIXME This sets up unbounded recursion; need another way to store and > // reference the original function > // var old_external_editor_make_base_filename = > // (old_external_editor_make_base_filename || > // external_editor_make_base_filename); > // function external_editor_make_base_filename (elem, top_doc) { > // return "conkeror-edit-"+old_external_editor_make_base_filename(elem, > top_doc); > // } > > > > Function names are bound when the code is parsed. To rebind a function at run > time, assign an anonymous function to the name: > > external_editor_make_base_filename = function (elem, top_doc) { > return "conkeror-edit-" + old_external_editor_make_base_filename(elem, > top_doc); > }; >
Good call. -- John Foerch _______________________________________________ Conkeror mailing list [email protected] https://www.mozdev.org/mailman/listinfo/conkeror
