diff options
author | Steven Wittens <steven@10.no-reply.drupal.org> | 2005-12-29 03:59:30 +0000 |
---|---|---|
committer | Steven Wittens <steven@10.no-reply.drupal.org> | 2005-12-29 03:59:30 +0000 |
commit | 5e49dd2a68aaa18db498b6b139e76c19f5c32fda (patch) | |
tree | 8c9fbd18a703f3c6bc419c68b981ce38cc8cfba9 /misc/drupal.js | |
parent | afd8ccaf7e64aad714702d1246569088ed2c893d (diff) | |
download | brdo-5e49dd2a68aaa18db498b6b139e76c19f5c32fda.tar.gz brdo-5e49dd2a68aaa18db498b6b139e76c19f5c32fda.tar.bz2 |
- #42446: Resizable textareas.
Diffstat (limited to 'misc/drupal.js')
-rw-r--r-- | misc/drupal.js | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/misc/drupal.js b/misc/drupal.js index e64d3bc60..c19dc565a 100644 --- a/misc/drupal.js +++ b/misc/drupal.js @@ -211,6 +211,10 @@ function absolutePosition(el) { return r; }; +function dimensions(el) { + return { width: el.offsetWidth, height: el.offsetHeight }; +} + /** * Returns true if an element has a specified class name */ @@ -280,6 +284,20 @@ function removeNode(node) { } /** + * Prevents an event from propagating. + */ +function stopEvent(event) { + if (event.preventDefault) { + event.preventDefault(); + event.stopPropagation(); + } + else { + event.returnValue = false; + event.cancelBubble = true; + } +} + +/** * Wrapper around document.getElementById(). */ function $(id) { |