-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
45 lines (40 loc) · 1.02 KB
/
index.html
File metadata and controls
45 lines (40 loc) · 1.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
<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
<title>Cacher</title>
<script src="src/cacher.js" type="text/javascript"></script>
<style>
* { margin: 0; padding: 0; }
</style>
</head>
<body>
<div id="cacheME">text to cache</div>
<script>
window.onload = function() {
var currentDate = new Date();
var div = document.getElementById('cacheME');
var scope = function() {
console.log(this.__ID__);
}
window.page = new Cache({
elem: div,
text: div.innerHTML,
date: currentDate,
childFunc: scope
});
window.functions = new Cache({
funcParam: function(param1, param2) {
console.log(param1, param2);
},
funcScope: scope,
child: page.clone(),
funcChild: function() {
console.log(this.__ID__);
this.child.childFunc();
}
});
window.inheritance = window.functions.clone();
console.dir(page);
}
</script>
</body>