← All posts tagged web

Tenno-Seremel
DOM web code JS
var x = document.querySelectorAll('p');
// x = NodeList [ <p>, <p> ]
x.forEach(function(a){ console.log(a); });
// TypeError: x.forEach is not a function
Array.prototype.forEach.call(x, function(a){ console.log(a); });
// <p>
// <p>

Т.е. всё, конечно, правильно, но где же удобство, «юзерфрендливость»?
Tenno-Seremel
web JS Для тех, кто придумал при клике по ссылке хватать её жабаскриптом и делать плавную прокрутку, я приготовлю отдельную жаровню в аду.
Tenno-Seremel
q web JS
So, yes, it would be great if fixing your browser involved actions that were not semantically equivalent to voodoo. But, on the bright side, things could always be worse. For example, it would definitely be horrible if your browser’s scripting language combined the prototype-based inheritance of Self, a quasi-functional aspect borrowed from LISP, a structured syntax adapted from C, and an aggressively asynchronous I/O model that requires elaborate callback chains that span multiple generations of hard-working Americans.

ℹ To Wash It All Away, James Mickens

lol
Tenno-Seremel
q web CSS
CSS is not so much a description of what your final page will look like, but rather a loose, high-level overview of what could happen to your page, depending on the weather, the stock market, and how long it’s been since you last spoke to your mother.

ℹ To Wash It All Away, James Mickens

:}
Tenno-Seremel
web IE soylentnews.org
Late Saturday, Microsoft confirmed the existance of a new zero-day vulnerability that resides in all versions of Internet Explorer since IE6 has been spotted in the wild. The vulnerability, which could allow remote code execution, is being used in "limited, targeted attacks," according to an advisory issued by Microsoft.

soylentnews.org

Решето!
Tenno-Seremel
web JS Разыскивается простой контент слайдер на жабскрипте без зависимостей от фреймворков (IE9+). Можно, конечно, написать ещё один велосипед, но я пытаюсь лениться.
Tenno-Seremel
web заметки IE Выбрось IE8 и получи в награду:

JS
---
String.prototype.trim(), addEventListener(), textContent, Array.prototype.indexOf(), Array.prototype.forEach(), Array.prototype.every(), Array.prototype.filter()…

CSS
---
:root, :nth-child(n), :last-child, :only-child, :only-of-type, :empty, :target, :not(s), :enabled, :disabled, :checked, :indeterminate, border-radius (ДА ЛАДНО???), box-shadow, множественные фоны(!), calc() (А-А-А-А!!!), rgba()…

::after и ::before можно писать по-человечески, с двумя точками :}

msdn.microsoft.com

другое
---
html5 элементы не разваливаются на 2 части без shim
SVG
Tenno-Seremel
web HTML web_components Пробую сделать на этих костылях (полифиллах для веб-компонентов) такой свой уличный <details> (этакий спойлер). Даже что-то работает :} Теперь мне хочется, что бы их поддержку запилили уже в браузеры, ещё больше. Это же клад!
Tenno-Seremel
web web_components В продолжение #2681109

github.com

А-а-а! Контент слайдер! Уж не знаю почему все так эти штуки любят, но… :} Правда x-tag полифилл, как я понимаю, поддерживает только IE9+, а у нас ещё 8ой поддерживается… Надеюсь, с полной смертью XP этот вопрос будет пересмотрен.