Skip to content

Browser JavaScript Error Codes

olifante edited this page Aug 30, 2011 · 11 revisions

Safari

INDEX_SIZE_ERR: DOM Exception 1

Safari: INDEX_SIZE_ERR: DOM Exception 1
Firefox: An invalid string or code was specified" code: "12

What it means: you are setting a DOM property to undefined.
What you probably did: Perhaps you forgot to initialize a variable (in init?), thus doing “property = uninitialized-var” is throwing this.

This error might also be generated if you ask CGContext to draw an image before the image has loadStatus CPImageLoadStatusCompleted.

Safari: DOM Exception 8

Has something to do with:

element.insertBefore(something, anElementNotInElement)

Firefox

An invalid string or code was specified" code: "12

Safari: INDEX_SIZE_ERR: DOM Exception 1
Firefox: An invalid string or code was specified" code: "12

What it means: you are setting a DOM property to undefined.
What you probably did: Perhaps you forgot to initialize a variable (in init?), thus doing “property = uninitialized-var” is throwing this.

Access to restricted URI denied" code: "1012

What it means: You are trying to access a resource from another domain. Firefox’s security restrictions prevent that. You can either set the security restrictions to false (See Developing locally in Firefox 3), you can mount the code in an application server, or you can use JSONP connections instead of CPURLConnections.