JSWindows (a JavaScript Inheritance Demo) other Objects

© 2013, Martin Rinehart


The other argument is the final one in Wobj instances (including instances inheriting from Wobj). It is not a class. The other object is normally formed by an object literal. It is used to pass additional values to the DOM element.

Most typical: creating an innerHTML value to add a bit of text (often temporary, during development):

var other = { innerHTML: 'This will be dialog 67!' };

var dlg67 = new jsw.Rect( ..., other );

There are no restrictions on what you can provide this way. Here, for example, are event handlers:

function mouseover( event ) { ... }
function mouseout ( event ) { ... }
var other = { onmouseover: mouseover, onmouseout: mouseout };

var btn24 = new jsw.Btn( ..., other );

Feedback: MartinRinehart at gmail dot com

# # #