Use Standard JS for JS code
This commit is contained in:
parent
93cb70455d
commit
4d4a58361b
@ -1,14 +1,9 @@
|
||||
function autosize () {
|
||||
const el = this;
|
||||
el.style.height = 'auto';
|
||||
el.style.height = (el.scrollHeight ) + 'px';
|
||||
const el = this
|
||||
el.style.height = 'auto'
|
||||
el.style.height = `${el.scrollHeight}px`
|
||||
}
|
||||
|
||||
const articleContent = document.querySelector('#content');
|
||||
let offset = 0;
|
||||
let style = window.getComputedStyle(articleContent, null);
|
||||
|
||||
offset += parseInt(style['paddingTop']) + parseInt(style['paddingBottom']);
|
||||
autosize.bind(articleContent)();
|
||||
articleContent.addEventListener('keyup', autosize);
|
||||
|
||||
const articleContent = document.querySelector('#content')
|
||||
autosize.bind(articleContent)()
|
||||
articleContent.addEventListener('keyup', autosize)
|
||||
|
Loading…
Reference in New Issue
Block a user