-rw-r--r-- | content/util.js | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/content/util.js b/content/util.js index 5af0978..c4af09e 100644 --- a/content/util.js +++ b/content/util.js @@ -54,8 +54,17 @@ function xp_str(xp,x) { * extract xpath-specified node */ function xp_node(xp,x) { var rv = x.evaluate( xp, x, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null ); return rv.singleNodeValue; } +/* + * pull in elements into documents as a member variables + */ +function pull_elements(th,d,els) { + for(var e in els) { + var en=els[e]; + th[en] = d.getElementById(en); + } +} |