Sign In/My Account | View Cart  

advertisement

AddThis Social Bookmark Button

Article:
  Avoid Common Pitfalls in Greasemonkey
Subject:   Is it work?
Date:   2007-03-27 01:38:15
From:   LungZeno
>> var elmFoo = document.getElementById('foo');
>> var elmUnderlyingFoo = elmFoo.wrappedJSObject || >> elmFoo;
>> elmUnderlyingFoo.scrollIntoView();
var elmFoo = document.getElementById('foo');
var elmUnderlyingFoo = elmFoo.wrappedJSObject || elmFoo;
elmFoo.scrollIntoView.call(elmUnderlyingFoo);



>> unsafeWindow.watch("location", watchLocation);
>> unsafeWindow.location.watch("href", watchLocation);
window.watch.call(unsafeWindow,"location", watchLocation);
window.location.watch.call(unsafeWindow.location,"href", watchLocation);



Is it general solution to this problem?