summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/bindings/js/JSDocumentCustom.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebCore/bindings/js/JSDocumentCustom.cpp')
-rw-r--r--Source/WebCore/bindings/js/JSDocumentCustom.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/Source/WebCore/bindings/js/JSDocumentCustom.cpp b/Source/WebCore/bindings/js/JSDocumentCustom.cpp
index 5f61e2a..4cc176c 100644
--- a/Source/WebCore/bindings/js/JSDocumentCustom.cpp
+++ b/Source/WebCore/bindings/js/JSDocumentCustom.cpp
@@ -31,8 +31,11 @@
#include "JSDOMWindowCustom.h"
#include "JSHTMLDocument.h"
#include "JSLocation.h"
+#include "JSTouch.h"
+#include "JSTouchList.h"
#include "Location.h"
#include "ScriptController.h"
+#include "TouchList.h"
#if ENABLE(SVG)
#include "JSSVGDocument.h"
@@ -124,4 +127,16 @@ JSValue toJS(ExecState* exec, JSDOMGlobalObject* globalObject, Document* documen
return wrapper;
}
+#if ENABLE(TOUCH_EVENTS)
+JSValue JSDocument::createTouchList(ExecState* exec)
+{
+ RefPtr<TouchList> touchList = TouchList::create();
+
+ for (int i = 0; i < exec->argumentCount(); i++)
+ touchList->append(toTouch(exec->argument(i)));
+
+ return toJS(exec, touchList.release());
+}
+#endif
+
} // namespace WebCore