2011-12-01 15:19, Martin Honnen wrote:
>
http://home.arcor.de/martin.honnen/html/test2011120101.html is an
> example, the iframe content is generated by a javascript: URL, works in
> IE 9, Firefox, Google, Opera. The link works in IE 9, Firefox, Opera but
> not in Chrome, but I don't get any error message so I am not sure
> whether that is some kind of security restriction.
I would expect javascript: URLs to behave differently depending on
browser, in sufficiently complicated cases at least. There is no
specification on the exact meaning and treatment of such URLs.
By the way, your test code shows, on one of my browsers,
"Today is Fri Dec 02 2011 11:08:04 GMT+0200 (Suomen normaaliaika)."
What's that odd parenthetic note there? I know what it means... but why
does it appear in text in English? :-)
Implicit Date to string conversions aren't really suitable even for
demos, as they may inadvertantly demonstrate the lack of proper
localization in JavaScript and its implementations.
But returning to javascript: URLs, yesterday I stumbled across a bug
(some key links not working at all on some modern browsers), which
turned out to be caused by legacy code that uses an href attribute with
javascript: URL _and_ target="_blank". Isolated to a simple case:
http://www.cs.tut.fi/~jkorpela/js/target.html
On Firefox 8, the "link" opens a new tab with about:blank contents. With
the target attribute removed,
http://www.cs.tut.fi/~jkorpela/js/targetless.html
it works as intended.
--
Yucca,
http://www.cs.tut.fi/~jkorpela/