issue #21801: make sure js_init has been called for triggers