It is a light-weight, functional and very compact cross-browser "window manager".
For applications opening URL on the same server, where no cross-domain restrictions exists, it has proven it's utility for years to us and is the most important component in our IPORT environment.
Now, using this to host external widgets without the risk of exposing your code to cross-domain vulnerabilities may give another perception about it's usefulness. At least that's what I hoped when I decided to put it on line.
This is yet another cut from my main IPORT project, and is very ALPHA code.
I am perfectly conscious that by proposing IFRAMEs sounds like old Web 0.5, and that I am going to be flamed for this, however, since I found very good use for it I am putting it on line so it may be useful to somebody else, and I may also get some feedback.
In older versions we where "CAPTURING" events to be able to drag XFrames around, but in 2007 we should ditch that technique due to the fact that many libraries where leaving out the capability of standard W3C syntax in favor of some extra parameters, sometime to drive the event in to a different context/scope or sometime passing data along with events. Further, IE have a strange capturing mechanism that I dislike.
The new technique is not as pain free as I initially hoped, in fact without a decent capturing method this is a bit more resource consuming. When a drag starts, I have to attach two events, "mousemove" and "mouseup", for each iframe element that is currently displayed and for the main document itself.
However some small trick in the handling of the "mousemove" event, have brought back to an equity the balance between performance and cross-browser "accommodation".
The code I am presenting here is a wrapper for IFRAMES that I use to build widgets and applications. Depending on the needs I open one or more of these small windows and run in them different widgets, sometime even different frameworks, as completely detached and independent sessions. Each XFrame has it's own window, document and cookies and behaves like normal windows, constrained in the main window.
The window position is remembered in the cookies of the hosting window environment.
There are currently enforcements both in the minimum window size, and in the position of the XFrame, but I plan to put options to enable/disable these behaviors through methods.
These are some of the features I have implemented until now (will be extending them):
Currently implemented public methods:
The documentation is coming. Hope to be able to publish as time permits.