# KJSEmbed Documentation

### Introduction

The KJSEmbed library is an easy-to-use wrapper around the KDE ECMAScript interpreter (kjs) that makes it easy to add scriptability to an application. The kjsembed library is distributed in the tdebindings module of KDE. This library provides a binding between Qt/KDE applications and KJS. As well as working in its native KDE environment, the library supports a Qt-only build that has no KDE dependencies.

### Discussion Forums

There is now a KJSEmbed mailing list, see http://mail.kde.org/mailman/listinfo/kjsembed for more information about the list. In addition to the mailing list, KJSEmbed is discussed on the #kaxul IRC channel (on the freenode IRC network).

### Learning KJSEmbed

An introduction to KJSEmbed. The example scripts demonstrate the use of all the major objects, and even provides some useful tools. The tutorial provides a basic introduction to using KJSEmbed, though it is a little out of date.

- Examples
  Example scripts showing how to use KJSEmbed.
- Tutorial
  A tutorial for the library. NOTE: Some of the info here is out of date, see the examples for cleaner ways to do things.
- ChangeLog
  A log of the change history generated from CVS commit messages.
- TODO
  The todo list for KJSEmbed.

### Reference Information

A reference manual for both the C++ and Javascript APIs defined by KJSEmbed. The C++ API is of interest to developers looking to adding scripting to support to their applications, the JS API is for people who want to write scripts.

#### JavaScript API

- Type Reference
  Documents the custom data types KJSEmbed uses to represent complex types.
- Object Reference
  Documents the types of object scripts are allowed to create.

#### Host API

- C++ API Reference (C++)
  Reference manual for the C++ API of the KJSEmbed library.
- Example of embedding
  KJSCmd is a simple example of embedding the interpreter.

### Appendices

- Qt Only Mode
  How to build KJSEmbed with no KDE dependency.
- Document Conventions
  Explains the typographical conventions used by the documents.
- KJSEmbed and TQSA
  Discusses the differences between KJSEmbed and TQSA.

### References

- Mozilla Javascript Resources
  Mozilla's Javascript resources page, includes links to the various releases of the ECMA-262 specification that define the language.
- Inheritance in Javascript
  A tutorial on how to implement inheritence in JavaScript.
- Qt Script for Applications Documentation
  The documentation for TQSA, this is Trolltech's ECMAScript binding for Qt.