1 Replies Last post: Apr 3, 2013 1:19 PM by Lex Bond  
Charlie Violard Newbie 1 posts since
Jan 22, 2013
Currently Being Moderated

Jan 22, 2013 12:30 PM

Dojo script type parsing

Hello, I'm a french trying to get PHPStorm to work as I would like to

 

I'm using Dojo 1.8 as JS library and I would like PHPStorm to parse HTML <script> tag as Javascript event if I define it the Dojo way.

 

For example :

 

<script type="dojo/on" data-dojo-event="submit" data-dojo-args="evt">

     dojo.stopEvent(evt);

     if (this.validate()) {

          return true;

     }

</script>

 

It would be really nice if PHPStorm acted like if I typed "javascript". It works if I use "javascript:dojo/on" but now Dojo does not recognize it anymore.

 

Thanks for your help !

Lex Bond Newbie 1 posts since
Apr 3, 2013
Currently Being Moderated
Apr 3, 2013 1:19 PM in response to: Charlie Violard
Re: Dojo script type parsing

Hello, i also had such problem.

 

And I've found the way

 

You can add some injection settings, see attachment

 

I added XPath condition: not(@type="dojo/require")

 

It's done because <Script type="dojo/require"> has not JavaScript sintax

Attachments:

More Like This

  • Retrieving data ...