<script src="../main.js" type="text/javascript"></script>
<script>
// My quickie class creator. It sets up classical(ish) inheritence without all
// the ugliness of .protoype this and that. There\'s a bunch of different mechanisms
// to do this, but I\'m stubborn and did my own..
JPLT.Class.create(
// Class Name
"JPLT.SimpleHelloWorld",
// Superclass
Object,
// Constructor
function() {
this.createElement();
this.paint();
},
// Members
{
createElement: function() {
this.element = document.createElement("div");
this.element.innerHTML = "Hello, World!";
this.element.style.margin = "auto";
this.element.style.fontSize = "18pt";
this.element.style.fontFamily = "sans-serif";
return this.element;
},
paint: function() {
var body = document.documentElement || document.body;
body.appendChild(this.element);
}
}
);
var helloWorld = new JPLT.SimpleHelloWorld();
</script>