This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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`を定義 | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
合成除外の文字以外で構成された文字列の置換 - パフォーマンス計測 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* data-alert属性 | |
*/ | |
window.addEventListener('click', function(e){ | |
var target = e.target; | |
if (target.dataset.hasOwnProperty('alert')) { | |
alert(target.dataset.alert); | |
} | |
}, false); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Uint8ClampedArray/CanvasPixelArrayの比較処理 - パフォーマンス計測 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 文字の表示に対応しているか判定します。 | |
* 判定を行うには、canvas要素とcanvasへのテキストの描画に対応している必要があります。 | |
* | |
* @param {Element} targetElem 文字の対応判定を行う基準となる要素。 | |
* この要素の算出スタイル、及び所属するdocumentオブジェクトを元に、判定を行います。 | |
* @constructor | |
*/ | |
function SupportCharacter(targetElem){ | |
/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @see https://dom.spec.whatwg.org/#interface-element | |
* @see https://developer.mozilla.org/docs/Web/API/Element/matches#Polyfill | |
* @see https://gist.github.com/jonathantneal/3062955 | |
* @see https://github.com/jonathantneal/closest | |
*/ | |
(function(global){ | |
var Element; | |
var ElementPrototype; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @see http://stackoverflow.com/questions/3277182#3277192 | |
*/ | |
var isStrictModeSupported = (function() { 'use strict'; return !this; }()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Get style property (CSSStyleDeclaration object) of Pseudo Elements / 擬似要素のstyleプロパティ(CSSStyleDeclarationオブジェクト)を取得 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
『input要素のtext属性(他)の左内側の余白を空ける方法 - Qiita』のサンプル |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Online and offline events example |
OlderNewer