Js Hooks In V.4

Hi there,



How does one go about defining and implementing a JS hook in V.4?



Here is an example of the particular issue I am facing:



An old addon I am trying to upgrade contains the following snippet:


<br />
<script type="text/javascript"><br />
// Extend core function<br />
fn_register_hooks('addon_name','js_function_names');<br />
</script><br />

```<br />
<br />
and when I run it in v.4, firebug has this to say:<br />
<br />
"ReferenceError: fn_register_hooks is not defined"<br />
<br />
Has the function name changed?<br />
How is js hooking done in v.4?<br />
Any help with this would be awesomely appreciated, thanks!

The js in your addon needs to supply the function. The call above only defines it.

Since the whole structure of where css/js files are placed and included changed in V4 I would assume your addon has them in the wrong place to be picked up properly.