<!DOCTYPE html>
<html>
<body>
<p>This tests updating an object element which was showing fallback content while it's disconnected from the document.<br>
WebKit should update the object element when it gets reinserted back into the document.<br>
Test passes if you see "PASS" below:</p>
<object width="100" height="100">FAIL</object>
<script>

if (window.testRunner) {
    testRunner.dumpAsText();
    testRunner.dumpChildFramesAsText();
}

onload = () => {
    let object = document.querySelector('object');
    object.remove();
    object.setAttribute('type', 'text/html');
    object.setAttribute('data', 'data:text/html,PASS');
    document.body.appendChild(object);
}

</script>
</body>
</html>
