WebView tabs and URL targets.

90 views
Skip to first unread message

Acr Acro

unread,
Sep 12, 2025, 4:23:31 AM (7 days ago) Sep 12
to DroidScript
Hello. I would like to ask a few things about WebView (in order not to clog the group, I will write several questions at once):
1. Is it possible to implement a tab system for WebView sites somehow, like in regular browsers?
2. Based on the first question, how can I specify that links that should open in a new tab should open in a new tab? (By default, WebView in DroidScript ignores _target in links and opens everything inside itself).
3. How can I enable the standard context menu when I click on links/images (copy, download, open in a new tab, open in the default browser, etc.)

Alan Hendry

unread,
Sep 12, 2025, 1:31:36 PM (7 days ago) Sep 12
to DroidScript
HI,
It's a lot of work if you just want to do what other browsers do.
There's a bunch of posts on this subject
 (I think the topic includes TestBrowser).

From what I recall DS tabs don't allow adding more tabs
(the posts include code for "homemade" tabs),
Webview has an option Usebrowser to open links in a browser,
and there's SetContextMenus and SetOnContextMenus.

If you are Premium then you can use Plugin UI (Hybrid),
It is still being developed/extended
Hybrid allows addTab on tabs
But hybrid webview doesn't have Forward/Back

Regards, ah

Ferhat

unread,
Sep 13, 2025, 2:01:53 AM (6 days ago) Sep 13
to DroidScript
To be honest, it’s not really possible to build a fully functional or advanced browser with DroidScript. I tried it myself in the past. For example:

1) Detecting a long press on an image (context menu),
2) Switching between tabs,
3) Advanced browser features (e.g., download management, advanced history control),

are either very difficult or almost impossible to implement. The WebView provided by DroidScript is quite limited in this regard, so it’s mostly suitable for displaying simple web content without much flexibility.

If your goal is only to create a basic “web content viewer,” it can work. But expecting a fully featured browser with DroidScript is not realistic.

12 Eylül 2025 Cuma tarihinde saat 20:31:36 UTC+3 itibarıyla hendr...@gmail.com şunları yazdı:

Acr Acro

unread,
Sep 13, 2025, 4:43:48 AM (6 days ago) Sep 13
to DroidScript
Thanks very much, I think about it. 

суббота, 13 сентября 2025 г. в 17:01:53 UTC+11, Ferhat:
Reply all
Reply to author
Forward
0 new messages