ShadowEditor/ShadowEditor.UI/test/01 ControlTest.html
2018-11-13 20:20:55 +08:00

32 lines
814 B
HTML

<!DOCTYPE html>
<html lang="zh-cn">
<head>
<meta charset="utf-8">
<title>01 ControlTest</title>
<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
</head>
<body>
<script src="../dist/ShadowEditor.UI.js"></script>
<script>
function HelloWorld(options) {
Shadow.Control.call(this, options);
}
HelloWorld.prototype = Object.create(Shadow.Control.prototype);
HelloWorld.prototype.constructor = HelloWorld;
HelloWorld.prototype.render = function () {
var dom = this.createElement('div');
dom.innerHTML = 'Hello, world!';
this.renderDom(dom);
};
var hello = new HelloWorld();
hello.render();
</script>
</body>
</html>