The Adblock Project Forum Index The Adblock Project
Pull up a seat ...stay a while.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

implicitWrap.wnd has no properties (component.js)

 
Post new topic   Reply to topic    The Adblock Project Forum Index -> Main
View previous topic :: View next topic  
Author Message
DrBob



Joined: 19 Mar 2006
Posts: 2
Location: England

PostPosted: Sun Mar 19, 2006    Post subject: implicitWrap.wnd has no properties (component.js) Reply with quote

The latest version of Adblock (0.5.3.042) has been giving me this error every so often. It is quite annoying, since when I'm developing my website locally, I can accrue hundreds of these (identical) errors in the JS console, which makes it quite hard to find errors from my own code.

implicitWrap.wnd has no properties - component.js (line 387)

The function causing the error, from component.js:

Code:
// lends implicit-wrapping, for:  node + window + document
function wrapToImplicit(requestingNode, implicitWrap, contentType) {
   var requestingNodeUnwrapped = requestingNode;
   var forceWrap = (contentType==apiConstants.OBJECT);
   try { requestingNode = adblockWrap(requestingNode, forceWrap, 'defaultView','top','contentWindow','ownerDocument'); }catch(e) { /*throw(e);*/ }
   
   if (requestingNode instanceof Components.interfaces.nsIDOMWindow) var domWnd = requestingNode;
   else domWnd = requestingNode.defaultView || (requestingNode.localName=="browser"?requestingNode.contentWindow:null) || (requestingNode.ownerDocument ? requestingNode.ownerDocument.defaultView : null);
   
   if (!lastWindow||lastWindow.closed) lastWindow = windowMediator.getMostRecentWindow("navigator:browser");
   
   var newEvent = lastWindow.document.createEvent('MouseEvents');
   newEvent.initMouseEvent('abCatchNode', true,true, domWnd, 1, 0,0,0,0, false,false,false,false, 1, requestingNodeUnwrapped);
   implicitWrap.wnd =  newEvent.view;   
   newEvent.initMouseEvent('abCatchNode', true,true, null, 1, 0,0,0,0, false,false,false,false, 1, {});
         newEvent = lastWindow.document.createEvent('MutationEvents');
         newEvent.initMutationEvent('abCatchNode2', true,true, implicitWrap.wnd.top.document, "a","b","c",1);
         implicitWrap.doc = newEvent.relatedNode;   // ..we'll skip the re-init/re-create, and jump to next
         //newEvent.initMutationEvent('abCatchNode2', true,true, {}, "a","b","c",1);
               //newEvent = lastWindow.document.createEvent('MutationEvents');
               newEvent.initMutationEvent('abCatchNode3', true,true, requestingNodeUnwrapped, "a","b","c",1);
               implicitWrap.requestingNode = newEvent.relatedNode; 
               newEvent.initMutationEvent('abCatchNode3', true,true, {}, "a","b","c",1);
      
   if (!implicitWrap.doc._Adblock) implicitWrap.doc._Adblock={};
}
Back to top
View user's profile Send private message Visit poster's website
mcm_ham



Joined: 17 Dec 2004
Posts: 310

PostPosted: Tue Mar 21, 2006    Post subject: Reply with quote

If you are a web developer then the Error Console extension is invaluable:
http://forums.mozillazine.org/viewtopic.php?t=318102

You can hide any chrome errors (generated from the browser or extensions) and only show content errors (generated from the web page). There are also options to hide duplicate error messages so that only one occurance is displayed instead of hundreds.
Back to top
View user's profile Send private message Visit poster's website
DrBob



Joined: 19 Mar 2006
Posts: 2
Location: England

PostPosted: Tue Mar 21, 2006    Post subject: Reply with quote

I'm aware of that, and it's what I've been using, but it's hardly a proper fix. All the code needs is an if statement in the right place checking implicitWrap.wnd's validity.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    The Adblock Project Forum Index -> Main All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group