How Is Bootstrap/alert::widget's Js Generated?

I’ve noticed that Alert::widget generates js code:




jQuery(document).ready(function () {

jQuery('#w0').alert();


...



but I failed to find where is it taken from?

From what I understood Yii bootstrap widget registers it when registering a plugin:




 if (!empty($this->clientEvents)) {

            $js = [];

            foreach ($this->clientEvents as $event => $handler) {

                $js[] = "jQuery('#$id').on('$event', $handler);";

            }

            $view->registerJs(implode("\n", $js));

        }



It is using $this->clientEvents property for that… If this is what I search, then where do $this->clientEvents come from?

I didn’t see them in Alert::widget.