Repository navigation
Expand file tree
/
Copy pathwxpython.html
More file actions
100 lines (80 loc) · 3.02 KB
/
Copy pathwxpython.html
File metadata and controls
100 lines (80 loc) · 3.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
<!doctype html>
<html>
<head>
<meta charset=utf-8>
<title>CefSimple (utf-8: ąś)</title>
<style>
body { font: 13px Segoe UI, Arial; line-height: 1.4em; }
pre { background: #ddd; font: 12px Consolas, Courier New; }
</style>
</head>
<body>
Use mouse context menu to go Back/Forward in history navigation.
<h3>Google Search</h3>
<a href="http://www.google.com/">http://www.google.com/</a>
<h3>User agent</h3>
<script>document.write(navigator.userAgent)</script>
<h3>Popup</h3>
<a href="javascript:window.open('cefsimple.html')">
window.open('cefsimple.html')</a>
<h3>RequestHandler tests</h3>
<p>See messages in the console.</p>
OnBeforeBrowse() - navigate to see message:
<a href="wxpython.html">wxpython.html</a>
<br>
OnBeforeBrowse() / OnBeforeResourceLoad() - test request.GetPostData()
and request.SetPostData():<br>
submit a form:
<a href="https://accounts.google.com/ServiceLogin">
https://accounts.google.com/ServiceLogin</a>,
upload a file:
<a href="http://encodable.com/uploaddemo/">
http://encodable.com/uploaddemo/</a>
<br>
OnBeforeResourceLoad() - try loading nonexistent css file locally:
<a href="javascript:LoadCssFile('nonexistent.css')">
LoadCssFile('nonexistent.css')</a>
<script>
function LoadCssFile(url) {
var cssFile=document.createElement("link")
cssFile.setAttribute("rel", "stylesheet")
cssFile.setAttribute("type", "text/css")
cssFile.setAttribute("href", url)
document.getElementsByTagName("head")[0].appendChild(cssFile)
}
</script>
<br>
OnBeforeResourceLoad() - try replacing a resource on the fly:
<a href="javascript:LoadCssFile('replace-on-the-fly.css')">
LoadCssFile('replace-on-the-fly.css')</a><br>
(css content: body { color: red; })<br>
OnResourceRedirect() - try loading this url:
<a href="http://tinyurl.com/google404redirect">
http://tinyurl.com/google404redirect</a>
<br>
OnResourceResponse() - try loading nonexistent css file via http:
<a href="javascript:LoadCssFile('http://www.google.com/404.css')">
LoadCssFile('http://www.google.com/404.css')</a>
<br>
OnResourceResponse() - try filtering content of the resource:
<a href="javascript:LoadCssFile('content-filter/replace-on-the-fly.css')">
LoadCssFile('content-filter/replace-on-the-fly.css')</a><br>
(new css content: body { color: green; } and body h3 { color: orange; } )
<br>
<h3>WebRequest test</h3>
See the console for messages.<br>
<a href="javascript:external.WebRequest('http://www.sitepoint.com/robots.txt')">
external.WebRequest('http://www.sitepoint.com/robots.txt')</a>
<h3>Frame.CallFunction() test</h3>
<script>
function MyFunction(param1, param2, param3, param4) {
alert("MyFunction() called\nparam1="+JSON.stringify(param1)+"\nparam2="+JSON.stringify(param2)+"\nparam3="+JSON.stringify(param3)+"\nparam4="+JSON.stringify(param4))
}
</script>
<a href="javascript:external.DoCallFunction()">
external.DoCallFunction()</a>
<br><br><br><br><br><br><br><br><br><br><br>
<br><br><br><br><br><br><br><br><br><br><br>
<br><br><br><br><br><br><br><br><br><br><br>
</body>
</html>