[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    Re: KJS Problem
From:       Mario Weilguni <mweilguni () sime ! com>
Date:       2000-11-02 11:17:53
[Download RAW message or body]

-----BEGIN PGP SIGNED MESSAGE-----

Am Donnerstag,  2. November 2000 12:14 schrieb Harri Porten:
> Mario Weilguni wrote:
> > In kjs_window.cpp, around line 370 there is code for the javascript
> > window.open() calls.
> >
> >     KParts::URLArgs uargs;
> >     uargs.frameName = args[1].toString().value().qstring();
> >     uargs.serviceType = "text/html";
> >
> >     // request new window
> >     KParts::ReadOnlyPart *newPart = 0L;
> >     emit part->browserExtension()->createNewWindow(url, uargs,
> >                                                    winargs,newPart);
> >     if (newPart && newPart->inherits("KHTMLPart")) {
> >         Window *win = newWindow(static_cast<KHTMLPart*>(newPart));
> >         win->opener = part;
> >         result = win;
> >     } else
> >         result = Undefined();
> >
> > This implies that every new window must be of type "text/html", which
> > often is not the case (zooming of pictures mostly). As far as I found out
> > so far
>
> Hmmm. We assumed html only since I hadn't seen any other types addressed
> via JS yet.
>
> > is
> > that the part must be constructed sync. because there is a result pointer
> > newPart.
>
> Exactly. Since we need a "pointer" for the script we need to wait until
> the successfull creation. The way konqueror handles other mime types
> will make this more difficult IIRC. Simon ? David ? Our beloved topic is
> back again.
>
> Do you have any real life example code ?

Sure, check this:
http://sport.orf.at/orfon/sport/001023-16784/16786bigstory_txt.html
click on the image to enlarge it and you'll get the raw binary data, not an 
image.

Ciao,
	Mario

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.3 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iQCVAwUBOgFNYQotfkegMgnVAQHnKAP/a8uIhiAkDtyk3L4Sy2lHSJjCwfLGYzZE
EOVXdOylPY0yc69xW0300HtdZ9exZASg77safw1EveFVFjGdLulTKvVmYe1vq72E
VSaIfJmdpvrrQXZN6yQlmpfQoy2+OQj0yXkR4hbEN+dtsPix85sGGoWGfys1cu39
RuPlbVuqOz4=
=Hx4G
-----END PGP SIGNATURE-----

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic