Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-8690] iOS: Add a shouldLoad event / callback to WebView

GitHub Issuen/a
TypeNew Feature
PriorityMedium
StatusClosed
ResolutionNeeds more info
Resolution Date2012-04-28T18:31:18.000+0000
Affected Version/sn/a
Fix Version/sRelease 2.1.0, Sprint 2012-09 Core
ComponentsiOS
LabelsSupportTeam, api
ReporterRafael Kellermann Streit
AssigneeMarshall Culpepper
Created2012-04-11T12:02:25.000+0000
Updated2017-03-16T20:40:59.000+0000

Description

Feature Description

Just fire a new event in the UIWebView component when the delegate shouldStartLoadWithRequest was fired. The event will return the URL that the application is trying to open. It's useful to URLs that have redirects.

Comments

  1. Rafael Kellermann Streit 2012-04-11

    I'm seeing that the TiUIWebView.m file has this code line behind the shouldStartLoadWithRequest delegate: if ([self.proxy _hasListeners:@"beforeload"]) { NSDictionary *event = newUrl == nil ? nil : [NSDictionary dictionaryWithObject:[newUrl absoluteString] forKey:@"url"]; [self.proxy fireEvent:@"beforeload" withObject:event]; } It probably will be released with the 2.0 version. So, this TIMOB isn't necessary anymore.
  2. Rafael Kellermann Streit 2012-04-12

    Here is the Pull Request: https://github.com/appcelerator/titanium_mobile/pull/1999
  3. Lee Morris 2017-03-16

    Closing ticket as the information that was requested was never provided.

JSON Source