miroslavvojtus opened a new issue #633: delete window.open in electron does not restore original electron implementation URL: https://github.com/apache/cordova-plugin-inappbrowser/issues/633 # Bug Report ## Problem ### What is expected to happen? `delete window.open` will restore original window.open function on Electron platform or update documentation. ### What does actually happen? `delete window.open` removes any window.open implementaiton in Electron wrapper. ## Information <!-- Include all relevant information that might help understand and reproduce the problem --> The command to revert `window.open` replacement proposed in documentation does not work with Electron platform as there is no `window.__proto__.open` function in place. Thus I had to fix it in another, maybe not valid, way. ``` document.addEventListener('deviceready', () => { if (cordova.platformId === "electron") { // working revert of InAppBrowser window.open function replacement window.open = cordova.require("cordova/modulemapper").getOriginalSymbol(window, 'window.open'); // window.open("url","_blank", null) is of instance electron.BrowserWindow } }); ``` ### Command or Code <!-- What command or code is needed to reproduce the problem? --> ``` document.addEventListener('deviceready', () => { if (cordova.platformId === "electron") { // non-working revert of InAppBrowser window.open function replacement delete window.open; // window.open === undefined } }); ``` ### Environment, Platform, Device <!-- In what environment, on what platform or on which device are you experiencing the issue? --> Windows + Electron platform ### Version information <!-- What are relevant versions you are using? For example: Cordova: Cordova CLI, Cordova Platforms, Cordova Plugins Other Frameworks: Ionic Framework and CLI version Operating System, Android Studio, Xcode etc. --> All releavant on latest as of today: Cordova CLI 9.0.1 cordova-electron 1.1.1 cordova-ios 5.1.1 cordova-plugin-inappbrowser 3.2.0 ## Checklist <!-- Please check the boxes by putting an x in the [ ] like so: [x] --> - [x ] I searched for existing GitHub issues - [x] I updated all Cordova tooling to most recent version - [x] I included all the necessary information above
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
