mirror of
https://github.com/Polymer/polymer.git
synced 2026-08-19 01:14:44 -05:00
45 lines
988 B
HTML
45 lines
988 B
HTML
<!DOCTYPE html>
|
|
<!--
|
|
Copyright 2013 The Polymer-Project Authors. All rights reserved.
|
|
Use of this source code is governed by a BSD-style
|
|
license that can be found in the LICENSE file.
|
|
-->
|
|
<html>
|
|
<head>
|
|
<title>plain</title>
|
|
</head>
|
|
<body>
|
|
<script>
|
|
Base = function() {
|
|
};
|
|
Base.prototype = {
|
|
emit: function(inMsg) {
|
|
document.body.appendChild(document.createTextNode(inMsg));
|
|
},
|
|
soundOff: function() {
|
|
this.emit('[Base]');
|
|
}
|
|
};
|
|
//
|
|
Sub = function() {
|
|
};
|
|
Sub.prototype = Object.create(Base.prototype);
|
|
Sub.prototype.soundOff = function() {
|
|
this.emit('[Sub]')
|
|
Base.prototype.soundOff.call(this);
|
|
};
|
|
//
|
|
SubSub = function() {
|
|
};
|
|
SubSub.prototype = Object.create(Sub.prototype);
|
|
SubSub.prototype.soundOff = function() {
|
|
this.emit('[SubSub]');
|
|
Sub.prototype.soundOff.call(this);
|
|
};
|
|
//
|
|
subsub = new SubSub();
|
|
subsub.soundOff();
|
|
</script>
|
|
</body>
|
|
</html>
|