Permalink
Browse files

Merge pull request #49 from jhurliman/master

Add response.url parameter and give jsdom proper URLs
  • Loading branch information...
2 parents a942cf3 + 94b9426 commit f39a4fb43d8a48b75a26321e2ec918afd4ba9901 @chriso chriso committed Aug 18, 2011
Showing with 3 additions and 1 deletion.
  1. +1 −1 lib/node.io/dom.js
  2. +2 −0 lib/node.io/request.js
View
@@ -52,7 +52,7 @@ Job.prototype.parseHtml = function (data, callback, response) {
};
var $, window, jquery, default_$;
try {
- window = require('jsdom').jsdom(data, null, {features:features}).createWindow();
+ window = require('jsdom').jsdom(data, null, {features:features, url:response.url}).createWindow();
jquery = require('jquery');
default_$ = jquery.create(window);
$ = function (selector, context) {
View
@@ -311,6 +311,8 @@ Job.prototype.doRequest = function (method, resource, body, headers, callback, p
request = (secure ? https : http).request(options, function (response) {
+ response.url = resource;
+
request_reponse = response;
if (self.is_complete) {

0 comments on commit f39a4fb

Please sign in to comment.