Re: addEventListener / attachEvent inside a class
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.javascript archive

Re: addEventListener / attachEvent inside a class

From: Thomas 'PointedEars' Lahn <PointedEars@web.de>
Date: Sat Dec 03 2005 - 01:28:15 CET

rhamlin wrote:

> [...]

What you are talking about is a prototype (object), not a class.
JavaScript < 2.0/JScript < 7.0 (.NET)/ECMAScript < 4 are object-oriented
programming languages using prototype-based, not class-based, inheritance.

| viewClass.prototype.addBtn = function(txt,img) {
| myBtn = document.createElement('DIV');

Do you really want to create this _global_ _variable_?
If you say "yes" here: Why are you using prototypes then?

PointedEars
Received on Sat Dec 3 04:35:50 2005