diff options
author | drry | 2008-12-22 09:01:57 +0000 |
---|---|---|
committer | drry | 2008-12-22 09:01:57 +0000 |
commit | 363a66408611d27b8b0f22e1d8226b86dbfb9ffc (patch) | |
tree | 04c064178971ebd5d91af71aedd018b488a37405 /_libly.js | |
parent | f9dc40f9a3e34ede7f40b7137576243d3dff06f6 (diff) | |
download | vimperator-plugins-363a66408611d27b8b0f22e1d8226b86dbfb9ffc.tar.bz2 |
* XPath を修正しました。
* ほか。
git-svn-id: http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk@27220 d0d07461-0603-4401-acd4-de1884942a52
Diffstat (limited to '_libly.js')
-rw-r--r-- | _libly.js | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -233,8 +233,8 @@ libly.$U = {//{{{ // HTML, XML, DOM, E4X {{{ pathToURL: function(a, baseURL, doc) { if (!a) return ''; - var XHTML_NS = "http://www.w3.org/1999/xhtml" - var XML_NS = "http://www.w3.org/XML/1998/namespace" + var XHTML_NS = "http://www.w3.org/1999/xhtml"; + var XML_NS = "http://www.w3.org/XML/1998/namespace"; //var path = (a.href || a.getAttribute('src') || a.action || a.value || a); var path = (a.getAttribute('href') || a.getAttribute('src') || a.action || a.value || a); if (/^https?:\/\//.test(path)) return path; @@ -263,7 +263,7 @@ libly.$U = {//{{{ if (!xpath) return null; context = context || window.content.document; var result = (context.ownerDocument || context).evaluate(xpath, context, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null); - return result.singleNodeValue ? result.singleNodeValue : null; + return result.singleNodeValue || null; }, getNodesFromXPath: function(xpath, context, callback, thisObj) { var ret = []; |