OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007 Apple Inc. All rights reserved. |
3 * Copyright (C) 2008 Kelvin W Sherlock (ksherlock@gmail.com) | 3 * Copyright (C) 2008 Kelvin W Sherlock (ksherlock@gmail.com) |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 423 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
434 @function | 434 @function |
435 @abstract Creates a JavaScript Array object. | 435 @abstract Creates a JavaScript Array object. |
436 @param ctx The execution context to use. | 436 @param ctx The execution context to use. |
437 @param argumentCount An integer count of the number of arguments in arguments. | 437 @param argumentCount An integer count of the number of arguments in arguments. |
438 @param arguments A JSValue array of data to populate the Array with. Pass NULL
if argumentCount is 0. | 438 @param arguments A JSValue array of data to populate the Array with. Pass NULL
if argumentCount is 0. |
439 @param exception A pointer to a JSValueRef in which to store an exception, if a
ny. Pass NULL if you do not care to store an exception. | 439 @param exception A pointer to a JSValueRef in which to store an exception, if a
ny. Pass NULL if you do not care to store an exception. |
440 @result A JSObject that is an Array. | 440 @result A JSObject that is an Array. |
441 @discussion The behavior of this function does not exactly match the behavior o
f the built-in Array constructor. Specifically, if one argument | 441 @discussion The behavior of this function does not exactly match the behavior o
f the built-in Array constructor. Specifically, if one argument |
442 is supplied, this function returns an array with one element. | 442 is supplied, this function returns an array with one element. |
443 */ | 443 */ |
444 JS_EXPORT JSObjectRef JSObjectMakeArray(JSContextRef ctx, size_t argumentCount,
const JSValueRef arguments[], JSValueRef* exception) AVAILABLE_AFTER_WEBKIT_VERS
ION_3_1; | 444 JS_EXPORT JSObjectRef JSObjectMakeArray(JSContextRef ctx, size_t argumentCount,
const JSValueRef arguments[], JSValueRef* exception) AVAILABLE_IN_WEBKIT_VERSION
_4_0; |
445 | 445 |
446 /*! | 446 /*! |
447 @function | 447 @function |
448 @abstract Creates a JavaScript Date object, as if by invoking the built-in Date
constructor. | 448 @abstract Creates a JavaScript Date object, as if by invoking the built-in Date
constructor. |
449 @param ctx The execution context to use. | 449 @param ctx The execution context to use. |
450 @param argumentCount An integer count of the number of arguments in arguments. | 450 @param argumentCount An integer count of the number of arguments in arguments. |
451 @param arguments A JSValue array of arguments to pass to the Date Constructor.
Pass NULL if argumentCount is 0. | 451 @param arguments A JSValue array of arguments to pass to the Date Constructor.
Pass NULL if argumentCount is 0. |
452 @param exception A pointer to a JSValueRef in which to store an exception, if a
ny. Pass NULL if you do not care to store an exception. | 452 @param exception A pointer to a JSValueRef in which to store an exception, if a
ny. Pass NULL if you do not care to store an exception. |
453 @result A JSObject that is a Date. | 453 @result A JSObject that is a Date. |
454 */ | 454 */ |
455 JS_EXPORT JSObjectRef JSObjectMakeDate(JSContextRef ctx, size_t argumentCount, c
onst JSValueRef arguments[], JSValueRef* exception) AVAILABLE_AFTER_WEBKIT_VERSI
ON_3_1; | 455 JS_EXPORT JSObjectRef JSObjectMakeDate(JSContextRef ctx, size_t argumentCount, c
onst JSValueRef arguments[], JSValueRef* exception) AVAILABLE_IN_WEBKIT_VERSION_
4_0; |
456 | 456 |
457 /*! | 457 /*! |
458 @function | 458 @function |
459 @abstract Creates a JavaScript Error object, as if by invoking the built-in Err
or constructor. | 459 @abstract Creates a JavaScript Error object, as if by invoking the built-in Err
or constructor. |
460 @param ctx The execution context to use. | 460 @param ctx The execution context to use. |
461 @param argumentCount An integer count of the number of arguments in arguments. | 461 @param argumentCount An integer count of the number of arguments in arguments. |
462 @param arguments A JSValue array of arguments to pass to the Error Constructor.
Pass NULL if argumentCount is 0. | 462 @param arguments A JSValue array of arguments to pass to the Error Constructor.
Pass NULL if argumentCount is 0. |
463 @param exception A pointer to a JSValueRef in which to store an exception, if a
ny. Pass NULL if you do not care to store an exception. | 463 @param exception A pointer to a JSValueRef in which to store an exception, if a
ny. Pass NULL if you do not care to store an exception. |
464 @result A JSObject that is a Error. | 464 @result A JSObject that is a Error. |
465 */ | 465 */ |
466 JS_EXPORT JSObjectRef JSObjectMakeError(JSContextRef ctx, size_t argumentCount,
const JSValueRef arguments[], JSValueRef* exception) AVAILABLE_AFTER_WEBKIT_VERS
ION_3_1; | 466 JS_EXPORT JSObjectRef JSObjectMakeError(JSContextRef ctx, size_t argumentCount,
const JSValueRef arguments[], JSValueRef* exception) AVAILABLE_IN_WEBKIT_VERSION
_4_0; |
467 | 467 |
468 /*! | 468 /*! |
469 @function | 469 @function |
470 @abstract Creates a JavaScript RegExp object, as if by invoking the built-in Re
gExp constructor. | 470 @abstract Creates a JavaScript RegExp object, as if by invoking the built-in Re
gExp constructor. |
471 @param ctx The execution context to use. | 471 @param ctx The execution context to use. |
472 @param argumentCount An integer count of the number of arguments in arguments. | 472 @param argumentCount An integer count of the number of arguments in arguments. |
473 @param arguments A JSValue array of arguments to pass to the RegExp Constructor
. Pass NULL if argumentCount is 0. | 473 @param arguments A JSValue array of arguments to pass to the RegExp Constructor
. Pass NULL if argumentCount is 0. |
474 @param exception A pointer to a JSValueRef in which to store an exception, if a
ny. Pass NULL if you do not care to store an exception. | 474 @param exception A pointer to a JSValueRef in which to store an exception, if a
ny. Pass NULL if you do not care to store an exception. |
475 @result A JSObject that is a RegExp. | 475 @result A JSObject that is a RegExp. |
476 */ | 476 */ |
477 JS_EXPORT JSObjectRef JSObjectMakeRegExp(JSContextRef ctx, size_t argumentCount,
const JSValueRef arguments[], JSValueRef* exception) AVAILABLE_AFTER_WEBKIT_VER
SION_3_1; | 477 JS_EXPORT JSObjectRef JSObjectMakeRegExp(JSContextRef ctx, size_t argumentCount,
const JSValueRef arguments[], JSValueRef* exception) AVAILABLE_IN_WEBKIT_VERSIO
N_4_0; |
478 | 478 |
479 /*! | 479 /*! |
480 @function | 480 @function |
481 @abstract Creates a function with a given script as its body. | 481 @abstract Creates a function with a given script as its body. |
482 @param ctx The execution context to use. | 482 @param ctx The execution context to use. |
483 @param name A JSString containing the function's name. This will be used when co
nverting the function to string. Pass NULL to create an anonymous function. | 483 @param name A JSString containing the function's name. This will be used when co
nverting the function to string. Pass NULL to create an anonymous function. |
484 @param parameterCount An integer count of the number of parameter names in param
eterNames. | 484 @param parameterCount An integer count of the number of parameter names in param
eterNames. |
485 @param parameterNames A JSString array containing the names of the function's pa
rameters. Pass NULL if parameterCount is 0. | 485 @param parameterNames A JSString array containing the names of the function's pa
rameters. Pass NULL if parameterCount is 0. |
486 @param body A JSString containing the script to use as the function's body. | 486 @param body A JSString containing the script to use as the function's body. |
487 @param sourceURL A JSString containing a URL for the script's source file. This
is only used when reporting exceptions. Pass NULL if you do not care to include
source file information in exceptions. | 487 @param sourceURL A JSString containing a URL for the script's source file. This
is only used when reporting exceptions. Pass NULL if you do not care to include
source file information in exceptions. |
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
685 @param accumulator The accumulator object to which to add the property name. | 685 @param accumulator The accumulator object to which to add the property name. |
686 @param propertyName The property name to add. | 686 @param propertyName The property name to add. |
687 */ | 687 */ |
688 JS_EXPORT void JSPropertyNameAccumulatorAddName(JSPropertyNameAccumulatorRef acc
umulator, JSStringRef propertyName); | 688 JS_EXPORT void JSPropertyNameAccumulatorAddName(JSPropertyNameAccumulatorRef acc
umulator, JSStringRef propertyName); |
689 | 689 |
690 #ifdef __cplusplus | 690 #ifdef __cplusplus |
691 } | 691 } |
692 #endif | 692 #endif |
693 | 693 |
694 #endif /* JSObjectRef_h */ | 694 #endif /* JSObjectRef_h */ |
OLD | NEW |