Skip to content

Commit

Permalink
Remove DOM dependency when resolving URLs
Browse files Browse the repository at this point in the history
This should make tus-js-client compatible with React Native.
For more details on this, see
#96 (comment)
  • Loading branch information
Acconut committed Aug 7, 2018
1 parent fea0843 commit 53a6ac3
Show file tree
Hide file tree
Showing 9 changed files with 3,009 additions and 2,492 deletions.
604 changes: 551 additions & 53 deletions dist/tus.js

Large diffs are not rendered by default.

12 changes: 8 additions & 4 deletions dist/tus.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/tus.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/tus.min.js.map

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions lib.es5/browser/request.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions lib.es5/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions lib/browser/request.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
/* global window */
import resolve from "resolve-url";
import URL from "url-parse";

export function newRequest() {
return new window.XMLHttpRequest();
}

export function resolveUrl(origin, link) {
return resolve(origin, link);
return new URL(link, origin).toString();
}
Loading

0 comments on commit 53a6ac3

Please sign in to comment.