mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-01 09:23:16 +08:00
Minor cleanup to make loader unaware of bridge
Summary: The loader should be a utility that stands alone. The bridge uses the loader, not the other way around. Reviewed By: bnham Differential Revision: D3546157 fbshipit-source-id: 91016afb629df1f8c83c8fca6f42649be0b046b0
This commit is contained in:
committed by
Facebook Github Bot 6
parent
c7a590655c
commit
3be8c957b0
@@ -7,10 +7,10 @@
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
*/
|
||||
|
||||
typedef void (^RCTSourceLoadBlock)(NSError *error, NSData *source, int64_t sourceLength);
|
||||
|
||||
@class RCTBridge;
|
||||
|
||||
#import "RCTJavaScriptLoader.h"
|
||||
|
||||
@protocol RCTBridgeDelegate <NSObject>
|
||||
|
||||
/**
|
||||
|
||||
@@ -9,8 +9,6 @@
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
#import "RCTBridgeDelegate.h"
|
||||
|
||||
extern uint32_t const RCTRAMBundleMagicNumber;
|
||||
|
||||
extern NSString *const RCTJavaScriptLoaderErrorDomain;
|
||||
@@ -25,13 +23,8 @@ NS_ENUM(NSInteger) {
|
||||
RCTJavaScriptLoaderErrorCannotBeLoadedSynchronously = 1000,
|
||||
};
|
||||
|
||||
@class RCTBridge;
|
||||
typedef void (^RCTSourceLoadBlock)(NSError *error, NSData *source, int64_t sourceLength);
|
||||
|
||||
/**
|
||||
* Class that allows easy embedding, loading, life-cycle management of a
|
||||
* JavaScript application inside of a native application.
|
||||
* TODO: Incremental module loading. (low pri).
|
||||
*/
|
||||
@interface RCTJavaScriptLoader : NSObject
|
||||
|
||||
+ (void)loadBundleAtURL:(NSURL *)scriptURL onComplete:(RCTSourceLoadBlock)onComplete;
|
||||
|
||||
Reference in New Issue
Block a user