Closed
Bug 805794
Opened 12 years ago
Closed 12 years ago
Moz-prefixed features can be shadowed by 'var' declarations.
Categories
(Firefox :: General, defect)
Tracking
()
RESOLVED
DUPLICATE
of bug 770844
People
(Reporter: cscott, Unassigned)
Details
Standard fields of the window object are not shadowed by local variable definitions: // this works fine var navigator = window.navigator; But other fields (formerly prefixed features, it seems) get improperly shadowed: // this sets both indexedDB *and* window.indexedDB to 'undefined'! var indexedDB = window.indexedDB; // ditto (if your browser still has prefixed indexedDB) var mozIndexedDB = window.mozIndexedDB; Test case at: http://mozbugs.github.cscott.net/shadow/ Occurs on nightly Firefox/Android as well.
I've also filed a chrome bug: http://code.google.com/p/chromium/issues/detail?id=158049 Chrome does fine with webkitIndexedDB, but has shadowing problems with requestAnimationFrame.
Comment 2•12 years ago
|
||
This will happen for any property that lives on the proto chain of the global; see discussion in bug 770844. The only reason it works for navigator is that navigator is an own property of the window in Gecko at the moment for various hacky reasons.
Status: UNCONFIRMED → RESOLVED
Closed: 12 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•