I hereby claim:
- I am algorithmcardboard on github.
- I am anirudhan (https://keybase.io/anirudhan) on keybase.
- I have a public key ASAidpQJgiu9yWqhl3pYTCHeq2VNHs7ZRl7VqNq823PiYgo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
<html> | |
<head> | |
<style> | |
h1 { | |
font-family: Calibri; | |
} | |
</style> | |
</head> | |
<body> | |
<h1>Hello World!</h1> |
I recently had several days of extremely frustrating experiences with service workers. Here are a few things I've since learned which would have made my life much easier but which isn't particularly obvious from most of the blog posts and videos I've seen.
I'll add to this list over time – suggested additions welcome in the comments or via twitter.com/rich_harris.
Chrome 51 has some pretty wild behaviour related to console.log
in service workers. Canary doesn't, and it has a load of really good service worker related stuff in devtools.
package in.rajegannathan.singletons; | |
/** | |
* Example class for a eager loading singleton. | |
* The declaration of instance - instance variable should have both static and final. | |
* Without final we might lose the initialization safety that final provides | |
*/ | |
public class EagerSingleton { | |
private static final EagerSingleton instance = new EagerSingleton(); | |
(function(angular, app) { | |
"use strict"; | |
app.directive('placeholder',["$document", "$timeout", function($document, $timeout){ | |
var link = function(scope,element,attrs,ctrl){ | |
// if you dont use modernizr library use the solution given at | |
// http://stackoverflow.com/questions/5536236/javascript-check-for-native-placeholder-support-in-ie8 | |
// to check if placeholder is supported natively | |
if(Modernizr.input.placeholder){ | |
return; |