mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-03-26 07:04:05 +08:00
[ReactNative] Add RCTBridgeDelegate
Summary: Add a new bridge delegate protocol to allow a more flexible bridge configuration. For now it just support the pre-existent configurations + providing the JavaScript source to the bridge, that should allow pre-loading sources.
This commit is contained in:
@@ -149,7 +149,11 @@ RCT_EXPORT_MODULE()
|
||||
|
||||
- (void)executeApplicationScript:(NSString *)script sourceURL:(NSURL *)URL onComplete:(RCTJavaScriptCompleteBlock)onComplete
|
||||
{
|
||||
NSDictionary *message = @{@"method": @"executeApplicationScript", @"url": [URL absoluteString], @"inject": _injectedObjects};
|
||||
NSDictionary *message = @{
|
||||
@"method": @"executeApplicationScript",
|
||||
@"url": RCTNullIfNil([URL absoluteString]),
|
||||
@"inject": _injectedObjects,
|
||||
};
|
||||
[self sendMessage:message waitForReply:^(NSError *error, NSDictionary *reply) {
|
||||
onComplete(error);
|
||||
}];
|
||||
|
||||
Reference in New Issue
Block a user