summaryrefslogtreecommitdiffstats
path: root/kjsembed/README
blob: 8c8d6daa9bced327c0b999342c2ad504290fcabc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
WARNING:
-------
This library does not keep source or binary compatibility.  Unless every one
of your users compiles from source and recompiles after upgrading kjsembed,
you should be making a complete copy of this code in your app and using that
instead of the installed version.
-----------------------------------------------------------------------------


A library for embedding the KJS Javascript interpreter in application.

- A tutorial is under development, see http://xmelegance.org/kjsembed/
  or take a look in the docs directory.

- For information on using the library run kdoc over the header files.


Here is an example interactive session with the test application, all
lines beginning with 'kjs>' show the commands typed.

-- Enter a JS expression and press enter --
kjs> 10+20
30
kjs> print("Hello World!")
Hello World!
undefined
kjs> Math.sin(0)
0
kjs> Math.cos(0)
1
kjs> console
JSConsoleWidget (KJSEmbed::JSConsoleWidget)
kjs> console.childCount()
4
kjs> console.child(1)
CmdEdit (TQComboBox)
kjs> console.child(2)
RunButton (TQPushButton)
kjs> console.child("RunButton")
RunButton (TQPushButton)
kjs> console.child("RunButton").text = "Go!"
Go!
kjs> console.caption = "Different Title"
Different Title


Copyright (C) 2001-2003, Richard J. Moore <rich@kde.org>