Reply to Re: New window - exact size...

Your name:

Reply:


Posted by Gιrard Talbot on 06/29/05 02:14

Michael Winter wrote :
> On 28/06/2005 23:24, GΓ©rard Talbot wrote:
>
> [snip]
>
>> It's better to set the global variable to null and not to undefined.
>
>
> I fail to see why. The variable will type-convert to boolean false in
> just the same way, and the code that you cite doesn't attempt to make
> any distinction between two values.
>

It's better to initialize the variable to null rather to undefined as
later parts of the code test for/compare the reference to null and not
to undefinded. You avoid the browser to type convert that. It's no biggie.

> The rest I agree with, though if we're talking best practices, the code
> suggested by Mozilla should also test to make sure that the open and
> focus methods exist before calling them

There is no browser that supports window.open() that does not support
window.focus().

in case a user is using a proxy
> or third-party pop-up blocker that effectively deletes or fakes the
> former, thus making the latter non-existent.
>
> [snip]
>
> Mike
>


I'm not saying you're wrong about what you say up here about open being
faked: I just do not know about that particular issue.
[...After deeper thinking...] If open() is faked, then
WindowObjectReference will be null and the WindowObjectReference.focus()
will create a js error.

GΓ©rard
--
remove blah to email me

[Back to original message]


УдалСнная Ρ€Π°Π±ΠΎΡ‚Π° для программистов  •  Как Π·Π°Ρ€Π°Π±ΠΎΡ‚Π°Ρ‚ΡŒ Π½Π° Google AdSense  •  England, UK  •  ΡΡ‚Π°Ρ‚ΡŒΠΈ Π½Π° английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Π‘Π°ΠΉΡ‚ ΠΈΠ·Π³ΠΎΡ‚ΠΎΠ²Π»Π΅Π½ Π² Π‘Ρ‚ΡƒΠ΄ΠΈΠΈ Π’Π°Π»Π΅Π½Ρ‚ΠΈΠ½Π° ΠŸΠ΅Ρ‚Ρ€ΡƒΡ‡Π΅ΠΊΠ°
ΠΈΠ·Π³ΠΎΡ‚ΠΎΠ²Π»Π΅Π½ΠΈΠ΅ ΠΈ ΠΏΠΎΠ΄Π΄Π΅Ρ€ΠΆΠΊΠ° Π²Π΅Π±-сайтов, Ρ€Π°Π·Ρ€Π°Π±ΠΎΡ‚ΠΊΠ° ΠΏΡ€ΠΎΠ³Ρ€Π°ΠΌΠΌΠ½ΠΎΠ³ΠΎ обСспСчСния, поисковая оптимизация