summaryrefslogtreecommitdiff
path: root/services/sync/tps/extensions/mozmill/resource/stdlib/dom.js
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@gmail.com>2014-05-21 11:38:25 +0200
committerwolfbeast <mcwerewolf@gmail.com>2014-05-21 11:38:25 +0200
commitd25ba7d760b017b038e5aa6c0a605b4a330eb68d (patch)
tree16ec27edc7d5f83986f16236d3a36a2682a0f37e /services/sync/tps/extensions/mozmill/resource/stdlib/dom.js
parenta942906574671868daf122284a9c4689e6924f74 (diff)
downloadpalemoon-gre-d25ba7d760b017b038e5aa6c0a605b4a330eb68d.tar.gz
Recommit working copy to repo with proper line endings.
Diffstat (limited to 'services/sync/tps/extensions/mozmill/resource/stdlib/dom.js')
-rw-r--r--services/sync/tps/extensions/mozmill/resource/stdlib/dom.js21
1 files changed, 21 insertions, 0 deletions
diff --git a/services/sync/tps/extensions/mozmill/resource/stdlib/dom.js b/services/sync/tps/extensions/mozmill/resource/stdlib/dom.js
new file mode 100644
index 000000000..1592a7411
--- /dev/null
+++ b/services/sync/tps/extensions/mozmill/resource/stdlib/dom.js
@@ -0,0 +1,21 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+var EXPORTED_SYMBOLS = ['getAttributes'];
+
+
+var getAttributes = function (node) {
+ var attributes = {};
+ for (i in node.attributes) {
+ if ( !isNaN(i) ) {
+ try {
+ var attr = node.attributes[i];
+ attributes[attr.name] = attr.value;
+ } catch (err) {
+ }
+ }
+ }
+ return attributes;
+}
+