forked from RubyLouvre/anu
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index6.html
64 lines (56 loc) · 1.54 KB
/
index6.html
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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<script type='text/javascript' src="./dist/React.js"></script>
<script type='text/javascript' src="./lib/babel.js"></script>
</head>
<body>
<h1>测试</h1>
<h1 id='app-root' className="root">
</h1>
<script type='text/babel'>
var check = function () {
return null;
};
check.isRequired = check;
var PropTypes = React.PropTypes || {
string: check
}
if(!window.ReactDOM){
window.ReactDOM = React
}
var container = document.getElementById("app-root")
var expect = function(a) {
return {
toBe: function(b) {
console.log(a,"vs", b, a === b)
},
toEqual(b){
console.log(a,"vs", b, a +""=== b+"")
},
toThrow(b){
try{
a()
}catch(e){
console.log(e,"vs", b, e.message +""=== b+"")
}
}
}
}
function Example() {
return (
<>
Some text.
<h2>A heading</h2>
More text.
<h2>Another heading</h2>
Even more text.
</>
);
}
ReactDOM.render(<Example />, container);
</script>
</body>
</html>