horance opened a new issue, #1580:
URL: https://github.com/apache/cordova-ios/issues/1580
# Bug Report
## Problem
When checking
```javascript
document.readystate
```
in CDVHandleOpenURL.m will not get correct result due to wrong property
name. Correct property name is
```javascript
document.readyState
```
code source:
CDVHandleOpenURL.m:
```objective-c
if (!pageLoaded) {
NSString* jsString = @"document.readystate";
[self.webViewEngine evaluateJavaScript:jsString
completionHandler:^(id object, NSError* error) {
if ((error == nil) && [object isKindOfClass:[NSString class]]) {
NSString* readyState = (NSString*)object;
BOOL ready = [readyState isEqualToString:@"loaded"] ||
[readyState isEqualToString:@"complete"];
if (ready) {
handleOpenUrl();
} else {
self.url = url;
}
}
}];
} else {
handleOpenUrl();
}
```
### What is expected to happen?
The variable NSString* readyState should reflect document.readyState
correctly.
### What does actually happen?
The variable NSString* readyState is always "(null)" .
## Checklist
<!-- Please check the boxes by putting an x in the [ ] like so: [x] -->
- [x] I searched for existing GitHub issues
- [x] I updated all Cordova tooling to most recent version
- [x] I included all the necessary information above
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]