@@ -258,7 +258,7 @@ def OnKeyEvent(self, browser, eventType, keyCode, modifiers, isSystemKey,
258258 # no bindings in this window, error would be thrown.
259259 # Pressing F5 in Developer Tools seem to not refresh
260260 # the parent window.
261- if hasattr ( browser , "javascriptRebindings" ):
261+ if browser . GetUserData ( "javascriptRebindings" ):
262262 browser .GetUserData ("javascriptRebindings" ).Rebind ()
263263 # This is not required, rebinding will work without refreshing page.
264264 browser .ReloadIgnoreCache ()
@@ -394,7 +394,7 @@ def Test2(self, arg1, arg2, arg3):
394394 arg2 = arg2 .encode (encoding = "utf-8" )
395395 print ("python.Test2(%s, '%s', '%s') called" % (arg1 , arg2 , arg3 ))
396396 # Testing nested return values.
397- return [1 ,2 , [2.1 , {'3' : 3 , '4' : [5 ,6 ]}], "[unicode: ąś]" ,
397+ return [1 ,2 , [2.1 , {'3' : 3 , '4' : [5 ,6 ]}], "[unicode: ąś]" ,
398398 arg2_original , arg2 ]
399399
400400 def PrintPyConfig (self ):
@@ -418,7 +418,7 @@ def TestJavascriptCallback(self, jsCallback):
418418 else :
419419 # Python 3.2 - there is no "unicode()" in python 3
420420 jsCallback .Call (1 , [2 ,3 ], ('tuple' , 'tuple' ),
421- 'unicode string [ąś]' ,
421+ 'unicode string [ąś]' ,
422422 'bytes string [ąś]' .encode ('utf-8' ))
423423 else :
424424 raise Exception ("python.TestJavascriptCallback() failed: "
0 commit comments