A partial archive of discourse.wicg.io as of Saturday February 24, 2024.

Way to help avoid using deprecated prefixed apis

Edwin_Reynoso
2015-05-01

An idea to help developers avoid using prefixed api’s which are deprecated yet still implemented in browsers.

I’ll be using indexedDB/webkitIndexedDB as the example in the following.

Ok so webkitIndexedDB show’s up in the console if you start to type webkit. So the idea is to make the deprecated webkit apis the same as a global Element Id.

I only use chrome so I’m not really sure about other browsers if global Element Ids exist, I believe they do.

In chrome if an element has an Id fooBar an there’s no variable declared fooBar typing foo into the console won’t show fooBar as an auto-suggestion, yet if you were to type fooBar and press enter the element with id fooBar will be returned.

So what if we were to do this with deprecated prefixed features where they don’t show up as auto-suggestions yet if you were to type it and press enter it’ll still return the same thing, and still work when used in code.

This will help avoid beginners who are learning from old references which use the deprecated prefixed features and are typing this in the console.

So the reason it still works it’s simply to avoid compatibility issues not breaking anything, yet helping developers avoid using the deprecated prefixed variable.

Also as of right now when typing webkitIndexedDB a deprecated warning shows up only saying to use indexedDB instead, how about doing it each time. Yes this will be annoying, annoying enough for them to use the proper (api? or variable?) indexedDB

Please let me know what you guys think?

briankardell
2015-05-13

interesting. not exactly a standards based idea because the console isn’t standardized, but it’s interesting. have you submitted to any of the individual browser teams? most have a devrel on twitter or something too, you might see what they have to say.