ShadowEditor/ShadowEditor.UI/test/01 ControlTest.html
2018-10-28 21:52:01 +08:00

33 lines
895 B
HTML

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