Browsing in Tk: Enticing Firefox into Tk and Tkhtml3

(Printer friendly version)

The next two afternoon talks (Steve Landers and then Dan Kennedy, both very talented programmers from down under) both deal with the marriage of web browsing and Tcl/Tk. I'll report on both of them together.

Entice: Embedding Firefox in Tk

Steve Landers: "I was going to write a language called S but that was already taken. Now L is too."

"Tcl meets Ajax. 100% buzzword compliant."

Embedding browsers in Tk

Possible approaches

  1. Browser library wrapped as a Tcl extension (TkGecko). Pro's: complete, controllable from Tcl. Cons: can't be self-contained. Huge footprint. Difficult to build Gecko.
  2. Tk-based browser (TkHTML). Pro's: 80/20 approach, can be self-contained, easy to control from Tcl. Con's: some situations need the last 20% (that percentage decreasing over time as work on TkHTML3 progresses).
  3. Re-parent browser window into Tk container. Pro's fully featured browser. Cons: not so easy to control from Tcl. Applications aren't self contained.

Entice is built on top of [frame -container], and GPS's TkXext (search for X11 window ID by window title, get a handle, re-parent the window by ID).

Firefox talks back to the entice library on a server socket listening from Tcl. Various security features. Tell firefox to connect back to localhost on Entice's port, and get a custom chrome (.xul). Entice substitutes the listening port into the .xul and sends to Firefox.

Controlling Firefox via XMLHttpRequest. Javascript object running in the browser that waits asyncronously for a connection. Basically a GET operation that is asyncronous. It is at the heart of AJAX.

Thanks to GPS for making it possible (TkXext) and Mike Doyle for sponsoring it.


Tkhtml3

The problem with existing HTML widgets is simple: "Most documents found on the WWW are rendered incorrectly." Lightweight web browsers generally have the same problems (often because CSS is not supported well—if at all).

Although not always possible, Tkhtml3 tries to focus on CSS. Delegates most HTML functionality to the application. More of a CSS renderer than an HTML renderer.

Anticipated uses

HTML can be specified incrementally. .css (zero to many) must be fully prepared.

The document tree: constructed by parsing step, creates a tree. Not DOM compatible (but provides simillar levels of functionality). For the time being only read access to the tree is provided.

Document tree can be queried: for root node, for all nodes that match a specific selector, for whats under a given mouse coordinate.

Tkhtml does not implement hyperlinks(!). Applications are expected to:

This approach makes for maximum flexibility.

Element handlers: parse handlers, script handlers, and node handlers.

To support images the application implements the -imagecmd callback. The callback is given a URI and is expected to return a Tk image.

Tkhtml3 uses images as backgrounds, list markers, and as replaced content.

Replacement objects. Any node in the tree can be mapped to display in another widget in place of a node's content.

Applications can specify regions of text to be tagged.

Hv3: A web browser built using Tkhtml3

Leverages existing Tcl/Tk extensions. [img] allows it to support more image types than any other web browser(!). The tls package for SSL, etc.

Project status

Available at tkhtml.tcl.tk. The shared library on Linux is ~220kb.

—Michael A. Cleverly

Comments

John Cocke: [ mail | www | link ]

Being able to embed something like XUL into Tcl/Tk would be great! It's hard to tell from this web page whether this is possible. (If it is, please provide some details.)

Thanks!!

Thu, 13 Aug 2009, 20:41

ninjadeden: [ mail | www | link ]
nda, para pembaca yang budiman, tidak dapat tertawa)ini ke 17 Pabrik sch 40 Pabrik sch 40 Supplier Plat besi Supplier besi siku undangan pernikahan ala india Pabrik Besi H beam Pabrik Besi Unp Baja Pabrik besi wf Distributor besi beton psi Ulir Polos Distributor besi Pipa sch 80 baja Distributor besi Pipa sch 80 baja Supplier besi h beam Supplier Plat besi plat kapal Pabrik Besi Beton Distributor Besi Cnp Baja Distributor Besi Beton Distributor besi beton perwira Harga besi Pipa sch 80 baja Harga besi Pipa sch 80 baja Supplier besi wf Supplier besi h beam baja undangan pernikahan simple www.sentrabesibaja.com Supplier Besi Cnp Baja Harga Besi Beton Distributor besi beton PAS Jual besi Pipa sch 80 baja Jual besi Pipa sch 80 baja Supplier wiremesh Supplier besi cnp undangan pernikahan bermanfaat Distributor Welded Beam T beam King Queen Cross Castellated Beam Agen Besi Cnp Baja Jual Besi Beton Distributor besi beton master steel ms Supplier besi Pipa sch 80 baja Supplier besi Pipa sch 80 baja Supplier besi unp www.gudangbesibaja.com undangan pernikahan islami Distributor Bondek Cor Toko Besi Cnp Baja Supplier Besi Beton Distributor besi beton ksty Toko besi Pipa sch 80 baja Toko besi Pipa sch 80 baja Supplier besi cnp Pabrik besi Wf Baja undangan pernikahan amplop surat Distributor Atap Spandek Sni Jual Besi Cnp Baja Toko Besi Beton Distributor besi beton krakatau steel Agen besi Pipa sch 80 baja Agen besi Pipa sch 80 baja Supplier besi hollow Pabrik bondek undangan pernikahan bentuk dompet Distributor Plat Bordes Kembang Harga Besi Cnp Baja Agen Besi Beton Distributor besi beton jcac Pabrik besi Pipa sch 80 baja Pabrik besi Pipa sch 80 baja Supplier besi beton Sni Ulir Polos Pabrik wiremesh undangan pernikahan chinese Distributor Plat Besi Hitam Pabrik Besi Cnp Baja

