Let's build this incrementally. I implemented a `Blob` that can hold a `DOMString`, and has `size` attribute and `slice(...)` method. I'll finish the rest in later PRs. Source-Repo: https://github.com/servo/servo Source-Revision: d2a67abea9f6acd7b0ea29a852bf5029aef3f405
16 lines
324 B
HTML
16 lines
324 B
HTML
<html>
|
|
<head>
|
|
<script src="harness.js"></script>
|
|
<script>
|
|
var testData = ['<a id="a"><b id="b">hey!</b></a>'];
|
|
var b = new Blob(testData); // the blob
|
|
is(b.size, 32);
|
|
is(b.type, "");
|
|
|
|
var bs = b.slice(0, 5);
|
|
is(bs.size, 5);
|
|
is(b.type, "");
|
|
</script>
|
|
</head>
|
|
</html>
|