Hello all,

I have been getting a strange error from IE when I run my web app
built on prototype. I think it might be caused by Object.extend, but
I'm not positive. I am tying to pass an options object to an
initialization function of my class, and then within that function, I
extend the default options with the options that are passed in (pretty
standard practice, from what I can tell). Two of my options, however,
happen to be callback functions that are bound to the class that is
doing the initialization on this new object.

For example:

// inside some method of class A:

// initialize class B with config options
var b = B.initialize({
    foo: "foo",
    bar: "bar",
    callback1: function () {
        // do some stuff
    callback2: function () {
        // do some more stuff


// in class B's initialize function:
initialize: function(options) {
    Object.extend(this.options, options);
    // ...

When I remove the Object.extend, it seems to stop giving me the error
(but then, of course, I don't get the callback...). Is there something
wrong with extending an object like this (specifically when it's bound
to another object?). I've done some searching on this particular
error, but it seems like it could occur in many different situations
this is crazy....).

Any insight would be greatly appreciated!


You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
For more options, visit this group at 

Reply via email to