nw.js icon indicating copy to clipboard operation
nw.js copied to clipboard

UserAgent can't be changed for WebView once it is in package.json

Open gpetrov opened this issue 7 years ago • 3 comments

NWJS Version 0.30.5: Operating System : Windows 10 64 bit

Expected behavior

Normally when you call webview.setUserAgentOverride you can set the special userAgent for the webview. It is also activate inmediately in the webview

Actual behavior

However when you already have a "user-agent" in the package.json they it is always used and you can not change the userAgent runtime any more for the webviews

How to reproduce

See the included demo:

useragent.zip

click on the "change User Agent" button does not displays the new user agent in the webview.

However if you remove "user-agent" key from package.json - then it works fine.

gpetrov avatar Jun 29 '18 10:06 gpetrov

I can reproduce this issue on Linux/Windows with nwjs-sdk-v0.31.4.

Christywl avatar Jul 02 '18 05:07 Christywl

Is any chance to fix this?

panther7 avatar Feb 26 '19 13:02 panther7

Same issue in 0.61

Sunvas avatar Feb 09 '22 01:02 Sunvas