#ifndef KJS_PROXY_H
#define KJS_PROXY_H
#include <wtf/RefPtr.h>
namespace KJS {
class JSValue;
class ScriptInterpreter;
}
namespace WebCore {
class DeprecatedString;
class Event;
class EventListener;
class Frame;
class Node;
class String;
class KJSProxy {
public:
KJSProxy(Frame*);
~KJSProxy();
KJS::JSValue* evaluate(const String& filename, int baseLine, const String& code, Node*);
void clear();
EventListener* createHTMLEventHandler(const String& functionName, const String& code, Node*);
#if SVG_SUPPORT
EventListener* createSVGEventHandler(const String& functionName, const String& code, Node*);
#endif
void finishedWithEvent(Event*);
KJS::ScriptInterpreter *interpreter();
void setEventHandlerLineno(int lineno) { m_handlerLineno = lineno; }
void initScriptIfNeeded();
bool haveInterpreter() const { return m_script; }
private:
RefPtr<KJS::ScriptInterpreter> m_script;
Frame *m_frame;
int m_handlerLineno;
};
}
#endif