Skip to content

Instantly share code, notes, and snippets.

@Trindaz
Created April 11, 2012 00:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Trindaz/2355968 to your computer and use it in GitHub Desktop.
Save Trindaz/2355968 to your computer and use it in GitHub Desktop.
Unwanted qualified href values
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