Tue, 27 Nov 2018, 20:41

LinDa: [ mail | www | link ]
That's reall an amazing post. Thanks for letting us know about it. circloo cool math games

Wed, 13 Mar 2019, 22:50

Alisa: [ mail | www | link ]
Thanks for sharing this interesting blog with us awesome tanks 2 cool maths games

Wed, 13 Mar 2019, 22:51

qqq: [ mail | www | link ]
yeezy boost 350 jacksonville jaguars jerseys adidas yeezy coach outlet store online ferragamo outlet christian louboutin outlet kobe 12 kate spade outlet converse uk moncler doudoune pas cher air jordan qqq

Mon, 27 May 2019, 00:21

Call Girls in Gurgaon: [ mail | www | link ]
Call Girls in Gurgaon
Call Girl Gurgaon
Call Girls Gurgaon
Call Girl in Gurgaon
Gurgaon Call Girls
Gurgaon Call Girl
Gurgaon Escort
Gurgaon Escorts
escort in Gurgaon
escorts in Gurgaon
escorts in Gurgaon
Call Girls in Dwarka
Call Girl Dwarka
Call Girls Dwarka
Call Girl in Dwarka
Dwarka Call Girls
Dwarka Call Girl
Dwarka Escort
Dwarka Escorts
escort in dwarka
escorts in dwarka
escorts in dwarka
Call Girls in Gurgaon
Call Girl Gurgaon
Call Girls Gurgaon
Call Girl in Gurgaon
Gurgaon Call Girls
Gurgaon Call Girl
Gurgaon Escort
Gurgaon Escorts
escort in Gurgaon
escorts in Gurgaon
escorts in Gurgaon
Call Girls in sikanderpur gurgaon
Call Girls in sohna road gurgaon
Call Girls in mg road gurgaon
Call Girls in iffco chowk gurgaon
Call Girls in Haridwar
Call Girls in sushant lok
Call Girls in Gurgaon
Call Girls in Dehradun
Call Girls in electronic city
Call Girls in Noida
call girls in mumbai
plumbing company Toronto
plumbing company Mississauga
quickbooks support phone number
plumbing company Toronto

Tue, 24 Dec 2019, 01:14

Whatsapp Status free: [ mail | www | link ]
Whatsapp Status Whatsapp Status Whatsapp Status Whatsapp Status Whatsapp Status Whatsapp Status Whatsapp Status Whatsapp Status Whatsapp Status Whatsapp Status Whatsapp Status Whatsapp Status Whatsapp Status Whatsapp Status Whatsapp Status

Fri, 27 Dec 2019, 08:04

9kMovies: [ mail | www | link ]
9kmovies Download Movies 9kmovies Download Movies 9kmovies Download Movies 9kmovies Download Movies 9kmovies Download Movies 9kmovies Download Movies 9kmovies Download Movies 9kmovies Download Movies 9kmovies Download Movies 9kmovies Download Movies 9kmovies Download Movies 9kmovies Download Movies 9kmovies Download Movies 9kmovies Download Movies 9kmovies Download Movies 9kmovies Download Movies 9kmovies Download Movies 9kmovies Download Movies 9kmovies Download Movies 9kmovies Download Movies 9kmovies Download Movies 9kmovies Download Movies 9kmovies Download Movies 9kmovies Download Movies 9kmovies Download Movies 9kmovies Download Movies 9kmovies Download Movies 9kmovies Download Movies 9kmovies Download Movies 9kmovies Download Movies 9kmovies Download Movies 9kmovies Download Movies 9kmovies Download Movies 9kmovies Download Movies 9kmovies Download Movies 9kmovies Download Movies 9kmovies Download Movies 9kmovies Download Movies 9kmovies Download Movies 9kmovies Download Movies 9kmovies Download Movies 9kmovies Download Movies 9kmovies Download Movies 9kmovies Download Movies 9kmovies Download Movies 9kmovies Download Movies 9kmovies Download Movies 9kmovies Download Movies 9kmovies Download Movies 9kmovies Download Movies 9kmovies Download Movies 9kmovies Download Movies 9kmovies Download Movies 9kmovies Download Movies 9kmovies Download Movies 9kmovies Download Movies 9kmovies Download Movies 9kmovies Download Movies 9kmovies Download Movies 9kmovies Download Movies 9kmovies Download Movies 9kmovies Download Movies 9kmovies Download Movies 9kmovies Download Movies 9kmovies Download Movies 9kmovies Download Movies 9kmovies Download Movies 9kmovies Download Movies 9kmovies Download Movies 9kmovies Download Movies 9kmovies Download Movies 9kmovies Download Movies 9kmovies Download Movies 9kmovies Download Movies 9kmovies Download Movies 9kmovies Download Movies 9kmovies Download Movies 9kmovies Download Movies 9kmovies Download Movies 9kmovies Download Movies 9kmovies Download Movies 9kmovies Download Movies 9kmovies Download Movies 9kmovies Download Movies 9kmovies Download Movies 9kmovies Download Movies 9kmovies Download Movies 9kmovies Download Movies 9kmovies Download Movies 9kmovies Download Movies 9kmovies Download Movies 9kmovies Download Movies 9kmovies Download Movies 9kmovies Download Movies 9kmovies Download Movies 9kmovies Download Movies 9kmovies Download Movies

Wed, 08 Jan 2020, 21:48

Leave a comment

Name:  
Email: (optional)
URL: (optional)

Your comment: