<!DOCTYPE html> | |
<html> | |
<script> | |
if (window.internals) | |
window.internals.settings.setAttachmentElementEnabled(true) | |
</script> | |
<body onload="runTest()"> | |
<div style="-webkit-user-select: all;">text before <attachment id="attachment"></attachment> text after</div> | |
<script> | |
var file; | |
if (window.internals) | |
file = window.internals.createFile("resources/test-file.txt"); | |
var attachment = document.getElementById('attachment'); | |
attachment.file = file; | |
window.onload = function () { | |
if (!window.eventSender) | |
return; | |
eventSender.mouseMoveTo(attachment.offsetLeft + 10, attachment.offsetTop + 10); | |
eventSender.mouseDown(0); | |
eventSender.mouseUp(0); | |
} | |
</script> | |
</body> | |
</html> |