Monday, June 3, 2024
144
rated 0 times [  148] [ 4]  / answers: 1 / hits: 18959  / 8 Years ago, thu, march 17, 2016, 12:00:00

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?


More From » google-chrome

 Answers
13

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);

[#62902] Tuesday, March 15, 2016, 8 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
michaelashelbieh

Total Points: 303
Total Questions: 139
Total Answers: 97

Location: Suriname
Member since Sun, Oct 17, 2021
3 Years ago
;