Source code

Revision control

Copy as Markdown

Other Tools

Test Info:

<!DOCTYPE html>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<span id="parent" style="position:relative;">
<div id="target"></div>
</span>
<script>
test(function() {
const target = document.getElementById('target');
const parent = document.getElementById('parent');
assert_equals(target.offsetParent, parent);
});
</script>