[Project_owners] Getting the right (secure) value from context menu code

Michael Vincent van Rantwijk some at universum.org
Mon May 9 16:52:23 EDT 2005


Hi,

How do I make the following line secure:

var url = gContextMenu.target.ownerDocument.location.href;

I hope that this is right:

var ownerDocument = new XPCNativeWrapper(gContextMenu.target, 
"ownerDocument").ownerDocument;
var location = new XPCNativeWrapper(ownerDocument, "location").location;
var url = location.href;

but what about 'target'?

Thanks for your time and help,
Michael.


More information about the Project_owners mailing list