mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-05 23:37:04 +00:00
Merge pull request #14182 from keika299/autosize
autosize - add update and destroy methods
This commit is contained in:
@@ -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'));
|
||||
|
||||
Vendored
+5
-1
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user