[webkit-dev] Javascript and WebCore

Maciej Stachowiak mjs at apple.com
Sun Oct 25 14:23:59 PDT 2009

On Oct 25, 2009, at 2:01 PM, Alexander Cohen wrote:

> In the events of a tag, i needed to add checks to see what type of  
> script was being called. A lot if not all of the time, we will  
> usually find a "javascript:" in the event code so i can also look  
> there for my defined scripting language and call into the right code.

Attribute event listeners do not usually have "javascript:" in them.  
Here is an example from Google's home page:
<a href="http://images.google.com/imghp?hl=en&tab=wi"  
onclick=gbar.qs(this) class=gb1>Images</a>
Notice that the onclick value doesn't start with javascript:. You are  
probably thinking of javascript: URLs in links, like this:

<a href="javascript:callSomething()">

You could invent a new URL scheme that runs your scripting language  
instead of JavaScript, but I don't think there is anything you can do  
about onclick handlers, unless you're willing to break compatibility  
with existing Web content.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20091025/96ce1759/attachment.html>

More information about the webkit-dev mailing list