Author: ygrego Date: 2015-05-29 15:50:53 +0000 (Fri, 29 May 2015) New Revision: 1583 Url: http://forge.nuiton.org/projects/sandbox/repository/revisions/1583 Log: Addition of the method "createApplication". Modified: oipf/js/impl/model/Application.js Modified: oipf/js/impl/model/Application.js =================================================================== --- oipf/js/impl/model/Application.js 2015-05-29 15:38:41 UTC (rev 1582) +++ oipf/js/impl/model/Application.js 2015-05-29 15:50:53 UTC (rev 1583) @@ -76,6 +76,36 @@ this._setWindow(windowApp); }, + /* + * Description: + * Create a new application and add it to the application tree. Calling + * this method does not automatically show the newly-created application. + * This call is asynchronous and may return before the new application is + * fully loaded. An ApplicationLoaded event will be targeted at + * the Application object when the new application has fully loaded. If + * the application cannot be created, this method SHALL return null . + * + * Arguments: + * - uri: The URI of the first page of the application to be created or the + * localURI of a Widget as defined in section 7.2.8.1.1. + * + * - createChild: Flag indicating whether the new application is a child of + * the current application. A value of true indicates that the new + * application should be a child of the current application; a value of + * false indicates that it should be a sibling. + * + */ + createApplication: function(uri, createChild) { + var iframeApp = document.createElement("iframe"); + + iframeApp.setAttribute("src", uri); + + if (!iframeApp.window) { + return null; + } + + }, + _setWindow: function(windowApp) { this.window = {}; if (windowApp && windowApp.postMessage) {