r1567 - oipf/js/impl/model
Author: ygrego Date: 2015-05-29 12:44:18 +0000 (Fri, 29 May 2015) New Revision: 1567 Url: http://forge.nuiton.org/projects/sandbox/repository/revisions/1567 Log: The constructor takes in argument "windowApp". Addition of a new method "_setWindow". This method is called in constructor with parameter "windowApp". Modified: oipf/js/impl/model/Application.js Modified: oipf/js/impl/model/Application.js =================================================================== --- oipf/js/impl/model/Application.js 2015-05-29 10:19:51 UTC (rev 1566) +++ oipf/js/impl/model/Application.js 2015-05-29 12:44:18 UTC (rev 1567) @@ -58,8 +58,15 @@ */ privateData: null, - init: function() { - + init: function(windowApp) { + this._setWindow(windowApp); + }, + + _setWindow: function(windowApp) { + this.window = {}; + if (windowApp && windowApp.postMessage) { + this.window.postMessage = windowApp.postMessage.bind(windowApp); + } } });
participants (1)
-
ygregoï¼ users.nuiton.org