LiveConnect and Ekit?
Koos Vriezen
koos.vriezen at xs4all.nl
Wed Aug 6 16:51:30 BST 2003
On Wed, 6 Aug 2003, Mark Jaroski wrote:
> Koos Vriezen wrote:
> > That all depends on what you want. What is it? Please add a small testcase
> > (eg. simple html page with some javascript) that illustrates your problem.
>
> Sorry, I should have included this link in the first place:
>
> http://www.hexidec.com/ekitdemo.php
>
> On the page above the button calls this JavaScript function:
>
> function copyText()
> {
> document.EkitDemoForm.TextViewer.value
> = document.EkitDemoForm.Ekit.getDocumentText();
> }
>
>
> This appears to work with Netscape and IE, but not sadly
> with Konqueror.
Problem is not liveconnect but 'document.EkitDemoForm.Ekit'. This doesn't
evaluate to the applet. Only recently I fixed 'document.Ekit' shortcut for
>= kde-3.1.3. To make this work in konqueror, you have to use
'window.Ekit' (or just 'Ekit') or 'document.applets.Ekit' or
'document.applets[0]'.
For other khtml developers, there is something wierd with this applet in
HEAD. One thing is java related (another race in destroyApplet which I
want to look at tonight). But the other is something with the rendering.
The applet is created, immediately destroyed and then re-created again. If
I do a call on the applet, like
dcop konqueror-19038 html-widget11 evalJS '""+Ekit'
it even crashes (probably a call to the first applet)
#3 <signal handler called>
#4 0x4051e76d in DOM::HTMLObjectBaseElementImpl::call(unsigned long,
QString const&, QStringList const&, KParts::LiveConnectExtension::Type&,
unsigned long&, QString&) () from /data2/usr/local/kde3/lib/libkhtml.so.4
#5 0x405b5403 in KJS::HTMLElement::toString(KJS::ExecState*) const ()
from /data2/usr/local/kde3/lib/libkhtml.so.4
#6 0x40595b18 in KJS::DOMNode::toPrimitive(KJS::ExecState*, KJS::Type)
const
() from /data2/usr/local/kde3/lib/libkhtml.so.4
#7 0x44018ec7 in KJS::ValueImp::dispatchToPrimitive(KJS::ExecState*,
KJS::Type) const () from /data2/usr/local/kde3/lib/libkjs.so.1
> > The applet has a couple of other public methods that I'm
> interested in accessing as well, namely getDocumentBody()
> and setDocumentText(). I'm thinking that the above should
> suffice for an example, but of course if you need more I'll
> be happy to set some stuff up for you at another adress.
This should all work afaik.
Koos
>
> Thanks for the quick response, and for all of the work that
> you've been doing on Konqueror.
>
> -Mark
>
>
> --
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Mark Jaroski
> Room E 257
> World Health Organization
> Geneva, Switzerland
> +41 22 791 12 63
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
More information about the kfm-devel
mailing list