Author: gotcha
Date: Tue Sep 18 10:00:23 2007
New Revision: 46706
Modified:
kukit/kukit.js/trunk/kukit/dom.js
Log:
remove a few characters
Modified: kukit/kukit.js/trunk/kukit/dom.js
==============================================================================
--- kukit/kukit.js/trunk/kukit/dom.js (original)
+++ kukit/kukit.js/trunk/kukit/dom.js Tue Sep 18 10:00:23 2007
@@ -23,7 +23,7 @@
var dom = this;
-this.getPreviousSiblingTag = function(node) {
+dom.getPreviousSiblingTag = function(node) {
var toNode = node.previousSibling;
while ((toNode != null) && (toNode.nodeType != 1)) {
toNode = toNode.previousSibling;
@@ -31,7 +31,7 @@
return toNode;
};
-this.getNextSiblingTag = function(node) {
+dom.getNextSiblingTag = function(node) {
var toNode = node.nextSibling;
while ((toNode != null) && (toNode.nodeType != 1)) {
toNode = toNode.nextSibling;
@@ -39,24 +39,24 @@
return toNode;
};
-this.insertBefore = function(nodes, parentNode, toNode) {
+dom.insertBefore = function(nodes, parentNode, toNode) {
for(var i=0; i<nodes.length; i++) {
parentNode.insertBefore(nodes[i], toNode);
}
};
-this.appendChildren = function(nodes, toNode) {
+dom.appendChildren = function(nodes, toNode) {
for(var i=0; i<nodes.length; i++) {
toNode.appendChild(nodes[i]);
}
};
-this.clearChildNodes = function(node) {
+dom.clearChildNodes = function(node) {
//XXX Maybe we want to get rid of sarissa once?
Sarissa.clearChildNodes(node);
};
-this.parseHTMLNodes = function(txt){
+dom.parseHTMLNodes = function(txt){
var node = document.createElement('div');
node.innerHTML = txt;
var resultNodes = [];
@@ -71,7 +71,7 @@
* limited to inNodes subtrees!
*/
-this.cssQuery = function(selector, inNodes) {
+dom.cssQuery = function(selector, inNodes) {
// to eliminate possible errors
if (typeof(inNodes) != 'undefined' && inNodes == null) {
;;; kukit.E = 'Selection error in kukit.dom.cssQuery';
@@ -113,7 +113,7 @@
};
};
-this.focus = function(node) {
+dom.focus = function(node) {
tagName = node.tagName.toLowerCase();
if ((tagName == 'input') || (tagName == 'select')
|| (tagName == 'textarea')) {
@@ -127,7 +127,7 @@
* Gets the textual content of the node
* if recursive=false (default), does not descend into sub nodes
*/
-this.textContent = function(node, recursive) {
+dom.textContent = function(node, recursive) {
var value = _textContent(node, recursive);
// replace newline with spaces
value = value.replace(/\r\n/g, ' ');
@@ -158,7 +158,7 @@
We need to provide workarounds for IE.
*/
-this.getAttribute = function(node, attrname) {
+dom.getAttribute = function(node, attrname) {
if (attrname.toLowerCase() == 'style') {
throw new Error('Style attribute is not allowed with getAttribute');
}
@@ -189,7 +189,7 @@
// XXX We cannot distinguish between notfound and '', unfortunately
};
-this.setAttribute = function(node, attrname, value) {
+dom.setAttribute = function(node, attrname, value) {
if (attrname.toLowerCase() == 'style') {
throw new Error('Style attribute is not allowed with setAttribute');
}
@@ -250,7 +250,7 @@
return result;
};
-this.getKssAttribute = function(node, attrname) {
+dom.getKssAttribute = function(node, attrname) {
// Gets a given kss attribute
// first from the namespace, then from the class
var fullName = _kssAttrNamespace + ':' + attrname;
@@ -265,7 +265,7 @@
return result;
};
-this.setKssAttribute = function(node, attrname, value) {
+dom.setKssAttribute = function(node, attrname, value) {
// Sets a given kss attribute on the namespace
var fullName = _kssAttrNamespace + ':' + attrname;
dom.setAttribute(node, fullName);
@@ -275,7 +275,7 @@
getter is a function that gets the value from the node.
*/
-this.getRecursiveAttribute =
+dom.getRecursiveAttribute =
function(node, attrname, recurseParents, getter) {
var value = getter(node, attrname);
if (recurseParents) {
@@ -303,7 +303,7 @@
*
* Scheduler for embedded window content loaded
*/
-this.EmbeddedContentLoadedScheduler =
+dom.EmbeddedContentLoadedScheduler =
function(framename, func, autodetect) {
this.framename = framename;
this.func = func;
@@ -333,7 +333,7 @@
return doc;
};
-this.EmbeddedContentLoadedScheduler.prototype.check = function() {
+dom.EmbeddedContentLoadedScheduler.prototype.check = function() {
;;;kukit.logDebug('Is iframe loaded ?');
@@ -400,7 +400,7 @@
}
};
-this.getNsTags = function(dom, tagName) {
+dom.getNsTags = function(dom, tagName) {
if (dom.getElementsByTagNameNS) {
tags = dom.getElementsByTagNameNS('http://www.kukit.org/commands/1.0',
tagName);
@@ -415,7 +415,7 @@
return new RegExp('\\b'+class_name+'\\b').test(node.className);
};
-this.addClassName = function(node, class_name) {
+dom.addClassName = function(node, class_name) {
if (!node.className) {
node.className = class_name;
} else if (!_hasClassName(node, class_name)) {
@@ -425,7 +425,7 @@
}
};
-this.removeClassName = function(node, class_name) {
+dom.removeClassName = function(node, class_name) {
var className = node.className;
if (className) {
// remove
_______________________________________________
Kukit-checkins mailing list
[email protected]
http://codespeak.net/mailman/listinfo/kukit-checkins