summaryrefslogtreecommitdiff
path: root/static
diff options
context:
space:
mode:
Diffstat (limited to 'static')
-rw-r--r--static/js/comments/comment_form.js12
1 files changed, 12 insertions, 0 deletions
diff --git a/static/js/comments/comment_form.js b/static/js/comments/comment_form.js
new file mode 100644
index 0000000..0d853fe
--- /dev/null
+++ b/static/js/comments/comment_form.js
@@ -0,0 +1,12 @@
+class CommentForm {
+ constructor(domain) {
+ this.domain = domain;
+ this.form_element = document.getElementById("comment-form");
+ this.form_element.addEventListener("submit", this.submit);
+ }
+
+ submit(event) {
+ this.form = new FormData(event.target);
+ console.log(this.form);
+ }
+}