This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
When you open an objectStore with a read only mode, any subsequent write operation should probably result in an error. I don't see anywhere in the spec that specifically says this or mentions what error code should be used. Currently in the spec, writing with the noOverwrite flag set causes a CONSTRAINT_ERR, so I'm guessing that's the best one to go with for this condition as well?
I introduced a specific READ_ONLY_ERR to cover this. It seems worth having a separate error rather than throwing NOT_ALLOWED_ERR since it's a very easy mistake to make to forget to specify the optional 'mode' parameter when creating a transaction, and so I think it's worth making this error easy to diagnose. http://dvcs.w3.org/hg/IndexedDB/rev/0901d0b89904