How to use aspect.js in browser?

222 Views Asked by At

I need to use an AOP library, I found aspect.js from https://github.com/mgechev/aspect.js but I require to use it in the browser while an application is running. Does someone have any idea of how this can be used in the browser? There are no clear explanations of how this can be achieved.

1

There are 1 best solutions below

3
EricLavault On

As you would do with other lib : using <script> tag, aspect is then attached to window :

<script src="path/to/aspect-js.js"></script>
<script>
  aspect.before(...);
  ...
</script>