haifengkao / YWebView

WKWebview with persistent cookies support
MIT License
104 stars 26 forks source link

Javascript syntax error #3

Closed wainglaister closed 8 years ago

wainglaister commented 8 years ago

This line has an extra [ that shouldn't be there (in the javascript):

[script appendFormat:@"if ([cookieNames.indexOf('%@') == -1) { document.cookie='%@'; };\n", cookie.name, [self javascriptStringWithCookie:cookie]];
haifengkao commented 8 years ago

Fixed. But this code won't be executed anyway unless there is a way to inject cookies properly