Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TIMOB-23186] Android: Webview has blacklistedURLs property implemented #7954

Merged
merged 2 commits into from Apr 21, 2016

Conversation

ashcoding
Copy link
Contributor

JIRA: https://jira.appcelerator.org/browse/TIMOB-23186

To test, scroll down to the bottom of the webview and press Terms of Use and Privacy Policy links.
Note that Ti.API.info("load = e.url=" + e.url); is not called for both of the links.

Test code:

var win = Ti.UI.createWindow({
    backgroundColor : 'black',
    layout : 'vertical'
});

var webview = Titanium.UI.createWebView({
    blacklistedURLs : [ 'https://m.wikimediafoundation.org/wiki/Terms_of_Use' , 'https://wikimediafoundation.org/wiki/Privacy_policy' ],
    url : 'https://en.m.wikipedia.org/wiki/Main_Page'
});

webview.addEventListener('load', function(e) {
        // This should not be called for blacklistedUrls
    Ti.API.info("load = e.url=" + e.url);
});

win.add(webview);
win.open();

@hieupham007
Copy link
Contributor

hieupham007 commented Apr 20, 2016

Code reviewed. Looks good. Just a minor doc comment

@@ -290,6 +290,16 @@ methods:
summary: Forces the web view to destroy the iFrame (Mobile Web only).
type: Boolean

- name: blacklistedURLs
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be documented as creationOnly property

@ashcoding
Copy link
Contributor Author

Comment addressed.

@hieupham007 hieupham007 merged commit f57dcc2 into tidev:master Apr 21, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants