mirror of
https://github.com/discourse/discourse.git
synced 2025-05-23 13:21:01 +08:00
Rename all test files from JS -> ES6
This commit is contained in:
10
test/javascripts/helpers/textarea-selection-helper.js
Normal file
10
test/javascripts/helpers/textarea-selection-helper.js
Normal file
@ -0,0 +1,10 @@
|
||||
export function setTextareaSelection(textarea, selectionStart, selectionEnd) {
|
||||
textarea.selectionStart = selectionStart;
|
||||
textarea.selectionEnd = selectionEnd;
|
||||
}
|
||||
|
||||
export function getTextareaSelection(textarea) {
|
||||
const start = textarea.selectionStart;
|
||||
const end = textarea.selectionEnd;
|
||||
return [start, end - start];
|
||||
}
|
Reference in New Issue
Block a user