hewitt%netscape.com 831720e707 (NOT PART OF BUILD) Document Inspector
git-svn-id: svn://10.0.0.236/trunk@87088 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-15 09:14:18 +00:00

37 lines
835 B
JavaScript

/***************************************************************
* FrameExchange ----------------------------------------------
* Utility for passing specific data to a document loaded
* through an iframe
* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
* REQUIRED IMPORTS:
****************************************************************/
//////////// implementation ////////////////////
var FrameExchange = {
mData: {},
mCount: 0,
loadURL: function(aFrame, aURL, aData)
{
var id = "entry-"+this.mCount;
this.mCount++;
this.mData[id] = aData;
var url = aURL + "?" + id;
aFrame.setAttribute("src", url);
},
receiveData: function(aWindow)
{
var id = aWindow.location.search.substr(1);
var data = this.mData[id];
this.mData[id] = null;
return data;
}
};