Skip to content

Instantly share code, notes, and snippets.

@sounisi5011
sounisi5011 / index.js
Last active August 29, 2015 14:26
requirebin sketch
var h = require('virtual-dom/h');
var diff = require('virtual-dom/diff');
var patch = require('virtual-dom/patch');
var createElement = require('virtual-dom/create-element');
var Hammer = require('hammerjs');
var requestAnimationFrame = require('raf');
/**
* イベント用のHook、`EvHook`を定義
*/
@sounisi5011
sounisi5011 / app.js
Last active December 17, 2015 15:42
data-*属性とイベントバブリングによるイベント処理
/**
* data-alert属性
*/
window.addEventListener('click', function(e){
var target = e.target;
if (target.dataset.hasOwnProperty('alert')) {
alert(target.dataset.alert);
}
}, false);
@sounisi5011
sounisi5011 / isStrictSupported.js
Created January 28, 2016 19:53
detect if strict mode is supported / strictモードに対応しているか検出
/**
* @see http://stackoverflow.com/questions/3277182#3277192
*/
var isStrictModeSupported = (function() { 'use strict'; return !this; }());
@sounisi5011
sounisi5011 / 'Uint8ClampedArray, CanvasPixelArrayの比較処理
Last active February 17, 2016 18:19
Uint8ClampedArray/CanvasPixelArrayの比較処理 - パフォーマンス計測
Uint8ClampedArray/CanvasPixelArrayの比較処理 - パフォーマンス計測
@sounisi5011
sounisi5011 / '合成除外の文字以外で構成された文字列の置換
Last active February 17, 2016 18:19
合成除外の文字以外で構成された文字列の置換 - パフォーマンス計測
合成除外の文字以外で構成された文字列の置換 - パフォーマンス計測
@sounisi5011
sounisi5011 / '『input要素のtext属性(他)の左内側の余白を空ける方法 - Qiita』のサンプル
Last active February 19, 2016 00:19
『input要素のtext属性(他)の左内側の余白を空ける方法 - Qiita』のサンプル
『input要素のtext属性(他)の左内側の余白を空ける方法 - Qiita』のサンプル
@sounisi5011
sounisi5011 / 'Get style property of Pseudo Elements
Last active February 19, 2016 00:37
Get style property (CSSStyleDeclaration object) of Pseudo Elements / 擬似要素のstyleプロパティ(CSSStyleDeclarationオブジェクト)を取得
Get style property (CSSStyleDeclaration object) of Pseudo Elements / 擬似要素のstyleプロパティ(CSSStyleDeclarationオブジェクト)を取得
@sounisi5011
sounisi5011 / 'Online and offline events example
Last active May 16, 2016 10:01
Online and offline events example
Online and offline events example
@sounisi5011
sounisi5011 / README.md
Last active August 28, 2016 10:24
画像をドラッグ&ドロップできる超簡易WYSIWYGエディタ
@sounisi5011
sounisi5011 / index.html
Created January 21, 2017 21:12
The DOM input event run test
<!DOCTYPE html>
<meta charset=utf-8>
<meta name=viewport content="width=device-width,initial-scale=1">
<meta name=format-detection content="telephone=no,email=no,address=no">
<title>The DOM input event run test</title>
<h1>The DOM input event run test</h1>
<!--<p><label>&lt;input type=hidden&gt;: <input type=hidden></label>-->
<p><label>&lt;input type=text&gt;: <input type=text></label>
<p><label>&lt;input type=search&gt;: <input type=search></label>