Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
1887867
JS port: let Display.execute navigate the current page instead of pro…
shai-almog Jul 28, 2026
165d448
JS port: queue the confirmed _blank open on the backside hook
shai-almog Jul 28, 2026
69d6f0b
JS port: degrade properly when the page-side open cannot run
shai-almog Jul 28, 2026
1e168e2
JS port: classify any URI scheme as external, not a fixed list
shai-almog Jul 28, 2026
84c0423
JS port: name the URL shortening thresholds, log a failed confirmed open
shai-almog Jul 28, 2026
e7f9610
JS port: don't treat the polling interval as popup authorization
shai-almog Jul 28, 2026
6d04d98
JS port: accept single character URI schemes
shai-almog Jul 28, 2026
2f64061
JS port: document the data: branch ordering dependency in execute()
shai-almog Jul 28, 2026
4689ddb
JS port: locale-safe scheme compare, documented targets only, drop furl
shai-almog Jul 28, 2026
b23be46
JS port: show the real host in the confirmation Sheet, and four revie…
shai-almog Jul 28, 2026
3621f63
JS port: parse protocol-relative authorities, confirm failed local opens
shai-almog Jul 28, 2026
bc17454
JS port: parse slashless special-scheme authorities, one popup per ge…
shai-almog Jul 28, 2026
57ea440
JS port: hold the popup reservation until the gesture's drains all ex…
shai-almog Jul 28, 2026
1498312
JS port: reattach isExternalUrl's javadoc, stop double-logging open f…
shai-almog Jul 28, 2026
7d0514f
JS port: reserve popups per interaction, stop the authority at a back…
shai-almog Jul 28, 2026
3dafacf
JS port: normalize extra authority separators, confirm a blocked rese…
shai-almog Jul 28, 2026
2939d63
JS port: normalize the URL once at entry, sever window.opener
shai-almog Jul 28, 2026
3b14d31
JS port: normalize only what the browser parses
shai-almog Jul 28, 2026
bd68b0b
JS port: give existing storage entries precedence over scheme classif…
shai-almog Jul 28, 2026
4e5435a
JS port: make execute(null) a logged no-op rather than an NPE
shai-almog Jul 28, 2026
0abe698
JS port: keep activation-dependent hooks off the polling drain
shai-almog Jul 28, 2026
5f4868e
JS port: decide storage precedence by URL shape, not by scheme name
shai-almog Jul 28, 2026
d7a25a5
JS port: run each gesture-only hook from its own gesture's drain
shai-almog Jul 28, 2026
5ee147e
JS port: guarantee a matching drain exists for a gesture-only hook
shai-almog Jul 28, 2026
c322228
JS port: judge the storage gate on the raw string, offer a tab when b…
shai-almog Jul 28, 2026
4dd6d45
JS port: fire the registered handler for data: URL downloads
shai-almog Jul 28, 2026
8ac5e7b
JS port: keep the data: payload raw, rename the download flag
shai-almog Jul 28, 2026
fcb1130
JS port: never let a stale queued open spend a newer gesture's activa…
shai-almog Jul 28, 2026
8d0930d
JS port: keep data: URLs out of the storage lookup
shai-almog Jul 28, 2026
444337e
JS port: say so when no page-side channel exists, rather than asking
shai-almog Jul 28, 2026
de755a4
JS port: recognize backslash forms of a scheme-relative authority
shai-almog Jul 28, 2026
03b9b2d
JS port: consult storage for every shape, and stop guessing which can…
shai-almog Jul 28, 2026
9df1023
JS port: guard every confirmation path against a missing page-side ch…
shai-almog Jul 28, 2026
3f6fa2f
JS port: hand aged-out gesture hooks to their fallback
shai-almog Jul 28, 2026
f35eab2
JS port: do not fire a data: download that registration already perfo…
shai-almog Jul 28, 2026
57ec987
JS port: own the data: download instead of firing the bridge's stash
shai-almog Jul 28, 2026
e31a617
JS port: make sure a confirmed data: download has a drain to run on
shai-almog Jul 28, 2026
68fa4db
JS port: treat a press and its release as one gesture generation
shai-almog Jul 28, 2026
d63cc66
JS port: do not let a self-scheduled drain claim a user gesture
shai-almog Jul 28, 2026
31f75bb
JS port: one generation per keystroke, and page-side scripts in funct…
shai-almog Jul 28, 2026
49a35da
JS port: resolve same-scheme slashless URLs against the page, not as …
shai-almog Jul 28, 2026
910f704
JS port: let a separator pair outrank the same-scheme relative rule
shai-almog Jul 28, 2026
0f182f3
JS port: match the browser's host resolution across a 1689-shape corpus
shai-almog Jul 28, 2026
1c182f8
JS port: send the data: payload as structured data, not as eval source
shai-almog Jul 28, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CodenameOne/src/com/codename1/ui/CN.java
Original file line number Diff line number Diff line change
Expand Up @@ -664,6 +664,11 @@ public static Boolean canExecute(String url) {
/// }
/// ```
///
/// On the JavaScript port this can open a new tab, navigate the current page
/// or show a confirmation `Sheet`, depending on the
/// `javascript.execute.target` property. See [Display#execute(String)] for
/// the details.
Comment thread
shai-almog marked this conversation as resolved.
Comment thread
shai-almog marked this conversation as resolved.
Comment thread
shai-almog marked this conversation as resolved.
Comment thread
shai-almog marked this conversation as resolved.
Comment thread
shai-almog marked this conversation as resolved.
Comment thread
shai-almog marked this conversation as resolved.
///
/// #### Parameters
///
/// - `url`: the url to execute
Expand Down
29 changes: 29 additions & 0 deletions CodenameOne/src/com/codename1/ui/Display.java
Original file line number Diff line number Diff line change
Expand Up @@ -4082,6 +4082,35 @@ public Boolean canExecute(String url) {
/// `simulator-hooks.properties` format and the positional `itemN` / `labelN`
/// conventions.
///
/// #### JavaScript port
///
/// Browsers only let a page open a new window/tab from inside a live user
/// gesture, and Codename One dispatches events on its own EDT so by the time
/// your listener calls this method the browser no longer considers a gesture
/// to be in progress. The JavaScript port therefore resolves the
/// `javascript.execute.target` property to decide what to do:
///
/// - `auto` (the default) opens a new tab when the page still has user
/// activation and otherwise navigates the page the app is running in. No
/// confirmation prompt is ever shown, but note that navigating the current
/// page unloads the app.
/// - `_blank` only ever opens a new tab. When the browser would block it the
/// port shows a confirmation `Sheet` whose OK button supplies the missing
/// gesture. This was the behavior before the property existed.
/// - `_self` always navigates the page the app is running in.
///
/// Set it before the call, for example in your `init` method:
///
/// ```java
/// Display.getInstance().setProperty("javascript.execute.target", "_self");
/// ```
///
/// The property applies to any URL carrying a URI scheme the browser can
/// hand off, custom deep links like the `imdb:///find` example above
/// included. It is ignored on every other platform, and on all targets a
/// `javascript:` URL, a `data:` URL, a `file:` URL or a path into local
/// storage keeps its existing meaning.
///
/// #### Parameters
///
/// - `url`: the url to execute
Expand Down
Loading
Loading