-Поиск по дневнику

Поиск сообщений в rss_thedaily_wtf

 -Подписка по e-mail

 

 -Постоянные читатели

 -Статистика

Статистика LiveInternet.ru: показано количество хитов и посетителей
Создан: 06.04.2008
Записей:
Комментариев:
Написано: 0


CodeSOD: A Deeply Nested Mystery

Среда, 18 Марта 2015 г. 14:00 + в цитатник

As any competent developer knows, not all Web browsers were created equal. In a stew of standards, drafts, vendor extensions, and JavaScript engine quirks, each of them can behave a little differently under various circumstances. Many people tried to resolve this situation, but "creative" coders are always one step ahead, finding new and amusing ways to mandate the dreaded "runs only under Internet Explorer 6" popup on their webpages.

This time, our submitter found out that his bus timetable was working just fine on Safari:

Safari render

Under Firefox, however, it was curiously missing one of the schedules:

Firefox render

Is it a JS compatibility hack gone wrong? he wondered. Maybe a badly-placed -webkit- prefix? Curious, he checked the source.

It was neither. Instead, the author of the code just really, really, really wanted the link to be blue:

Route 10 - B LINE

That, however, triggered a rather obscure glitch in Firefox and the browser simply gave up on rendering 158 nested tags.

And even though our submitter ultimately missed his bus, he at least learned a valuable life lesson: when you push things too hard, they often break.

[Advertisement] Use NuGet or npm? Check out ProGet, the easy-to-use package repository that lets you host and manage your own personal or enterprise-wide NuGet feeds and npm repositories. It's got an impressively-featured free edition, too!

http://thedailywtf.com/articles/a-deeply-nested-mystery

Метки:  

 

Добавить комментарий:
Текст комментария: смайлики

Проверка орфографии: (найти ошибки)

Прикрепить картинку:

 Переводить URL в ссылку
 Подписаться на комментарии
 Подписать картинку