[webkit-dev] Javascript and WebCore

Alexander Cohen naftaly at me.com
Sun Oct 25 18:09:45 PDT 2009


On Oct 25, 2009, at 8:52 PM, Maciej Stachowiak wrote:

>
> On Oct 25, 2009, at 4:30 PM, Alexander Cohen wrote:
>
>>
>>>
>>>> Just by curiosity, would it be bad to do something like this  
>>>> (notice the "newscriptinglang:" in the onload ):
>>>>
>>>> <a href="http://images.google.com/imghp?hl=en&tab=wi"  
>>>> onclick=newscriptinglang:gbar.qs(this) class=gb1>Images</a
>>>
>>> That onclick handler is a valid JavaScript program,  
>>> "newscriptlanglang:" is interpreted as a goto label. Whether there  
>>> is Web content out there accidentally doing that, I don't know.
>>
>> So i would actually need to look at the event handler code scheme  
>> before it gets directly passed on to javascript. I could check for  
>> my scripting language scheme and handle it if needed. I do how see  
>> this could be a problem if a developer had a goto statement that  
>> was the same as the name of my scripting language, but the  
>> possibility of that is very low, for now.
>
> Using a meta keyword to declare the event handler scripting language  
> globally would not have this problem, or at least it would be much  
> less likely. It would also make event listeners using your scripting  
> language look nicer. So I continue to recommend that approach. Up to  
> you though.

I will definitely look into using the meta keyword, it seems like a  
great option.

thx again for your input, much appreciated.

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


More information about the webkit-dev mailing list