title: webScriptNameForSelector and javascript method with underscore
body: <p>I am using a WebView in my application and it the page I am loading has some existing javascript function calls that were used in a windows environment and should now be used in a mac application.  My issue is that the current javascript (ported from a windows app where the following works) function calls objective C like this:</p>
  
  <pre><code>function callObjectiveC
  {
     window.external.MY_ObjectiveCFunction();
  }
  </code></pre>
  
  <p>I have been trying to use:</p>
  
  <pre><code>+ (NSString *)webScriptNameForSelector:(SEL)sel
  {
      if (sel == @selector(MyObjectiveCFunction)) 
      {
      return @"My_ObjectiveCFunction";
      }   
  }
  </code></pre>
  
  <p>based on: <a href="https://developer.apple.com/library/mac/#documentation/Cocoa/Reference/WebKit/Protocols/WebScripting_Protocol/Reference/Reference.html" rel="nofollow">https://developer.apple.com/library/mac/#documentation/Cocoa/Reference/WebKit/Protocols/WebScripting_Protocol/Reference/Reference.html</a> but to no avail.  Is there a way to do this? I can call the objective C method whatever I want I just need to be able to map that to what is in the existing javascript.</p>
  
  <p>Thanks,
  c.</p>