Browser Detection Article

G

Garrett Smith

John said:
On Sun, 2 May 2010 at 08:36:30, in comp.lang.javascript, VK wrote:


<snip>

That website says that 'JavaScript' is a trade mark owned by Sun.

The first thing I see on that site is:
"Javascript required to view site-wide navigation bar."


"JavaScript" should be Oracle's trademark now.
Don't you want your pages to work in IE or Opera ?

I'd like to see a US government site that complies with US government
508 regulations. Even just only one.
 
D

David Mark

Dr said:
In comp.lang.javascript message <[email protected]
september.org>, Fri, 30 Apr 2010 22:44:44, Garrett Smith


Remove ALL of the CSS. Then insert such CSS as is really useful. Using
border: 1px solid black for what looks like a PRE element is useful;
little else is. And use the simpler style for the FAQ as well.

But move turgid explanations of obvious detail, such as that on !!, to
something like float:right; width:30%; font-size:smaller; with
modest bordering.

font-size:90%
 
G

Garrett Smith

Dr said:
In comp.lang.javascript message <[email protected]
september.org>, Fri, 30 Apr 2010 22:44:44, Garrett Smith
<[email protected]> posted:
[...]

Remove ALL of the CSS. Then insert such CSS as is really useful. Using
border: 1px solid black for what looks like a PRE element is useful;
little else is. And use the simpler style for the FAQ as well.

The comments yellow-bg comments gone. The article uses code styles from
the FAQ, faq.css.
But move turgid explanations of obvious detail, such as that on !!, to
something like float:right; width:30%; font-size:smaller; with
modest bordering.

Added a subheading:
In current
<http://jibbering.com/faq/faq_notes/not_browser_detect.html> :

is boolean true seems to be a ...
Boolean
Search the standard for "Boolean" (lots) and "boolean" (2, justified).
More of them further on.

It is correct there as LC. It is a boolean value being discussed; not an
object.
As More browsers were written their ...
! ,

ALready got the cap, now the comma.
feature detecting because, while it avoids the function erroring in
Bad English : ^^^^^^^^
I considered 'erring' but it sounds unnatural in context. The word "err"
describes more what humans do.

Replacement with "throwing errors" should be find.

Thanks.
 
G

Garrett Smith

Garrett said:
Dr said:
In comp.lang.javascript message <[email protected]
september.org>, Fri, 30 Apr 2010 22:44:44, Garrett Smith
<[email protected]> posted:
[...]

Remove ALL of the CSS. Then insert such CSS as is really useful. Using
border: 1px solid black for what looks like a PRE element is useful;
little else is. And use the simpler style for the FAQ as well.

The comments yellow-bg comments gone. The article uses code styles from
the FAQ, faq.css.
But move turgid explanations of obvious detail, such as that on !!, to
something like float:right; width:30%; font-size:smaller; with
modest bordering.

Added a subheading:
<h4>Boolean Conversion</h4>

Also put it in a box, downsized the font, and fixed:

| The statement would become:-
| [...]
| Which are shorter than...

s/are/is.

Added another subheading just following:

<h4>Inductive Generalization Fallacy</h4>
<p>The problem with this type of browser detecting ...
 
D

Dr J R Stockton

In comp.lang.javascript message <[email protected]
september.org>, Sun, 2 May 2010 14:03:12, Garrett Smith
Dr said:
In comp.lang.javascript message <[email protected]
september.org>, Fri, 30 Apr 2010 22:44:44, Garrett Smith
<[email protected]> posted:
[...]
Remove ALL of the CSS. Then insert such CSS as is really useful.

The comments yellow-bg comments gone. The article uses code styles from
the FAQ, faq.css.

Yes, the FAQ needs the same treatment. My saved copy of the FAQ, for
local reference (and on my site, for bad jibbering days) is CSS-free,
for legibility.

It is correct there as LC. It is a boolean value being discussed; not
an object.

Boole was a person. General convention is that Boolean in text *always*
should use a big B, except when it is quoting a usage of "boolean".

Analogously, SI units are mostly named after real people, and start with
a capital letter; but "second" is an ordinary word, and Messieurs Metre
and Litre are fictitious.

The ECMA document is correct here, using Boolean except for two quotes;
but the language it describes is incorrect, since it includes the string
"boolean".
Replacement with "throwing errors" should be find.

only if a "throw" mechanism is always used.
 
D

David Mark

Stefan said:
It may be an add-on, but it's still official, i.e. coming from the
original author's site. I think you should either maintain it or drop
it, instead of calling it a "complete piece of junk".

You misunderstood. It _was_ a complete piece of junk. It sure as hell
isn't now. :) I cleaned it up months ago and have it working so well
at this point that I am ready to spin off the guts for a GP Window
widget (so you can use multiple at once if so inclined). Combined with
the sidebars, toolbars and new toast widget, you have the foundation to
build virtually anything (up to and including one of those ill-advised
WebOS things).

Everyone I've talked to who has looked at the new widgets has been blown
away. They are lightweight, fast, "skinnable", accessible and
outrageously compatible (of course). This despite the fact that I've
spent very little time on any of them (widgets are very low priority for
me). The foundation I build on is just that good. My point with them
is that developers should be building widgets on top of My Library,
rather than jumping into a nightmare like Dojo or jQuery UI because
somebody has already built widget xyz in their swamps.

I'm also about an hour or two of testing away from posting an updated
Examples page that showcases a lot of the added functionality. Readers
of my forum can check out the test page now if they like. The current
production version is not too shabby either as most of the alert
improvements are old news at this point
There's another
problem with the "Alert" widget, which I'd noticed before but forgot to
mention: the box is resizeable, and it's possible to resize it to 1x1
pixels, but there's no way to restore it from that state.

If you can resize it that small by dragging with the size handle, you
should be able to resize it back. Regardless, a quick way to do that is
with a min-width/height rules. Of course, it needs a scripted option
too as IE < 7 (and IE quirks mode) do not support those rules. I've
recently added about a dozen optional callbacks (e.g. onmaximize,
onrestore, onfocus, onblur, etc.) to the widget, but onresize is still
on my to-do list (will allow the caller to prevent resizing under
whatever circumstances).
It would be
more practical to add a minimum size limit. Not sure if this affects any
of the other widgets.

No. I haven't added a size handle for the sidebar widget yet (on my
list as well). A minimum size is a good idea for that one as well.
Oh I'm so sick and tired of this. Everybody outside of this group calls
it JavaScript, except when they're trying hard to avoid trademark issues
(as in "JScript").

I think that's an over-generalization; but regardless, everybody calling
it that is wrong. Why not spell it right?
Capitalization doesn't matter at all where trademarks
are concerned: "javascript" is just as protected as "JavaScript".

The trademark issue is not the issue I am getting at. It's the
JavaScript + JScript + ... = Javascript issue. How else would you
communicate that you are talking about a specific implementation or all
of them? Programming is a technical field after all.

[...]
Don't get me wrong: in this group, we have a legitimate technical reason
for distintuishing different implementations, but that can be achieved
in a more efficient way than quibbling about capitalization.

How so?
When
somebody comes here and asks a question about JavaScript or javascript
(without explicitly mentioning that they're only targetting Mozilla
browsers), everybody with half a brain knows what they're talking about.
Yes.

Giving them the "there is no javascript" treatment is just unnecessary
nerdy elitism.

Look at what I responded to. The response was appropriate as the
previous poster was clearly confused.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,079
Messages
2,570,574
Members
47,205
Latest member
ElwoodDurh

Latest Threads

Top