diff options
author | Darrell Anderson <[email protected]> | 2013-03-02 15:57:34 -0600 |
---|---|---|
committer | Darrell Anderson <[email protected]> | 2013-03-02 15:57:34 -0600 |
commit | 7c0b0c9dc9fcbe9c198925bdc7ee18ac6be49f4f (patch) | |
tree | c76702a7f6310fbe9d437e347535422e836e94e9 /tdehtml/java/netscape/javascript | |
parent | a2a38be7600e2a2c2b49c66902d912ca036a2c0f (diff) | |
parent | 27bbee9a5f9dcda53d8eb23863ee670ad1360e41 (diff) | |
download | tdelibs-7c0b0c9dc9fcbe9c198925bdc7ee18ac6be49f4f.tar.gz tdelibs-7c0b0c9dc9fcbe9c198925bdc7ee18ac6be49f4f.zip |
Merge branch 'master' of http://scm.trinitydesktop.org/scm/git/tdelibs
Diffstat (limited to 'tdehtml/java/netscape/javascript')
-rw-r--r-- | tdehtml/java/netscape/javascript/JSException.java | 20 | ||||
-rw-r--r-- | tdehtml/java/netscape/javascript/JSObject.java | 21 |
2 files changed, 41 insertions, 0 deletions
diff --git a/tdehtml/java/netscape/javascript/JSException.java b/tdehtml/java/netscape/javascript/JSException.java new file mode 100644 index 000000000..222033e7a --- /dev/null +++ b/tdehtml/java/netscape/javascript/JSException.java @@ -0,0 +1,20 @@ +package netscape.javascript; + +public class JSException extends Exception { + public JSException() {} + public JSException(String s) { + super(s); + } + public JSException(String s, String fn, int ln, String src, int ti) { + super(s); + filename = new String(fn); + linenumber = ln; + source = src; + tokenindex = ti; + } + private String filename = null; + private int linenumber; + private String source = null; + private int tokenindex; +} + diff --git a/tdehtml/java/netscape/javascript/JSObject.java b/tdehtml/java/netscape/javascript/JSObject.java new file mode 100644 index 000000000..f103d90c8 --- /dev/null +++ b/tdehtml/java/netscape/javascript/JSObject.java @@ -0,0 +1,21 @@ +package netscape.javascript; + +import java.applet.Applet; + +public abstract class JSObject extends Object { + protected JSObject() + { + } + public abstract Object call(String function, Object[] arguments) throws JSException; + public abstract Object eval(String script) throws JSException; + public abstract Object getMember(String name) throws JSException; + public abstract void setMember(String name, Object o) throws JSException; + public abstract void removeMember(String name) throws JSException; + public abstract Object getSlot(int index) throws JSException; + public abstract void setSlot(int index, Object o) throws JSException; + public static JSObject getWindow(Applet applet) throws JSException + { + return org.kde.javascript.JSObject.getWindow(applet, 0); + } +} + |