As a side note, I know the Javascript library is experimental but I'm doing some work with it nonetheless.
I have extended both the Javascript library and the jQuery library in CI.
MY_Javascript extends CI_Javascript
and
MY_Jquery extends CI_Jquery
Independently these work almost perfectly, If performing a click function with:
$this->javascript->click('#target', code_to_run());
the javascript library essentially just calls:
$this->js->_click($target, $code)
In keeping with this syntax, my extended javascript and jquery libraries contain function dialog()
and function _dialog()
respectively.
However, when I call $this->javascript->dialog()
when it references $this->js->_dialog()
it's giving me an internal error. But if I change the contents of $this->javascript->dialog()
to just return "Test return"
everything works fine.
I've also done return print_r($this->js);
which doesn't show any of the _functions.
If I understand how extending a library in CI works everything should still work out.
Or perhaps this has nothing to do with CI and is a PHP paradigm that I've just completely missed.