protected function connectEvent($constant, callable $callback)
    {
        if ( ! method_exists($this->element, 'GetId')) {
            return $this->element->Connect($constant, $callback);
        }

        $id = $this->element->GetId();

        $this->collection
            ->getTopLevelWindow()
            ->getRaw()
            ->Connect($id, $constant, $callback);
    }
protected function connectEvent($constant, callable $callback)
    {
        if ( ! method_exists($this->element, 'GetId')) {
            return $this->element->Connect($constant, $callback);
        }

        $id = $this->element->GetId();

        $this->collection
            ->getTopLevelWindow()
            ->getRaw()
            ->Connect($id, $constant, $callback);
    }
protected function connectEvent ( $ constant , callable $ callback ) { if ( ! method_exists ( $ this -> element , 'GetId' ) ) { return $ this -> element -> Connect ( $ constant , $ callback ) ; } $ id = $ this -> element -> GetId ( ) ; $ this -> collection -> getTopLevelWindow ( ) -> getRaw ( ) -> Connect ( $ id , $ constant , $ callback ) ; }
Connect the event to the top-level window

@param  integer   $constant
@param  callable $callback
@return void
Connect the event to the top - level window