Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Only one jslint error

  • Loading branch information...
commit 104158ba17c97f41d2ddc5c6037d06f0826808c6 1 parent 95d8362
@aslakhellesoy authored
Showing with 28 additions and 7 deletions.
  1. +21 −0 README.textile
  2. +1 −1  build.xml
  3. +6 −6 src/webdav.js
View
21 README.textile
@@ -51,3 +51,24 @@ Creates the directory.
h3. Dir.rm(callback)
Removes the directory.
+
+h2. Usage
+
+Not written yet - haven't used it in a browser yet :-)
+
+h2. Running tests
+
+You need to download some tools. Run ./install_tools.sh to pull them down.
+
+h3. In shell A
+
+<pre>
+cd milton/milton-test
+mvn jetty:run
+</pre>
+
+h3. In shell B
+
+<pre>
+ant jsspec
+</pre>
View
2  build.xml
@@ -20,7 +20,7 @@
<jslint options="undef">
<formatter type="plain" />
- <fileset dir="src" includes="*.js" />
+ <fileset dir="src" includes="webdav.js" />
</jslint>
</target>
</project>
View
12 src/webdav.js
@@ -27,21 +27,21 @@ var WebDav = {
if (type == 'xml') {
var xml = xhr.responseXML;
if(xml) {
- b = (xml.firstChild.nextSibling) ? xml.firstChild.nextSibling : xml.firstChild;
+ b = xml.firstChild.nextSibling ? xml.firstChild.nextSibling : xml.firstChild;
}
}
return b;
};
- var async = !(callback == null);
+ var async = !(callback === null);
if(async) {
xhr.onreadystatechange = function(readyState) {
- if(readyState == 4 || readyState == null) { // complete. (null check is workaround for env.rhino.js).
+ if(readyState == 4 || readyState === null) { // complete. (null check is workaround for env.rhino.js).
if(body()) { // Workaround for env.rhino.js
callback(body());
}
}
- }
+ };
}
xhr.open(verb, url, async);
xhr.setRequestHeader("Content-Type", "text/xml; charset=UTF-8");
@@ -78,7 +78,7 @@ WebDav.Fs = {
this.children = function(callback) {
var childrenFunc = function(doc) {
- if(doc.childNodes == null) {
+ if(doc.childNodes === null) {
throw('No such directory: ' + url);
}
var result = [];
@@ -118,4 +118,4 @@ WebDav.Fs = {
return this;
}
-}
+};
Please sign in to comment.
Something went wrong with that request. Please try again.