renovations

This commit is contained in:
Ilya Kantor 2015-04-01 19:08:41 +03:00
parent 0e9ceb2b3a
commit 150d92f10f
47 changed files with 290 additions and 110 deletions

View file

@ -9,26 +9,25 @@
<p>Страница создаёт объект <code>XMLHttpRequest</code> каждые 50мс.</p>
<p>Смотрите на память, она течёт в IE&lt;9.</p>
<p>Нажмите на кнопку и смотрите на память, она течёт в IE&lt;9.</p>
<button onclick="setInterval(leak, 50);">Запустить</button>
<script>
function leak() {
var xhr = new XMLHttpRequest();
xhr.open('GET', 'something.js?' + Math.random(), true);
xhr.open('GET', '?' + Math.random(), true);
xhr.onreadystatechange = function() {
if (xhr.readyState == 4 && xhr.status == 200) {
document.getElementById('test').innerHTML++
document.getElementById('test').innerHTML++;
}
}
xhr.send(null);
}
onload = function() {
setInterval(leak, 50);
}
</script>
<div>Количество запросов: <span id="test">0</span></div>