Re: My Library update



On Nov 20, 11:37 pm, kangax <kan...@xxxxxxxxx> wrote:
David Mark wrote:
Thanks to Kangax for bothering to test my re-posted test page in
Safari.  A typo was causing it fail.

Looks good in Safari 4.0 and Chrome.  I'm not saying there aren't
mistakes to be found, but the code has withstood FF3, FF3.5, Safari 3,
Safari 4, three versions of Opera, Chrome, Netscape back to 6.2 and IE
back to 5 (and 4 is not out of the question, just never tested it).
Never tried Safari 2, but I think most of it should work (and the rest
should degrade).  And I know I tested a build on the PS3 at one point
too.

Not too bad for something that has sat on the shelf for years.  ISTM
that's the measure of a cross-browser script is the length of time
between major rewrites.  Other than some typos and a few silly 2007
mistakes corrected over the years (thanks again Kangax), nothing's
changed.  Feature testing allows for such a "Write Once, Do Nothing"
approach.

It also seems to me that Google is wasting everyone's time releasing
an all-sniff library in 2009 (and they are known for script errors,
even in major browsers) and jQuery still can't figure out attributes.
Is it cool to swap scripts out constantly?  Seems like an enormous
waste of time and money to me, but the misconceptions about the
language are so deeply rooted at this point that most people believe
Resig (and the like) when they claim they are solving some impossible
problem (and please bear with them forever).

Also, somebody (RobG?) mentioned they'd been working on updating the
documentation (sorely needed).  Send it and I'll put it up...  What's
up there now is pretty skeletal (and untouched since 2007), but at
least it doesn't describe delusions.  ;)

No problem.

Out of curiosity, I checked few older browsers I have here on my mac and
noticed few more issues.

Cool! :)


Safari 2.0, for example, always opens dialog in what appears to be the
middle of a document, rather than middle of screen; similarly, when
maximizing dialog, its (dialog's) bottom ends up all the way at the
bottom of a document.

Well, that's obviously broken. Sounds similar to the old Opera bug
with documentElement.clientHeight being equal to
documentElement.scrollHeight (though that one is covered). Standards
mode and quirks? Of all the older browsers I tested, that one was
definitely not on the list as I didn't have a Mac at the time. I will
have a look at the function that measures the viewport. I've been
working on a much simplified version of that as well.


In (rather ancient) Opera 8.54 few things seem to be defunct: image
scroll via drag; mousewheel event handling; innerHTML on select element
makes its contents disappear; when maximizing, dialog resizes not from
center, but somewhere from the right (and off) of the screen; opaque
text is not opaque.

Hmm. ISTM I tested in Opera 8. Of course, not on Mac. No idea
there. You sure it wasn't just the cursor missing on scroll by drag?
I know that's a (not really needed) custom cursor and Opera never
liked those.


Firefox 1.5 works wonderfully, but 1.0 has some issues with dialog
positioning (its bottom also ends up being on the bottom of a document)
and in some cases it doesn't seem to be possible to resize it.

Never tested any of it in 1.0. But there seems to be a common thread
in ancient (and one not so ancient) Mac browsers with regard to the
centering/maximizing. Could be my feature testing for the broken
Opera (and like) implemenations is inadequate. I'll have to look at
that. Will post a simplified version of the getViewportDimensions
function when I get a chance. Will be easier to spot the mistake(s).
Completely avoids the documentElement.clientHeight issue if it can
determine the scroll bar width (and it is better than the old one at
that) and innerHeight is available.

As mentioned, not perfect. As I have a slightly improved set of
attribute wrappers now too (in that test page I posted), I will likely
put up some unit tests (at the very least for attributes and viewport
dimensions). I want to (perhaps optionally) yank out the unload
cleanup too as it should be unnecessary.

Also, as mentioned a while back, relying on the viewport height for
anything is a mistake. Put "dialogs" at the top (like the Mac OS) and
avoid the issue.

Thanks again.
.



Relevant Pages

  • Re: CSS logo div shows up in Safari but not Opera or FF
    ... In Safari (on the Mac) the logo bar on the top of the webpage shows up ... however in Opera and FF it shows up as white space. ... FWIW, my Safari on Windows doesn't render this image, too. ... Prototype.js was written by people who don't know javascript for people ...
    (comp.infosystems.www.authoring.stylesheets)
  • Re: What about Opera ?
    ... I hope to get some opinions from Opera users on the Mac. ... My wife has Safari, Opera, and Firefox on ... I only use Firefox and Safari on my Mac but on this OpenBSD laptop I use Firefox and Opera. ...
    (comp.sys.mac.apps)
  • Re: Free line breaking
    ... I see the same in Safari, Camino and Firefox (on the Mac), but in Opera on ... Which version of Opera is that? ... Burne-Jones/William Morris window in Shropshire church: ...
    (alt.html)
  • Re: Free line breaking
    ... I see the same in Safari, Camino and Firefox (on the Mac), but in Opera on ... Which version of Opera is that? ... Not quite :-) - the images line up at the top but the alternate captions are ...
    (alt.html)
  • Re: BBC show "hotel inspectors"
    ... Javascripts you'll permit to be executed. ... I've recently tried Opera. ... Safari doesn't have the fine control over what ... Mac - it doesn't. ...
    (uk.people.support.depression)