You should correct that code with two changes1. Closing braces - line 72. and available browser objects for document and $ - line 9Updated code(function ($, $document) { "use strict"; $document.on("dialog-ready", function() { console.log("TEST"); }); })($, $(document));