summaryrefslogtreecommitdiffstats
path: root/sca-cpp/trunk/modules/js/htdocs/elemutil.js
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--sca-cpp/trunk/modules/js/htdocs/elemutil.js34
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 = {};
}