seajs/seajs — pull request #1281 by akfish (2014-07-30 08:03:37+00:00)
Title: Fix blob URL handling when running inline web worker

## Change List

* FIX - blob URL bug (see below)
* FIX - `getScriptAbsoluteSrc` used before declaration (break sea-debug.js on FireFox)
* ADD - set sea.js's path as `seajs.data.loader` field for convenience.
* ADD - inline web worker test

## Blob URL Bug

Web worker can be created inline use blob:
```javascript
var src = "importScripts('path/to/sea.js');\n" +
"seajs.use('something');";
var blob = new Blob([src]);
var blobUrl = window.URL.createObjectURL(blob);
var worker = new Worker(blobUrl);
```

In such case, `location.href` returns a blob URL (e.g. `"blob:http%3A//localhost%3A8080/c2fed98e-bbdb-4da1-aec8-45bdfb4bfbdb"`), which will either break `dirname()` method on some browsers or result in wrong `seajs.data.cwd` value.

This issue is fixed in this PL by:
1. Ignore blob URL when calculating `cwd`
2. Fall back to use `loaderDir` as `cwd`