[freeside-commits] branch FREESIDE_3_BRANCH updated. 0dbb8441d07bea4d193966370f2349ba3346442d
Mark Wells
mark at 420.am
Thu Aug 29 12:03:16 PDT 2013
The branch, FREESIDE_3_BRANCH has been updated
via 0dbb8441d07bea4d193966370f2349ba3346442d (commit)
from 3be960f69d36d11f6f080e9e28ed167996df4f26 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 0dbb8441d07bea4d193966370f2349ba3346442d
Author: Mark Wells <mark at freeside.biz>
Date: Thu Aug 29 12:02:16 2013 -0700
better cross-browser onload handlers, fixes #24783
diff --git a/httemplate/elements/onload.js b/httemplate/elements/onload.js
index bfa7eef..c7bbbb2 100644
--- a/httemplate/elements/onload.js
+++ b/httemplate/elements/onload.js
@@ -12,11 +12,12 @@ Usage:
</%doc>
(function() {
- var tmp = window.onload;
- window.onload = function() {
- if (typeof(tmp)== 'function') {
- tmp();
- }
+ var myonload = function() {
<% $m->content %>
- };
+ }
+ if ( window.addEventListener ) {
+ window.addEventListener('load', myonload);
+ } else if ( window.attachEvent ) {
+ window.attachEvent('onload', myonload);
+ }
})();
-----------------------------------------------------------------------
Summary of changes:
httemplate/elements/onload.js | 13 +++++++------
1 files changed, 7 insertions(+), 6 deletions(-)
More information about the freeside-commits
mailing list