]> khamidou — GitHub mirrors - electron.git/commitdiff
Chaning src of webview should always do a load
authorCheng Zhao <zcbenz@gmail.com>
Wed, 29 Apr 2015 09:57:16 +0000 (17:57 +0800)
committerCheng Zhao <zcbenz@gmail.com>
Wed, 29 Apr 2015 09:57:16 +0000 (17:57 +0800)
Previously changing src to the same value won't have any effect, which
does not follow the behavior of browsers.

atom/renderer/lib/web-view/web-view-attributes.coffee

index e4b5dcb45bda268328be10e1152211e9fefb744c..05bd6141203f0e379499c0212c294a259e97a3f9 100644 (file)
@@ -138,10 +138,7 @@ class SrcAttribute extends WebViewAttribute
   setupMutationObserver: ->
     @observer = new MutationObserver (mutations) =>
       for mutation in mutations
-        oldValue = mutation.oldValue
-        newValue = @getValue()
-        return if oldValue isnt newValue
-        @handleMutation oldValue, newValue
+        @handleMutation mutation.oldValue, @getValue()
     params =
       attributes: true,
       attributeOldValue: true,