monaco-web-component
Advanced tools
Comparing version 1.0.21 to 1.0.22
@@ -68,6 +68,6 @@ class MonacoEditor extends HTMLElement { | ||
/** | ||
* Register the editor to the form | ||
* Handle formdata event | ||
* @param {FormDataEvent} event | ||
*/ | ||
registerToForm(event) { | ||
async handleFormData(event) { | ||
const value = monaco.editor.getModels()[0].getValue(); | ||
@@ -79,4 +79,4 @@ const blob = new Blob([value], { type: this.contentType }); | ||
onNameChange() { | ||
this.closest("form").addEventListener("formdata", (event) => | ||
this.registerToForm(event), | ||
this.closest("form")?.addEventListener("formdata", (event) => | ||
this.handleFormData(event), | ||
); | ||
@@ -83,0 +83,0 @@ } |
{ | ||
"name": "monaco-web-component", | ||
"version": "1.0.21", | ||
"version": "1.0.22", | ||
"description": "WebComponent version of Monaco Editor. Fully compatible with HTML Forms", | ||
@@ -5,0 +5,0 @@ "repository": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
46281