Bug 99528

Summary: [WebKit2] Create Objective-C API for adding and removing user scripts
Product: WebKit Reporter: Andy Estes <aestes>
Component: New BugsAssignee: Andy Estes <aestes>
Status: RESOLVED FIXED    
Severity: Normal    
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch andersca: review+

Andy Estes
Reported 2012-10-16 17:22:33 PDT
[WebKit2] Create Objective-C API for adding and removing user scripts
Attachments
Patch (15.65 KB, patch)
2012-10-16 17:28 PDT, Andy Estes
andersca: review+
Andy Estes
Comment 1 2012-10-16 17:28:11 PDT
Anders Carlsson
Comment 2 2012-10-16 17:44:21 PDT
Comment on attachment 169064 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=169064&action=review > Source/WebKit2/UIProcess/API/mac/WKBrowsingContextGroup.mm:125 > +- (void)addUserScript:(NSString *)source baseURL:(NSURL *)baseURL whitelist:(NSArray *)whitelist blacklist:(NSArray *)blacklist injectionTime:(WKUserScriptInjectionTime)injectionTime mainFrameOnly:(BOOL)mainFrameOnly I think we should use more descriptive names for the whitelist and blacklist. How about whitelistedURLPatterns and blacklistedURLPatterns. > Source/WebKit2/UIProcess/API/mac/WKBrowsingContextGroup.mm:128 > + if (!source) > + return; I think it's an error for source to be null, so we should not return early in that case. Ideally we'd throw an invalid argument exception but crashing is fine for now.
Andy Estes
Comment 3 2012-10-16 19:00:37 PDT
Note You need to log in before you can comment on or make changes to this bug.