emberjs/ember.js — Issue #578: function findNamespaces, Error Accessing Window Property
Author: JamesHight
Created: 2012-03-09 21:11:51+00:00
State: open

Error: Operation is not supported" code: "9"
System: FF 3.6.10, Ubuntu 10.10
Ember: build from master 3-9-2012

I'm seeing this when loading an html page from the local file system.
It triggers when ember tries to reference window['sessionStorage'].

```javascript
function findNamespaces() {
var Namespace = Ember.Namespace, obj;

if (Namespace.PROCESSED) { return; }

for (var prop in window) {
/* SNIP ... */

obj = window[prop]; // POINT OF ERROR

/* ... SNIP */
}
}
```
Adding a try/catch around "obj = window[prop];" resolves the issue.

```javascript
try {
obj = window[prop];
} catch(err) {
continue;
}
```

I first noticed it when trying to run the ember-layout-example project locally.
https://github.com/ghempton/ember-layout-example

Here's a simplified test:

```HTML

```