Skip to content

Commit b59dd32

Browse files
authored
Merge pull request #112 from paolo-g/dispatchEvent
Dispatch an event so clients know the library has initialized
2 parents 9167aa6 + 9beac29 commit b59dd32

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

js/csrfprotector.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -355,4 +355,8 @@ function csrfprotector_init() {
355355

356356
window.addEventListener("DOMContentLoaded", function() {
357357
csrfprotector_init();
358+
359+
// Dispatch an event so clients know the library has initialized
360+
var postCsrfProtectorInit = new Event('postCsrfProtectorInit');
361+
window.dispatchEvent(postCsrfProtectorInit);
358362
}, false);

0 commit comments

Comments
 (0)