Changeset 13610 in webkit for trunk/JavaScriptCore/bindings/objc/WebScriptObject.h
- Timestamp:
- Mar 31, 2006, 10:02:13 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/bindings/objc/WebScriptObject.h
r12069 r13610 1 1 /* 2 Copyright (C) 2004 Apple Computer, Inc. All rights reserved.3 2 Copyright (C) 2004, 2006 Apple Computer, Inc. All rights reserved. 3 4 4 Public header file. 5 5 */ … … 16 16 17 17 Instances automatically reflect their interfaces in the scripting environment. This 18 automatic reflection can be overrid en using the class methods defined in the WebScripting18 automatic reflection can be overridden using the class methods defined in the WebScripting 19 19 informal protocol. 20 20 … … 42 42 43 43 Not all methods are exposed. Only those methods whose parameters and return 44 type meets the export criteria will exposed. Valid types are Objective C instances44 type meets the export criteria will exposed. Valid types are Objective-C instances 45 45 and scalars. Other types are not allowed. Classes may further exclude method 46 46 that they do not want to expose. 47 47 48 48 Types will be converted to appropriate types in the scripting environment. 49 After any KVC coercion occurs the Objective C types will converted to a type49 After any KVC coercion occurs the Objective-C types will converted to a type 50 50 appropriate for the script environment. For JavaScript NSNumber will be 51 51 converted to numbers. NSString will be converted to strings. NSArray will … … 53 53 WebUndefined will be converted to undefined. WebScriptObjects will be unwrapped. 54 54 Instances of other classes will be wrapped when passed to the script environment 55 and unwrapped when returned to Objective C. Similar conversion happens in the55 and unwrapped when returned to Objective-C. Similar conversion happens in the 56 56 other direction. 57 57 */ … … 66 66 method is not implemented the default name for the selector will 67 67 be used. The default name concatenates the components of the 68 Objective C selector name and replaces ':' with '_'. '_' characters68 Objective-C selector name and replaces ':' with '_'. '_' characters 69 69 are escaped with an additional '$', i.e. '_' becomes "$_". '$' are 70 70 also escaped, i.e. 71 Objective C nameDefault script name71 Objective-C name Default script name 72 72 moveTo:: move__ 73 73 moveTo_ moveTo$_ 74 74 moveTo$_ moveTo$$$_ 75 @result Returns the name to be used to represent the specifi ced selector in the75 @result Returns the name to be used to represent the specified selector in the 76 76 scripting environment. 77 77 */ … … 83 83 @discussion Return YES to prevent the selector appearing in the script 84 84 environment. Return NO to expose the selector in the script environment. 85 If this method is not implemented on the class all the selector that match 86 the export criteria will be exposed. 85 If this method is not implemented on the class no selectors will be exposed. 87 86 @result Returns YES to hide the selector, NO to expose the selector. 88 87 */ … … 92 91 @method webScriptNameForKey: 93 92 @param name The name of the instance variable that will be exposed to the 94 script enviro ment. Only that properties that meet the export criteria will93 script environment. Only that properties that meet the export criteria will 95 94 be exposed. 96 95 @discussion Provide an alternate name for a property. 97 @result Returns the name to be used to represent the specifi ced property in the96 @result Returns the name to be used to represent the specified property in the 98 97 scripting environment. 99 98 */ … … 103 102 @method isKeyExcludedFromWebScript: 104 103 @param name The name of the instance variable that will be exposed to the 105 scrip environment.106 @discussion Return YES to exclude the property from visibility in the script environ ement.107 Return NO to expose the instance vari ble to the script environment.104 script environment. 105 @discussion Return YES to exclude the property from visibility in the script environment. 106 Return NO to expose the instance variable to the script environment. 108 107 @result Returns YES to hide the property, NO to expose the property. 109 108 */ … … 149 148 @class WebScriptObject 150 149 @discussion WebScriptObjects are used to wrap script objects passed from 151 script environments to Objective C. WebScriptObjects cannot be created150 script environments to Objective-C. WebScriptObjects cannot be created 152 151 directly. In normal uses of WebKit, you gain access to the script 153 152 environment using the "windowScriptObject" method on WebView.
Note:
See TracChangeset
for help on using the changeset viewer.