You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- throws an error, returning a PyFrame object to to javascript is not yet supported<br>
66
+
<ahref="javascript:alert(browser.GetFrame('simple'))">GetFrame('simple')</a> - throws an error, returning a PyFrame object to javascript is not yet supported<br>
<ahref="javascript:alert(python.GetType(2147483648))">python.GetType(2147483648)</a> - here we get UINT from CEF so it's still converted to long.<br>
151
+
<ahref="javascript:alert(python.GetType(2147483648))">python.GetType(2147483648)</a> - here we get UINT from CEF so it is converted to long in Py2, int in Py3.<br>
See output in console for these tests. (Note: "window." is optional, you can just call "python.Test1()")<br>
181
+
See output in the console for the javascript bindings tests.<br>
182
+
Note: "window." is optional, you can just call "python.Test1()".<br>
185
183
186
184
<h4>Passing arguments</h4>
187
185
188
186
<ahref="javascript:alert('Return value from python.Test1: '+python.Test1(100))">python.Test1(100)</a><br>
189
-
<ahref="javascript:alert('Return value from python.Test2: '+JSON.stringify(python.Test2(100, 'This string was passed from javascript [unicode: ąś]', '')))">python.Test2(100, 'This string was passed from javascript [unicode: ąś]', '')</a> - python.Test2() should return: [1,2, [2.1, {'3': 3, '4': [5,6]}]]
187
+
<ahref="javascript:alert('Return value from python.Test2: '+JSON.stringify(python.Test2(100, 'This string was passed from javascript [unicode: ąś]', '')))">python.Test2(100, 'This string was passed from javascript [unicode: ąś]', '')</a> - python.Test2() should return: [1,2, [2.1, {'3': 3, '4': [5,6]}], unicode...]
190
188
<br><br>
191
189
192
190
<script>vararray=[1];array[100]=100.01;</script>
@@ -236,13 +234,23 @@ <h3>Python callbacks</h3>
236
234
237
235
<h3>Errors</h3>
238
236
239
-
<p>Typically when you browse a webpage your javascript errors appear in javascript console in developer tools (in cefadvanced.py there is a binding to F12 key for developer tools).</p>
237
+
<p>Typically when you browse a webpage javascript errors appear in
238
+
the developer tools javascript console (in cefadvanced.py there
239
+
is a binding to F12 key for the developer tools popup).</p>
240
240
241
241
<h4>Global exception handler</h4>
242
242
243
+
<script>
244
+
functionDoSomeError(){
245
+
asd()
246
+
}
247
+
</script>
248
+
243
249
<p>You can catch javascript errors programmatically by
244
-
using JavascriptContextHandler and the OnUncaughtException callback,
245
-
test it:<br>
250
+
using JavascriptContextHandler.OnUncaughtException() callback,
251
+
to see the complete stack trace you need to set the
252
+
"uncaught_exception_stack_size" ApplicationSettings option to
0 commit comments