Comments (5)
Still figuring out GIT. Somehow my branch is not 'public' so I cannot see my local checkins on this web-site in order to issue a pull request...?
Here's the code I added to boomerang.js. "pagehide" for iPhone/iPad and "onunload" for blackberry....
impl.addListener(w, "pagehide",
function() {
if(fn) {
fn.call(cb_scope, null, cb_data);
}
fn=cb_scope=cb_data=null;
}
);
impl.addListener(w, "onunload",
function() {
if(fn) {
fn.call(cb_scope, null, cb_data);
}
fn=cb_scope=cb_data=null;
}
from boomerang.
Hi @solarice thanks for the patch. We've moved development to https://github.com/lognormal/boomerang/
I'll merge your changes in there and give you credit.
Regarding the change you made for BlackBerry, don't we already listen to the unload event? Or does BlackBerry do something weird with event names?
from boomerang.
Yes, sort of. Exiting code had "unload" but blackberry uses "onunload".
// Add "pagehide" for support on iPad/iPhone
// Add "onunload" for Blackberry
if(e_name === 'page_unload') {
impl.addListener(w, "unload",
function() {
if(fn) {
fn.call(cb_scope, null, cb_data);
}
fn=cb_scope=cb_data=null;
}
);
impl.addListener(w, "beforeunload",
function() {
if(fn) {
fn.call(cb_scope, null, cb_data);
}
fn=cb_scope=cb_data=null;
}
);
impl.addListener(w, "pagehide",
function() {
if(fn) {
fn.call(cb_scope, null, cb_data);
}
fn=cb_scope=cb_data=null;
}
);
impl.addListener(w, "onunload",
function() {
if(fn) {
fn.call(cb_scope, null, cb_data);
}
fn=cb_scope=cb_data=null;
}
);
}
The impl.addListener method adds the "on" prefix when calling "attachEvent", but that's not getting used....
addListener: function(el, sType, fn, capture) {
if(el.addEventListener) {
el.addEventListener(sType, fn, (capture));
}
else if(el.attachEvent) {
el.attachEvent("on" + sType, fn);
}
}
http://docs.blackberry.com/en/developers/deliverables/11848/HTML_ref_event_attributes_600908_11.jsp
P.S. Thanks for adding in the iPhone/iPad portion. I'll try syncing up again as there's other fixes/enhancements I'd like to add.
from boomerang.
wouldn't we also need to do this for the onload event in that case?
from boomerang.
That's a good question. We were getting data in our tests and they seemed sufficiently accurate. I'll investigate some more to understand why it was working.
from boomerang.
Related Issues (19)
- finish() changes HOT 8
- Make the timers available on the before_beacon event HOT 2
- t_done not send if navapi enabled, BW enabled, HTTPS, and no perf API HOT 7
- Use Google Chrome APIs HOT 7
- IE 7 and 8, time done is not showing up HOT 4
- t_page and t_resp not calculated when using Cookie HOT 2
- Cannot set cookie in IE HOT 1
- Setting user_ip from a cookie HOT 1
- Documentation Disappeared HOT 1
- Extremely high or low t_done values HOT 1
- Console output doesn't work for iPhone/iPad HOT 2
- Enabling beacon and bandwidth tests using HTTPS HOT 1
- Prevent execute html content before boomerang.js finished
- Ajax api call with relative url HOT 1
- How to retrieve the stored data..? HOT 4
- Getting negative values for t_done with angularjs plugin HOT 2
- chrome.loadTimes() deprecation HOT 1
- Firefox and IE HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from boomerang.