# HG changeset patch # User Matthew Wild # Date 1265245738 0 # Node ID c4ff2c2fea6dfa6d25eca8c829122fc46b8c9f7a # Parent ca881dab257728c5e44e4e0606431c71088b0234 Add stanza.getAttribute() method diff -r ca881dab2577 -r c4ff2c2fea6d xmpp.js --- 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; } }