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 MIME_TYPE = { | |
PLAIN: 'text/plain', | |
HTML: window.clipboardData ? 'Text' : 'text/html' | |
}; | |
var ios = /AppleWebKit/.test(navigator.userAgent) && /Mobile\/\w+/.test(navigator.userAgent); | |
function selectInput(node) { | |
if (ios) { // Mobile Safari apparently has a bug where select() is broken. | |
node.selectionStart = 0; |
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
// By Clément Wehrung | |
function Iterator(queueRef, processingCallback) { | |
this.queueRef = queueRef; | |
this.processingCallback = processingCallback; | |
this.processed = {}; | |
this.processNext(); | |
} | |
Iterator.prototype.processNext = function() { |