OLD | NEW |
(Empty) | |
| 1 /* |
| 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. |
| 3 * |
| 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions |
| 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the |
| 11 * documentation and/or other materials provided with the distribution. |
| 12 * |
| 13 * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY |
| 14 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
| 15 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR |
| 16 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR |
| 17 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, |
| 18 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, |
| 19 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR |
| 20 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY |
| 21 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 24 * |
| 25 */ |
| 26 |
| 27 module threads { |
| 28 |
| 29 interface [ |
| 30 Conditional=WORKERS, |
| 31 JSCustomMarkFunction, |
| 32 JSCustomGetOwnPropertySlotAndDescriptor, |
| 33 EventTarget, |
| 34 ExtendsDOMGlobalObject, |
| 35 IsWorkerContext, |
| 36 JSLegacyParent=JSWorkerContextBase, |
| 37 JSNoStaticTables, |
| 38 OmitConstructor, |
| 39 V8CustomToJSObject |
| 40 ] WorkerContext { |
| 41 |
| 42 // WorkerGlobalScope |
| 43 #if defined(LANGUAGE_JAVASCRIPT) && LANGUAGE_JAVASCRIPT |
| 44 attribute [Replaceable] WorkerContext self; |
| 45 #endif |
| 46 attribute [Replaceable] WorkerLocation location; |
| 47 void close(); |
| 48 attribute EventListener onerror; |
| 49 |
| 50 // WorkerUtils |
| 51 [Custom] void importScripts(/*[Variadic] in DOMString urls */); |
| 52 attribute [Replaceable] WorkerNavigator navigator; |
| 53 |
| 54 // Timers |
| 55 [Custom] long setTimeout(in TimeoutHandler handler, in long timeout); |
| 56 // [Custom] long setTimeout(in DOMString code, in long timeout); |
| 57 void clearTimeout(in [Optional=DefaultIsUndefined] long handle); |
| 58 [Custom] long setInterval(in TimeoutHandler handler, in long timeout); |
| 59 // [Custom] long setInterval(in DOMString code, in long timeout); |
| 60 void clearInterval(in [Optional=DefaultIsUndefined] long handle); |
| 61 |
| 62 |
| 63 // EventTarget interface |
| 64 void addEventListener(in DOMString type, |
| 65 in EventListener listener, |
| 66 in [Optional] boolean useCapture); |
| 67 void removeEventListener(in DOMString type, |
| 68 in EventListener listener, |
| 69 in [Optional] boolean useCapture); |
| 70 boolean dispatchEvent(in Event evt) |
| 71 raises(EventException); |
| 72 |
| 73 #if !defined(LANGUAGE_CPP) || !LANGUAGE_CPP |
| 74 // Constructors |
| 75 attribute MessageEventConstructor MessageEvent; |
| 76 attribute WorkerLocationConstructor WorkerLocation; |
| 77 |
| 78 #if ENABLE_CHANNEL_MESSAGING |
| 79 attribute [JSCustomGetter] MessageChannelConstructor MessageChannel; |
| 80 #endif |
| 81 attribute [JSCustomGetter] EventSourceConstructor EventSource; |
| 82 attribute [JSCustomGetter] XMLHttpRequestConstructor XMLHttpRequest; |
| 83 #endif |
| 84 |
| 85 #if defined(ENABLE_BLOB) && ENABLE_BLOB |
| 86 attribute WebKitBlobBuilderConstructor WebKitBlobBuilder; |
| 87 attribute FileReaderConstructor FileReader; |
| 88 attribute FileReaderSyncConstructor FileReaderSync; |
| 89 #endif |
| 90 |
| 91 attribute [Conditional=BLOB] DOMURLConstructor webkitURL; |
| 92 |
| 93 attribute ArrayBufferConstructor ArrayBuffer; // Usable with new operato
r |
| 94 attribute Int8ArrayConstructor Int8Array; // Usable with new operator |
| 95 attribute Uint8ArrayConstructor Uint8Array; // Usable with new operator |
| 96 attribute Uint8ArrayConstructor Uint8ClampedArray; // Usable with new op
erator |
| 97 attribute Int16ArrayConstructor Int16Array; // Usable with new operator |
| 98 attribute Uint16ArrayConstructor Uint16Array; // Usable with new operato
r |
| 99 attribute Int32ArrayConstructor Int32Array; // Usable with new operator |
| 100 attribute Uint32ArrayConstructor Uint32Array; // Usable with new operato
r |
| 101 attribute Float32ArrayConstructor Float32Array; // Usable with new opera
tor |
| 102 attribute Float64ArrayConstructor Float64Array; // Usable with new opera
tor |
| 103 attribute DataViewConstructor DataView; // Usable with new operator |
| 104 }; |
| 105 |
| 106 } |
OLD | NEW |