renovations
This commit is contained in:
parent
0e9ceb2b3a
commit
150d92f10f
47 changed files with 290 additions and 110 deletions
|
@ -9,26 +9,25 @@
|
|||
|
||||
<p>Страница создаёт объект <code>XMLHttpRequest</code> каждые 50мс.</p>
|
||||
|
||||
<p>Смотрите на память, она течёт в IE<9.</p>
|
||||
<p>Нажмите на кнопку и смотрите на память, она течёт в IE<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>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue