You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 7, 2018. It is now read-only.
getCurrentWindow(callback, errorCallback) always returns a Window but it may not be ready to use until the callback has been called (observed in OpenFin implementation).
However, sometimes the callback is never called; as a consumer of the API, I don't know when I can safely use the Window object returned by this method.
Annotated code in the API with comments to highlight the issue:
staticgetCurrentWindow(callback?: (win: Window)=>void,errorCallback?: (err?: any)=>void){if(currentWindow){// In this branch, callback will never be called,// how do I know that currentWindow is ready to use?returncurrentWindow;}// In this branch, I have to wait until callback is called,// otherwise currentWindow may not be ready
currentWindow =newWindow(null,callback,errorCallback);returncurrentWindow;}