blob: 852f70ce9931fa570bf39d74b7a1220e64594444 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<script src="../../resources/js-test-pre.js"></script>
</head>
<body>
<p id="description"></p>
<div id="console"></div>
<script>
description('A test for maxlength attribute of an input element with non-text type');
var input = document.createElement('input');
input.maxLength = 2;
input.type = 'number';
document.body.appendChild(input);
input.focus();
document.execCommand('insertText', false, '1234');
shouldBe('input.value', '"1234"');
input.parentNode.removeChild(input);
</script>
<script src="../../resources/js-test-post.js"></script>
</body>
</html>