blob: 29b8593707e12d3ecdedecd9bb9db4b37a23037d [file] [log] [blame]
<!DOCTYPE html>
<script src="../../resources/js-test-pre.js"></script>
<script>
description('Tests that we have the expected form in scope');
function dispatchClick(element)
{
var clickEvent = document.createEvent('MouseEvent');
clickEvent.initMouseEvent('click', true, false, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null);
element.dispatchEvent(clickEvent);
}
var expected;
var f = document.createElement('form');
var i = f.appendChild(document.createElement('input'));
i.setAttribute('onclick', 'expected = typeof action');
f.removeChild(i);
f = null;
gc();
dispatchClick(i);
shouldBeEqualToString('expected', 'undefined');
</script>
<script src="../../resources/js-test-post.js"></script>