Files
cthulhu/tests/browser-replaced-feed.html

13 lines
825 B
HTML

<!doctype html><meta charset="utf-8"><title>Cthulhu Browser Probe</title>
<button autofocus>Feed start</button>
<main><section id="feed"><article><section><h2>Earlier post</h2></section></article><article><section><h2>Middle post</h2></section></article><article><section><h2>Later post</h2></section></article></section></main>
<script>
document.addEventListener('keydown', event => {
if (event.key === 'F9') {
document.getElementById('feed').outerHTML = '<section id="feed"><article><section><h2>Earlier refreshed post</h2></section></article><article><section><h2>Middle refreshed post</h2></section></article><article><section><h2>Later refreshed post</h2></section></article></section>';
document.querySelector('button').textContent = 'Feed replacement complete';
event.preventDefault();
}
});
</script>