Welcome, guest! Login / Register - Why register?
Psst.. new poll here.
[email protected] web/email now available. Want one? Go here.
Cannot use outlook/hotmail/live here to register as they blocking our mail servers. #microsoftdeez
Obey the Epel!

Paste

Pasted as JavaScript by Username ( 14 years ago )
var Engine = Class.extend({



    canvas_id: 'canvas',

    canvas: '',

    context: '',



    init: function(canvas_id)

    {

        console.log('init: Setting this.canvas_id to ' + canvas_id);

        this.canvas_id = canvas_id;

    },



    begin: function()

    {

        console.log('begin: Getting element with ID ' + this.canvas_id);

        this.canvas = document.getElementById(this.canvas_id);

        console.log(this.canvas_id);

        console.log('begin: Set this.canvas', this.canvas)

        this.context = this.canvas.getContext('2d');



        this.context.fillText("Hello World!", 10, 10);

    }



});

 

Revise this Paste

Your Name: Code Language: