get-input-selection
Advanced tools
Comparing version 1.1.0 to 1.1.1
{ | ||
"name": "get-input-selection", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"description": "getInputSelection() provides carrot position for textarea. Works as selectionBegin and selectionEnd for all browsers", | ||
@@ -5,0 +5,0 @@ "main": "dist/get-input-selection.js", |
'use strict'; | ||
export default (el) => { | ||
export default function(el) { | ||
let start = 0, end = 0; | ||
@@ -49,5 +49,5 @@ | ||
return { start, end }; | ||
}; | ||
} | ||
export const setCaretPosition = (elem, caretPos) => { | ||
export function setCaretPosition(elem, caretPos) { | ||
if(elem) { | ||
@@ -69,2 +69,2 @@ if(elem.createTextRange) { | ||
} | ||
}; | ||
} |
Sorry, the diff of this file is not supported yet
7219
8