OLD | NEW |
(Empty) | |
| 1 |
| 2 class _BlobBuilderImpl extends _DOMTypeBase implements BlobBuilder { |
| 3 _BlobBuilderImpl._wrap(ptr) : super._wrap(ptr); |
| 4 |
| 5 void append(var arrayBuffer_OR_blob_OR_value, [String endings = null]) { |
| 6 if (arrayBuffer_OR_blob_OR_value is Blob) { |
| 7 if (endings === null) { |
| 8 _ptr.append(_unwrap(arrayBuffer_OR_blob_OR_value)); |
| 9 return; |
| 10 } |
| 11 } else { |
| 12 if (arrayBuffer_OR_blob_OR_value is ArrayBuffer) { |
| 13 if (endings === null) { |
| 14 _ptr.append(_unwrap(arrayBuffer_OR_blob_OR_value)); |
| 15 return; |
| 16 } |
| 17 } else { |
| 18 if (arrayBuffer_OR_blob_OR_value is String) { |
| 19 if (endings === null) { |
| 20 _ptr.append(_unwrap(arrayBuffer_OR_blob_OR_value)); |
| 21 return; |
| 22 } else { |
| 23 _ptr.append(_unwrap(arrayBuffer_OR_blob_OR_value), _unwrap(endings))
; |
| 24 return; |
| 25 } |
| 26 } |
| 27 } |
| 28 } |
| 29 throw "Incorrect number or type of arguments"; |
| 30 } |
| 31 |
| 32 Blob getBlob([String contentType = null]) { |
| 33 if (contentType === null) { |
| 34 return _wrap(_ptr.getBlob()); |
| 35 } else { |
| 36 return _wrap(_ptr.getBlob(_unwrap(contentType))); |
| 37 } |
| 38 } |
| 39 } |
OLD | NEW |