[WebKit2] Create Objective-C API for adding and removing user scripts
Created attachment 169064 [details] Patch
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.
Committed r131544: <http://trac.webkit.org/changeset/131544>