Created
April 11, 2012 00:41
-
-
Save Trindaz/2355968 to your computer and use it in GitHub Desktop.
Unwanted qualified href values
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var currentDoc = jsdom.jsdom('<html><head><title>href test</title></head><body><p><a href="test.html">Test</a></p></body></html>';, null, {}); | |
var window = currentDoc.createWindow(); | |
jsdom.jQueryify(window, 'jquery-1.4.2.min.js' , function() { | |
console.log(window.$('a')[0]['href']); | |
}); | |
/* | |
returns /Users/[path to the script]/test.html | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment