Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android, indexedDB and .deleteDatabase method #979

Closed
KingRial opened this issue Jun 18, 2013 · 12 comments · Fixed by #1238
Closed

Android, indexedDB and .deleteDatabase method #979

KingRial opened this issue Jun 18, 2013 · 12 comments · Fixed by #1238

Comments

@KingRial
Copy link

Just discovered that on some android browsers ( usually the native browser ) the indexedDB's "deleteDatabase" method is not supported.

See indexeddbshim/IndexedDBShim#37 for details.

Should be added a test case to handle such event.

@ryanseddon
Copy link
Member

So does Android not supporting this method render indexedDB useless?

@KingRial
Copy link
Author

Nope; it's just not fully supported.
You can freely create/insert/delete single values but you can't delete the database.

The problem appears when you use Modernizr to check the indexedDB support; it just tells you a boolean answer.
If it's an ok, the last thing you expect is discover that on a very single specific native Android browser, the feature is not really fully supported.

I think it should be handled somehow to let the user know about such missing part.
Especially if he is using Modernizr to understand the correct presence of a browser feature.

@patrickkettner
Copy link
Member

Well, we have two options.

  1. adding .deleteDatabase as a dotproperty to the main test (looks to be as simple as 'deleteDatabase' in (window.indexedDB || {}))
  2. adding a doc note mentioning the discrepancy.

Based on the amount of questions on SO, code on github, and results on google, I would vote or option number 2. That being said, I could go either way since the addition would be pretty light weight.

@stucox
Copy link
Member

stucox commented Feb 23, 2014

I’d be up for a subproperty here actually.

@patrickkettner
Copy link
Member

What are you, me? :)

On Sun, Feb 23, 2014 at 6:15 AM, Stu Cox notifications@github.com wrote:

I’d be up for a subproperty here actually.

Reply to this email directly or view it on GitHub:
#979 (comment)

@stucox
Copy link
Member

stucox commented Feb 23, 2014

Increasingly, yes. My name is Tyler Durden.

@patrickkettner
Copy link
Member

Do you really feel that the actual test is relevant to many people?

@stucox
Copy link
Member

stucox commented Feb 24, 2014

Well, to at least to @KingRial by the sounds of things. Are we going to start asking for use cases for every new detect we add? (genuine question/suggestion, not a dig – we’re pretty open in the feature requests we accept at the mo)

@KingRial
Copy link
Author

As a matter of fact I really needed such test; discovering there were some Android with missing "deleteDatabase" method was an unexpected surprise and took some time to understand the situation and patch it.

Recent Android mobiles don't have this problem anymore but, if you wish to support correctly the past, you need, at least, a warning in the documentation.

A "subproperty" would be really nice to have if you are a lazy coder like me :D

@patrickkettner
Copy link
Member

The only reason why I asked was because this only seems to affect some implementations of android that are broken, none of which are still shipping (from what I can tell). Its not so much a feature detect as it is checking for a lack of a broken implementation.

@stucox
Copy link
Member

stucox commented Feb 24, 2014

Sounds more incomplete than broken? Especially if the deleteDatabase() method isn’t even present.

@patrickkettner
Copy link
Member

ok - you convinced me. subproperty test is good.

patrickkettner added a commit to patrickkettner/Modernizr that referenced this issue Feb 28, 2014
patrickkettner added a commit to patrickkettner/Modernizr that referenced this issue Feb 28, 2014
patrickkettner added a commit to patrickkettner/Modernizr that referenced this issue Mar 4, 2014
patrickkettner added a commit to patrickkettner/Modernizr that referenced this issue Mar 4, 2014
patrickkettner added a commit to patrickkettner/Modernizr that referenced this issue Feb 22, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants