Merge pull request #14182 from keika299/autosize

autosize - add update and destroy methods
This commit is contained in:
Daniel Rosenwasser
2017-01-24 17:50:58 -08:00
committed by GitHub
2 changed files with 23 additions and 1 deletions
+18
View File
@@ -8,3 +8,21 @@ autosize(document.querySelector('textarea'));
// from a single element
autosize(document.getElementById('my-textarea'));
// update a NodeList
autosize.update(document.querySelectorAll('textarea'));
// update a single Node
autosize.update(document.querySelector('textarea'));
// update a single element
autosize.update(document.getElementById('my-textarea'));
// destroy a NodeList
autosize.destroy(document.querySelectorAll('textarea'));
// destroy a single Node
autosize.destroy(document.querySelector('textarea'));
// destroy a single element
autosize.destroy(document.getElementById('my-textarea'));
+5 -1
View File
@@ -1,12 +1,16 @@
// Type definitions for jquery.autosize 3.0.7
// Project: http://www.jacklmoore.com/autosize/
// Definitions by: Aaron T. King <https://github.com/kingdango>
// Definitions by: Aaron T. King <https://github.com/kingdango>, keika299 <https://github.com/keika299>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
declare namespace autosize {
interface AutosizeStatic {
(el: Element): void;
(el: NodeList): void;
update(el: Element): void;
update(el: NodeList): void;
destroy(el: Element): void;
destroy(el: NodeList): void;
}
}