-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
60 lines (52 loc) · 2.23 KB
/
index.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<title>µ jQuery App - examples/create/prototype</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.0.0-alpha.6/css/bootstrap.min.css" integrity="sha256-rr9hHBQ43H7HSOmmNkxzQGazS/Khx+L8ZRHteEY1tQ4=" crossorigin="anonymous" />
</head>
<body>
<section class="container">
<h1>Advanced prototype chain</h1>
<p class="lead">This example shows advanced manipulation of the prototype chain.</p>
</section>
<section class="container" id="code" mu-widget="mu-jquery-widget-runkit/widget">
<pre><code>
var create = require("mu-create/create");
var construct = require("mu-create/constructor");
var proto = require("mu-create/prototype");
var i = 0;
var P = function () {};
P.prototype.base = ++i;
var C = create(construct, proto)(function() {
this.instance = ++i;
}, {
"prototype": function(c) {
return Object.defineProperty(new P(), "constructor", {
"value": c
});
}
}, {
"component": ++i
}, {
"prototype": function(c) {
return Object.create(c.prototype);
}
}, {
"inject": ++i
});
var c = new C();
</code></pre>
</section>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.slim.min.js" integrity="sha256-k2WSCIexGzOj3Euiig+TlR8gA0EmPjuc79OEeY5L45g=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/tether/1.4.0/js/tether.min.js" integrity="sha256-gL1ibrbVcRIHKlCO5OXOPC/lZz/gpdApgQAzskqqXp8=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.0.0-alpha.6/js/bootstrap.min.js" integrity="sha256-+kIbbrvS+0dNOjhmQJzmwe/RILR/8lb/+4+PUNVW09k=" crossorigin="anonymous"></script>
<script src="https://embed.runkit.com"></script>
<script src="https://rawgit.com/mu-lib/mu-jquery-runkit/v0.2.1/jquery.runkit.js"></script>
<script src="https://rawgit.com/mu-lib/mu-jquery-app/v17.0.3/dist/bundle.min.js"></script>
<script src="../widget.js"></script>
<script src="https://rawgit.com/mu-lib/mu-jquery-app/v17.0.3/examples/quickstart-umd/app.js"></script>
</body>
</html>