diff options
author | jsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68> | 2011-02-02 10:04:44 +0000 |
---|---|---|
committer | jsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68> | 2011-02-02 10:04:44 +0000 |
commit | f07b324e6f0f2edb71c4dc1d6b63e8a3743c48a6 (patch) | |
tree | f9c59fa81f2d56b87066fc54b9b553ac4c43fd35 /sca-cpp/trunk/modules/js/htdocs/elemutil.js | |
parent | d8df0d6da27ac9c4c61863bc7700db7a871ae8d4 (diff) |
Support for wiring and unwiring references.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1066399 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-cpp/trunk/modules/js/htdocs/elemutil.js')
-rw-r--r-- | sca-cpp/trunk/modules/js/htdocs/elemutil.js | 34 |
1 files changed, 4 insertions, 30 deletions
diff --git a/sca-cpp/trunk/modules/js/htdocs/elemutil.js b/sca-cpp/trunk/modules/js/htdocs/elemutil.js index f6f8dcd186..85eea29aa3 100644 --- a/sca-cpp/trunk/modules/js/htdocs/elemutil.js +++ b/sca-cpp/trunk/modules/js/htdocs/elemutil.js @@ -248,36 +248,10 @@ function namedElementChild(name, l) { */ /** - * Set the value of the attribute with the given name. + * Set the contents of an element. */ -function setNamedAttributeValue(name, v, l) { - var f = filter(function(v) { return isAttribute(v) && attributeName(v) == name; }, l); - if (!isNil(f)) { - - // Un-memoize attribute and change its value - unmemo(l, name); - car(f)[2] = '' + v; - return v; - } - - // Insert new attribute - insertn$(mklist(attribute, name, '' + v), l, 2); - return v; -} - -/** - * Set the value of an element. - */ -function setElementValue(v, l) { - if (elementHasValue(l)) { - - // Change existing element value - l[length(l) - 1] = v; - return v; - } - - // Append element value - $append(l, mklist(v)); - return v; +function setElement(l, e) { + setlist(l, e); + l.memo = {}; } |