Skip to content

Commit c7b8f8c

Browse files
committed
update
1 parent a96a598 commit c7b8f8c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

dsbridge/DWKWebView.m

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,7 @@ - (void) evalJavascript:(int) delay{
247247
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(delay * NSEC_PER_MSEC)), dispatch_get_main_queue(), ^{
248248
@synchronized(self){
249249
if([jsCache length]!=0){
250+
NSLog(@"evalJavaScript:%@",jsCache);
250251
[self evaluateJavaScript :jsCache completionHandler:nil];
251252
isPending=false;
252253
jsCache=@"";
@@ -300,9 +301,9 @@ -(NSString *)call:(NSString*) method :(NSString*) argStr
300301
{
301302
UInt64 t=[[NSDate date] timeIntervalSince1970]*1000;
302303
jsCache=[jsCache stringByAppendingString:js];
303-
if(t-lastCallTime<1000){
304+
if(t-lastCallTime<50){
304305
if(!isPending){
305-
[strongSelf evalJavascript:1000];
306+
[strongSelf evalJavascript:50];
306307
isPending=true;
307308
}
308309
}else{

0 commit comments

Comments
 (0)