Right before navigate, set the user agent
This commit is contained in:
parent
3a81a5224d
commit
4a8d7c1819
1 changed files with 6 additions and 1 deletions
|
@ -160,7 +160,12 @@ class SrcAttribute extends WebViewAttribute
|
||||||
# Navigate to |this.src|.
|
# Navigate to |this.src|.
|
||||||
httpreferrer = @webViewImpl.attributes[webViewConstants.ATTRIBUTE_HTTPREFERRER].getValue()
|
httpreferrer = @webViewImpl.attributes[webViewConstants.ATTRIBUTE_HTTPREFERRER].getValue()
|
||||||
urlOptions = if httpreferrer then {httpreferrer} else {}
|
urlOptions = if httpreferrer then {httpreferrer} else {}
|
||||||
remote.getGuestWebContents(@webViewImpl.guestInstanceId).loadUrl @getValue(), urlOptions
|
|
||||||
|
useragent = @webViewImpl.attributes[webViewConstants.ATTRIBUTE_HTTPREFERRER].getValue()
|
||||||
|
|
||||||
|
guestContents = remote.getGuestWebContents(@webViewImpl.guestInstanceId)
|
||||||
|
guestContents.setUserAgent(guestContents) if guestContents
|
||||||
|
guestContents.loadUrl @getValue(), urlOptions
|
||||||
|
|
||||||
# Attribute specifies HTTP referrer.
|
# Attribute specifies HTTP referrer.
|
||||||
class HttpReferrerAttribute extends WebViewAttribute
|
class HttpReferrerAttribute extends WebViewAttribute
|
||||||
|
|
Loading…
Reference in a new issue