Comments on: JavaScript and DOM Compatibility https://webkit.org/blog/27/javascript-and-dom-compatibility/ Open Source Web Browser Engine Thu, 19 Nov 2015 20:36:17 +0000 hourly 1 https://wordpress.org/?v=6.5.2 By: hary199 https://webkit.org/blog/27/javascript-and-dom-compatibility/comment-page-1/#comment-792 Tue, 07 Feb 2006 12:03:05 +0000 http://webkit.opendarwin.org/blog/?p=27#comment-792 wow, the implemented Javascript engine in Safari is not very fast.
check out the javascript performance test on

http://wd-testnet.world-direct.at/mozilla/dhtml/funo/jsTimeTest.htm

Power G5 4×2,5 Ghz 10.4.4
Safari 2.0.3 (417.8), Opera 9.00 (3216)
Time
Safari: 1657 ms
Opera: 883 ms !!!
so Opera twice the speed of Safari.

]]>
By: sulka https://webkit.org/blog/27/javascript-and-dom-compatibility/comment-page-1/#comment-256 Sat, 29 Oct 2005 10:15:43 +0000 http://webkit.opendarwin.org/blog/?p=27#comment-256 I went to check how the latest nightly does on http://www.w3.org/DOM/Test/ but none of the linked Ecmascript test suites run under Safari – neither on the Nightly or the latest Tiger release version (2.0.1). Is there a way to make the tests run under Safari? I guess there is given you have proper reports of the results.

]]>
By: Huck https://webkit.org/blog/27/javascript-and-dom-compatibility/comment-page-1/#comment-235 Fri, 14 Oct 2005 13:28:11 +0000 http://webkit.opendarwin.org/blog/?p=27#comment-235 Coincidentally, I hit that preventDefault bug today. Immediately after, I ran into bug 3374. But 3374 is a lot easier to work around. In any case, now that I’m learning the DOM, I’m even more appreciative of your efforts. Thanks!

]]>
By: Petr Krontorad https://webkit.org/blog/27/javascript-and-dom-compatibility/comment-page-1/#comment-199 Tue, 04 Oct 2005 08:12:56 +0000 http://webkit.opendarwin.org/blog/?p=27#comment-199 Great! The ultimate test application is almost working (just kidding and sorry for Czech locale, English localization pack (external XML file) is pending, but if you know XMLSpy you get the idea 😉 at http://www.whoa-framework.org/website/vas/1.0/?/editor/xml .
Still needs a little bit of tweaking for Safari, but god i’d love to replace Firefox with Safari for such particular applications (please note that the code is actually about three years old and almost intact, no sign of Ajax at that time:) and worked on Mozilla Gecko since its 0.8 version with IE since 6.0). Now Safari is coming very close.. More on http://www.whoa-framework.org/?/product/bender .

]]>
By: jcburns https://webkit.org/blog/27/javascript-and-dom-compatibility/comment-page-1/#comment-195 Fri, 30 Sep 2005 06:11:31 +0000 http://webkit.opendarwin.org/blog/?p=27#comment-195 Ah, that nasty bug 4788. I think that folks do get discouraged when they encounter something like the Gmail bug where…just…nothing…happens. And I hate to say it, but I think the test “people” use these days for browser excellence is not some oh-so-subtle rendering in CSS2, but do the fancy AJAX things of the world (and yeah, interactive SVG too) work?

In other words, do Gmail and Google Maps work as advertised? And of course, they wonder about that Google Earth, but that’s not in your court.

]]>
By: maciej https://webkit.org/blog/27/javascript-and-dom-compatibility/comment-page-1/#comment-193 Thu, 29 Sep 2005 16:15:39 +0000 http://webkit.opendarwin.org/blog/?p=27#comment-193 OK, your DOM-assigned handler example doesn’t work on the last released version of Safari (default not prevented) but it does work on the latest cvs WebKit. I think it is actually a JS parsing problem though, as this workaround works:

function f(evt) { evt.preventDefault(); }
document.getElementById(‘foo’).addEventListener(‘click’, f, false);

I also fixed the problem I found with stopPropagation, just waiting for code review: 5180

And finally, I’m afraid we can’t make any commitments about when specific fixes will make it into releases. The best we can do is let you know after the fact.

]]>
By: Phrogz https://webkit.org/blog/27/javascript-and-dom-compatibility/comment-page-1/#comment-192 Thu, 29 Sep 2005 12:53:18 +0000 http://webkit.opendarwin.org/blog/?p=27#comment-192 Er, didn’t realize HTML markup was allowed. That test (a good example) should read:
<a href=”http://www.google.com” onclick=”event.preventDefault()”>click here</a>
And, of course, the test should be made using a JS-assigned handler:
<a href=”http://www.google.com” id=”foo”>click here</a>
<script type=”text/javascript”>
document.getElementById( ‘foo’ ).addEventListener( ‘click’, function( evt ){ evt.preventDefault( ) }, false );
</script>

]]>
By: Phrogz https://webkit.org/blog/27/javascript-and-dom-compatibility/comment-page-1/#comment-191 Thu, 29 Sep 2005 12:50:04 +0000 http://webkit.opendarwin.org/blog/?p=27#comment-191 Where are the web pages for the various test suites?

Also, maciej, I think a more accurate preventDefault test would be:
click here
since the span tag doesn’t have a default click action.

]]>
By: Twist https://webkit.org/blog/27/javascript-and-dom-compatibility/comment-page-1/#comment-189 Thu, 29 Sep 2005 06:35:10 +0000 http://webkit.opendarwin.org/blog/?p=27#comment-189 So when can we expect to see these improvements rolled into the non-developer version of Safari? I am getting tired of having to launch Firefox for a few sites that use this stuff (writely.com for example).

]]>
By: maciej https://webkit.org/blog/27/javascript-and-dom-compatibility/comment-page-1/#comment-188 Thu, 29 Sep 2005 05:36:12 +0000 http://webkit.opendarwin.org/blog/?p=27#comment-188 Do you have a reproducible case of preventDefault or stopPropagation not working? They appear supported here. I tried this test case:

<a href=”http://www.google.com” onclick=”alert(‘here’)”><span onclick=”event.stopPropagation()”>click here</span></a>

<a href=”http://www.google.com” onclick=”alert(‘here’)”><span onclick=”event.preventDefault()”>click here</span></a>

They seem to stop propagation and prevent default respectively. (Although there seems to be a bug that stopping propagation also prevents the default action! Is that what you had in mind?)

]]>