<title>AtomTester</title>
<script src=Atom.js></script>
<script>
+ // Add Blob.prototype.slice if it does not already exist:
+ if (typeof(Blob.prototype.slice) == 'undefined' && typeof(Blob.prototype.webkitSlice) != 'undefined')
+ Blob.prototype.slice = Blob.prototype.webkitSlice;
+
var moovAtom;
function onFileSelect(e) {
var file = e.target.files[0];
else
checkForMoovAtom(offset + basicAtom.size);
};
- var subset = file.webkitSlice(offset, offset + 16);
+ var subset = file.slice(offset, offset + 16);
reader.readAsArrayBuffer(subset);
};
var output = document.getElementById('output');
output.appendChild(toDOMNode(moovAtom));
};
- var subset = file.webkitSlice(offset, offset + length);
+ var subset = file.slice(offset, offset + length);
reader.readAsArrayBuffer(subset);
};
continue;
var div = document.createElement('div');
var dt = document.createElement('dt');
- dt.innerText = property;
+ dt.appendChild(document.createTextNode(property));
var dd = document.createElement('dd');
dd.appendChild(toDOMRepresentation(value));
div.appendChild(dt);