Browse files

clean

  • Loading branch information...
1 parent 6bcfa3f commit 9452921ee98579e71ccd9e29dddb99da83cdbde4 @chjj committed Mar 15, 2012
Showing with 11 additions and 10 deletions.
  1. +11 −10 lib/zest.js
View
21 lib/zest.js
@@ -397,16 +397,16 @@ var selectors = {
':read-write': function(el) {
return !selectors[':read-only'](el);
},
- ':hover': function(el) {
+ ':hover': function() {
throw new Error(':hover is not supported.');
},
- ':active': function(el) {
+ ':active': function() {
throw new Error(':active is not supported.');
},
- ':link': function(el) {
+ ':link': function() {
throw new Error(':link is not supported.');
},
- ':visited': function(el) {
+ ':visited': function() {
throw new Error(':visited is not supported.');
},
':column': function() {
@@ -418,13 +418,13 @@ var selectors = {
':nth-last-column': function() {
throw new Error(':nth-last-column is not supported.');
},
- ':current': function(el) {
+ ':current': function() {
throw new Error(':current is not supported.');
},
- ':past': function(el) {
+ ':past': function() {
throw new Error(':past is not supported.');
},
- ':future': function(el) {
+ ':future': function() {
throw new Error(':future is not supported.');
},
// Non-standard, for compatibility purposes.
@@ -528,7 +528,8 @@ var combinators = {
var node;
function ref(el) {
- var nodes = zest('*', el.ownerDocument)
+ var doc = el.ownerDocument
+ , nodes = doc.getElementsByTagName('*')
, i = nodes.length;
while (i--) {
@@ -540,7 +541,7 @@ var combinators = {
}
node = null;
- };
+ }
ref.combinator = function(el) {
if (!node || !node.getAttribute) return;
@@ -824,7 +825,7 @@ var select = (function() {
Array.prototype.slice.call(document.getElementsByTagName('*'));
return Array.prototype.slice;
} catch(e) {
- e = undefined;
+ e = null;
return function() {
var a = [], i = 0, l = this.length;
for (; i < l; i++) a.push(this[i]);

0 comments on commit 9452921

Please sign in to comment.