Skip to content

Instantly share code, notes, and snippets.

View jiucheng-front's full-sized avatar
🎯
Focusing

九成 jiucheng-front

🎯
Focusing
View GitHub Profile
@que01
que01 / backbone源码解读[转]
Last active December 28, 2019 03:48
backbone源码解读
// Backbone.js 0.9.2
// (c) 2010-2012 Jeremy Ashkenas, DocumentCloud Inc.
// Backbone may be freely distributed under the MIT license.
// For all details and documentation:
// http://backbonejs.org
(function() {
// 创建一个全局对象, 在浏览器中表示为window对象, 在Node.js中表示global对象
var root = this;
@johan
johan / README.md
Last active September 26, 2019 14:19
LocalStorage Cross-window notifications

Take a website with some kind of notifications system showing the user a count of their unread notifications or similar. (Facebook, Google+, GMail et c.)

Now perform an action in one browser tab, that changes or clears the count. Does this immediately propagate to all other tabs you have open on the site?

If not – this example is for you!

As it happens, this is really easy to do in