equal
deleted
inserted
replaced
41 } |
41 } |
42 if (node) { |
42 if (node) { |
43 return $(node); |
43 return $(node); |
44 } |
44 } |
45 return null; |
45 return null; |
|
46 }, |
|
47 |
|
48 // escapes string selectors (e.g. "foo.[subject]:42" -> "foo\.\[subject\]\:42" |
|
49 escape: function(selector) { |
|
50 if (typeof(selector) == 'string') { |
|
51 return selector.replace( /(:|\.|\[|\])/g, "\\$1" ); |
|
52 } |
|
53 // cw.log('non string selector', selector); |
|
54 return ''; |
46 }, |
55 }, |
47 |
56 |
48 getNode: function (node) { |
57 getNode: function (node) { |
49 if (typeof(node) == 'string') { |
58 if (typeof(node) == 'string') { |
50 return document.getElementById(node); |
59 return document.getElementById(node); |