Add stanza.getAttribute() method

Thu, 04 Feb 2010 01:08:58 +0000

author
Matthew Wild <mwild1@gmail.com>
date
Thu, 04 Feb 2010 01:08:58 +0000
changeset 9
c4ff2c2fea6d
parent 8
ca881dab2577
child 10
543c2018896c

Add stanza.getAttribute() method

xmpp.js file | annotate | diff | comparison | revisions
--- a/xmpp.js	Wed Feb 03 21:02:33 2010 +0000
+++ b/xmpp.js	Thu Feb 04 01:08:58 2010 +0000
@@ -377,6 +377,10 @@
 			if(typeof(this.children[i]) == "string")
 				buf.push(this.children[i]);
 		return buf.join("");
+	},
+	
+	getAttribute: function (name) {
+		return this.attr[name] || null;
 	}
 }
 

mercurial