Expected
webView returns
true
if loading,
false
if not.
Actual
webView always returns null
Testcase
Click around on some links and see that it only reports
<null>
in Studio.
var win = Ti.UI.createWindow();
var webView = Ti.UI.createWebView({
url: 'http://appcelerator.com'
});
setInterval(function() {
Ti.API.log( webView.loading );
}, 500);
webView.addEventListener('beforeload', function() {
Ti.API.log( webView.loading );
});
webView.addEventListener('load', function() {
Ti.API.log( webView.loading );
});
win.add( webView );
win.open();
bump
issue reproduces Tested with Titanium Studio, build: 3.0.1.201212181159 Titanium SDK version: 3.1.0 iOS iPhone Simulator: iOS SDK version: 6.0
PR (master): https://github.com/appcelerator/titanium_mobile/pull/8523 PR (unit-test): https://github.com/appcelerator/titanium-mobile-mocha-suite/pull/5 There was an unexposed and unused "isLoading" method in the view. I changed it to match the property and exposed it to the proxy. Test-case:
Using the following environment: Node Version: 4.5.0 Mac OS: 10.12.1 Appc CLI: 6.0.0 Appc CLI NPM: 4.2.8 Titanium SDK version: 6.1.0.v20161116071014 Appcelerator Studio, build: 4.8.0.201611121409 Xcode 8.1 GM I was able to reproduce the issue with SDK 6.0.0. I created an app using the demo code in the description, and saw that the log messages was showing "null" every 500ms. I tried this on both Simulator and Device. I then tried the code with SDK version 6.1.0.v20161116071014, and found that messages on the console were showing either 0 or 1 (as expected); no "null" outputs were seen. This was tried on Device iOS 10.1.1 and Simulator iOS 10.1.