Probably you are looking for something really simple :)

If you are in control of the env this happens, you can load your
script first and save all references you need in your local scope, so
even if the original one was overwritten you still has access to it.

2011/8/27 xavierm02 <[email protected]>:
> How to restore Object.prototype.hasOwnProperty if it has been overwritten?
> Let's say you have a dumbass doing this:
> Object.prototype.hasOwnProperty = 1;
> This will never happen, but let's assumje it did.
> How can you restore the default value?
> I tried several things but none worked...
> deleting How to restore Object.prototype.hasOwnProperty if it has been
> overwritten?
> Let's say you have a dumbass doing this:
> Object.prototype.hasOwnProperty = 1;
> How can you restore the default value?
> I tried several things but none worked...
> delete Object.prototype.hasOwnProperty;// true
> Object.prototype.hasOwnProperty;// undefined
>
> delete Object.prototype;// false
> So I just don't know how to do it...
> And how come they protect the prototype but not its properties ?
>
> --
> To view archived discussions from the original JSMentors Mailman list:
> http://www.mail-archive.com/[email protected]/
>
> To search via a non-Google archive, visit here:
> http://www.mail-archive.com/[email protected]/
>
> To unsubscribe from this group, send email to
> [email protected]
>



-- 
regards,
Oleg Slobodskoi
--------------------------------------------------------------------
Xing: https://xing.com/profile/Oleg_Slobodskoi
Twitter: https://twitter.com/oleg008
Github: https://github.com/kof

-- 
To view archived discussions from the original JSMentors Mailman list: 
http://www.mail-archive.com/[email protected]/

To search via a non-Google archive, visit here: 
http://www.mail-archive.com/[email protected]/

To unsubscribe from this group, send email to
[email protected]

Reply via email to