mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
auto merge of #4108 : shinglyu/servo/blob, r=jdm
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.
This commit is contained in:
commit
d2a67abea9
6 changed files with 125 additions and 22 deletions
15
tests/content/test_blob.html
Normal file
15
tests/content/test_blob.html
Normal file
|
@ -0,0 +1,15 @@
|
|||
<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>
|
Loading…
Add table
Add a link
Reference in a new issue