Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"'window.webkitStorageInfo' is deprecated" warning while iterating window object

Please consider the following code in html/javascript:

<html>
<head>
<script>
    var myObject = {};
    var mySecondReference = myObject;

    for (s in window)
      if (window[s]===myObject)
        alert("reference found: " + s);
</script>
</head>
</html>

It iterates though the window object in order to search any references to a given object. It works fine everywhere, however in Chrome/ium gives me the following warnings:

'window.webkitStorageInfo' is deprecated. Please use 'navigator.webkitTemporaryStorage' or 'navigator.webkitPersistentStorage' instead.
test.html:8 'webkitIndexedDB' is deprecated. Please use 'indexedDB' instead.

Is it something I should be scared of (especially with future versions of chrome browser)?

How can I get rid of those messages?

like image 849
lviggiani Avatar asked Nov 26 '22 18:11

lviggiani


1 Answers

It's not something you have to worry about, If you don't want to see them, just filter it

var myObject = {};
var mySecondReference = myObject;

for (s in window)
  if (!/webkitStorageInfo|webkitIndexedDB/.test(s) && window[s]===myObject)
    alert("reference found: " + s);
like image 176
Endless Avatar answered Nov 29 '22 06:11

Endless