Skip to content
Skip to search - Accesskey = s
parentNode.org
The building blocks of a solid frontend.
Pasted
by
Munger
on
2006-06-24 23:20
as
JavaScript
Create New
http://pastebin.parentnode.org/
Links this one
http://pastebin.parentnode.org/536
Comment
Snippets of junk
function Extend(subclass, superclass) { function Dummy(){} Dummy.prototype = superclass.prototype; subclass.prototype = new Dummy(); subclass.prototype.constructor = subclass; subclass.superclass = superclass; subclass.superproto = superclass.prototype; }; Pane = function( type ) { this.type = type; } SomeDiv = function( foreground, background ) { } // SomeDiv is a subclass of Pane, but the 'type' param should always be 'div' Extend( SomeDiv, Pane );