ModuleLoader/es6-module-loader — pull request #132 by justinbmeyer (2014-04-09 20:25:22+00:00)
Title: toAbsoluteURL given a relative base

This will close #129.

This changes toAbsoluteURL to first merge baseURL with `baseRef`. `baseRef` is the current location of the page (or document.baseURI).

This enables setting baseURL to "../".

For testing, I've added the ability to set `baseRef` like:

```js
var base = makeBase('http://example.org/a/b.html');
```

And to tear it down like:

```js
base.restore()
```

And given a `baseRef` do some quick `baseURL` + `name` = `result` testing like:

```js
runLocateTests([
['..',	'foo',	'http://example.org/foo.js',	'relative+name .. + foo'],
['../',	'foo',	'http://example.org/foo.js',	'relative+name ../ + foo'],
]);
```

The last item in the array is the test name (so just "Locate" isn't show 5 times).