public function jsRender()
    {
        $ret = '';

        // start with constructor
        $ret .= $this->_library;

        // next perhaps we have arguments
        if ($this->_constructorArgs) {
            $ret .= $this->_renderArgs($this->_constructorArgs);
        }

        // next we do same with the calls
        foreach ($this->_chain as $chain) {
            if (is_array($chain)) {
                $ret .= '.'.$chain[0].$this->_renderArgs($chain[1]);
            } elseif (is_numeric($chain)) {
                $ret .= '['.$chain.']';
            } else {
                $ret .= '.'.$chain;
            }
        }

        return $ret;
    }