Skip to content

Instantly share code, notes, and snippets.

@ericelliott
ericelliott / essential-javascript-links.md
Last active April 30, 2026 08:09
Essential JavaScript Links
@p3t3r67x0
p3t3r67x0 / pseudo_elements.md
Last active April 15, 2026 14:56
A CSS pseudo-element is used to style specified parts of an element. In some cases you can style native HTML controls with vendor specific pseudo-elements. Here you will find an list of cross browser specific pseudo-element selectors.

Styling native elements

Native HTML controls are a challenge to style. You can style any element in the web platform that uses Shadow DOM with a pseudo element ::pseudo-element or the /deep/ path selector.

video::webkit-media-controls-timeline {
  background-color: lime;
}

video /deep/ input[type=range] {
@nikcorg
nikcorg / berlin-jsconf-2014.md
Last active August 4, 2023 12:45
Slide decks of JSConf 2014
@airportyh
airportyh / jsconf_slides_codes_and_notes.md
Last active June 19, 2017 20:51
JSConf 2014 Slides, Codes and Notes.

JSConf Slides, Codes and Notes

These are all the JSConf 2014 slides, codes, and notes I was able to cull together from twitter. Thanks to the speakers who posted them and thanks to @chantastic for posting his wonderful notes.

Modular frontend with NPM - Jake Verbaten (@Raynos)

Virtual DOM and diffing algorithm

There was a [great article][1] about how react implements it's virtual DOM. There are some really interesting ideas in there but they are deeply buried in the implementation of the React framework.

However, it's possible to implement just the virtual DOM and diff algorithm on it's own as a set of independent modules.

device = function(){
var flags = {}, ua = navigator.userAgent, el = document.createElement('div'), root = document.documentElement, i
function flag(names) {
root.className += (root.className ? ' ' : '') + names
names = names.split(' ')
for (i = 0; i < names.length; i++) flags[names[i]] = true
}
if (ua.indexOf('WebKit/') > -1) flag('webkit')
if (ua.indexOf('MSIE ') > -1) flag('msie')
if (ua.indexOf('Firefox') > -1) flag('firefox')