mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
Guarding webview attributes against polluted Object.prototypes
Ran into an error with the buildParams function breaking when using a JavaScript library that modified the Object.prototype, this small fix resolves the issue.
This commit is contained in:
@@ -173,7 +173,7 @@ class WebViewImpl
|
||||
params =
|
||||
instanceId: @viewInstanceId
|
||||
userAgentOverride: @userAgentOverride
|
||||
for attributeName, attribute of @attributes
|
||||
for own attributeName, attribute of @attributes
|
||||
params[attributeName] = attribute.getValue()
|
||||
# When the WebView is not participating in layout (display:none)
|
||||
# then getBoundingClientRect() would report a width and height of 0.
|
||||
|
||||
Reference in New Issue
Block a user