0 Replies Latest reply: May 24, 2012 8:26 AM by elektron4 RSS

    generate changes in javascript

    elektron4

      Hi
      I cant find solution to make changes in javascript code.
      I use dom.addJavaScript() function to add javascript in to page.

      Result will be something like:

      <script>

      $(function(){

      /*... some js code*/

      });

      </script>

       

      Thats ok.

      Now, when user use extension second time, i need to keep some js code and add some extra js code between curly brackets.
      Sample:

      <script>

      $(function(){

      /*... some js code*/
      /*....second js code*/

      });

      </script>

       

      How to do that?
      or
      How to make changes in javascript like DOM objects in HTML?