diff --git a/docs/api/define_vars.md b/docs/api/define_vars.md index e0b2e1e..a253aac 100644 --- a/docs/api/define_vars.md +++ b/docs/api/define_vars.md @@ -38,7 +38,7 @@ XElement serializes the data that you are sending into the client so its safe an const dolphins = "So long, and thanks for all the fish!" --- { + const agDialogElement = document.getElementById(dialogId) + console.log('agDialogElement: ', agDialogElement); + // ...and so on + }} +/> + +``` + ## Local Variables With `define:vars` you literally are defining the variable that are being sent across from Astro into the scope of the XElement. Its hoisted in the respects that it places these declared variables into the top of the element body.