-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
feat(ios): expose new iOS 14 APIs in Ti.UI.WebView #11834
Changes from all commits
4016622
ee68717
24c6be8
19656c0
a277c5e
6fb29d3
19f236d
be5a2ab
6a0896b
406da87
f803de3
f0d3000
3db436c
20e1776
09f2935
7288e78
be216bf
59347eb
26467be
58e1fb6
e041b6a
a80e6e9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -432,6 +432,48 @@ methods: | |||||
returns: | ||||||
type: BackForwardList | ||||||
|
||||||
- name: createPDF | ||||||
summary: | | ||||||
Create a PDF document representation from the web page currently displayed in the WebView. | ||||||
description: | | ||||||
If the data is written to a file the resulting file is a valid PDF document. | ||||||
platforms: [iphone, ipad] | ||||||
since: "9.2.0" | ||||||
osver: {ios: {min: "14.0"}} | ||||||
parameters: | ||||||
- name: callback | ||||||
summary: Function to call upon pdf creation. | ||||||
type: Callback<DataCreationResult> | ||||||
|
||||||
- name: createWebArchive | ||||||
summary: Create WebKit web archive data representing the current web content of the WebView. | ||||||
description: | | ||||||
WebKit web archive data represents a snapshot of web content. It can be loaded into a WebView directly, | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's unclear to me from the apple docs or looking at our code exactly how this would be used to load into a web view. Presumably we can save this to a file, great - but how do we then load the file or blob and set it in a web view later? Can we simply provide the |
||||||
and saved to a file for later use. | ||||||
platforms: [iphone, ipad] | ||||||
since: "9.2.0" | ||||||
osver: {ios: {min: "14.0"}} | ||||||
parameters: | ||||||
- name: callback | ||||||
summary: Function to call upon web archive creation. | ||||||
type: Callback<DataCreationResult> | ||||||
|
||||||
- name: findString | ||||||
summary: Searches the page contents for the given string. | ||||||
platforms: [iphone, ipad] | ||||||
since: "9.2.0" | ||||||
osver: {ios: {min: "14.0"}} | ||||||
parameters: | ||||||
- name: searchString | ||||||
summary: The string to search for. | ||||||
type: String | ||||||
- name: options | ||||||
summary: Options for search. | ||||||
type: StringSearchOptions | ||||||
optional: true | ||||||
- name: callback | ||||||
summary: Function to call upon search finished. | ||||||
type: Callback<SearchResult> | ||||||
events: | ||||||
- name: beforeload | ||||||
summary: Fired before the web view starts loading its content. | ||||||
|
@@ -1114,6 +1156,67 @@ properties: | |||||
description: May be undefined. | ||||||
type: String | ||||||
|
||||||
--- | ||||||
name: DataCreationResult | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Extend May make more sense to align this consistently, though, by doing so. |
||||||
summary: The parameter passed to the <Titanium.UI.WebView.createPDF> or <Titanium.UI.WebView.createWebArchive>callback. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
platforms: [iphone, ipad] | ||||||
since: "9.2.0" | ||||||
properties: | ||||||
- name: data | ||||||
summary: The created data. | ||||||
type: Titanium.Blob | ||||||
- name: success | ||||||
summary: Indicates if the data creation successful or not. | ||||||
description: Returns `true` on successful creation, otherwise `false`. | ||||||
type: Boolean | ||||||
- name: error | ||||||
summary: Error message, if any returned. | ||||||
description: May be undefined. | ||||||
type: String | ||||||
|
||||||
--- | ||||||
name: SearchResult | ||||||
summary: The parameter passed to the <Titanium.UI.WebView.findString>. | ||||||
platforms: [iphone, ipad] | ||||||
since: "9.2.0" | ||||||
properties: | ||||||
- name: success | ||||||
summary: Indicates if string found or not. | ||||||
description: Returns `true` if found, otherwise `false`. | ||||||
type: Boolean | ||||||
- name: error | ||||||
summary: Error message, if any returned. | ||||||
description: May be undefined. | ||||||
type: String | ||||||
|
||||||
--- | ||||||
name: StringSearchOptions | ||||||
summary: | | ||||||
The optional options to pass to the <Titanium.UI.WebView.findString>. Pass a | ||||||
dictionary with one or more of the following string-keys: | ||||||
* `caseSensitive` (Boolean value) | ||||||
* `backward` (Boolean value) | ||||||
* `wraps` (Boolean value) | ||||||
properties: | ||||||
- name: caseSensitive | ||||||
summary: Whether or not the search should be case sensitive. | ||||||
type: Boolean | ||||||
default: false | ||||||
optional: true | ||||||
|
||||||
- name: backward | ||||||
type: Boolean | ||||||
summary: | | ||||||
The direction to search from the current selection. The search will respect the writing direction of the document | ||||||
default: false | ||||||
optional: true | ||||||
|
||||||
- name: wraps | ||||||
summary: Whether the search should start at the beginning of the document once it reaches the end. | ||||||
type: Boolean | ||||||
default: true | ||||||
optional: true | ||||||
|
||||||
--- | ||||||
name: BackForwardList | ||||||
summary: The object returned to the <Titanium.UI.WebView.backForwardList> method. | ||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We may want to include an example in the docs showing how to call this method and then write the blob to a file in the callback.