mirror of
https://github.com/Polymer/polymer.git
synced 2026-08-19 01:14:44 -05:00
30 lines
691 B
HTML
30 lines
691 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>lib::class with document.register</title>
|
|
<script src="../../lib/oop.js"></script>
|
|
</head>
|
|
<body>
|
|
<script>
|
|
Button = $class(HTMLButtonElement, {
|
|
constructor: function() {
|
|
this.emit('[Construct Base]')
|
|
},
|
|
emit: function(inMsg) {
|
|
document.body.appendChild(document.createTextNode(inMsg));
|
|
},
|
|
soundOff: function() {
|
|
this.emit('[Base]');
|
|
}
|
|
});
|
|
b = new Button();
|
|
b.soundOff();
|
|
</script>
|
|
</body>
|
|
</html>
|