1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-11-04 08:17:17 -05:00
elinks/test/ecmascript/assert/URLSearchParams.html

11 lines
377 B
HTML
Raw Normal View History

2024-06-12 08:25:24 -04:00
<script>
console.error("URLSearchParams.html");
var param = new URLSearchParams('?foo=1&bar=2');
console.assert(param.size === 2, 'size is 2');
console.assert(param.has('foo'), 'foo');
console.assert(param.has('bar', '2'), 'bar=2');
console.assert(param.get('bar') === '2', 'bar = 2');
console.assert(param.toString() === 'foo=1&bar=2', 'without ?');
console.exit();
</script>