Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

add ability to automatically load a specified number of times

  • Loading branch information...
commit ec9fec853084b490f1d14e1ba1a8949c5c2c5672 1 parent 84a56bc
@ekashida authored
Showing with 6 additions and 1 deletion.
  1. +6 −1 cl-memory-leak-investigation/yui-without-cl/demo.js
View
7 cl-memory-leak-investigation/yui-without-cl/demo.js
@@ -4,8 +4,10 @@ YUI({filter: 'debug', combine: false}).use('node', function (Y) {
start = Y.one('#start'),
end = Y.one('#end'),
url = Y.one('#url'),
+ loads = Y.one('#loads'),
auto = Y.one('#automate'),
count = 0,
+ numLoads,
automated,
iframe;
@@ -30,7 +32,7 @@ YUI({filter: 'debug', combine: false}).use('node', function (Y) {
console.markTimeline(++count);
}
- if (automated) {
+ if (automated && (numLoads && count < numLoads)) {
create();
}
}
@@ -39,8 +41,10 @@ YUI({filter: 'debug', combine: false}).use('node', function (Y) {
// disable config inputs
url.set('disabled', true);
auto.set('disabled', true);
+ loads.set('disabled', true);
automated = auto.get('checked');
+ numLoads = loads.get('value') || 0;
create();
});
@@ -52,6 +56,7 @@ YUI({filter: 'debug', combine: false}).use('node', function (Y) {
// enable config inputs
url.set('disabled', false);
auto.set('disabled', false);
+ loads.set('disabled', false);
});
});
Please sign in to comment.
Something went wrong with that request. Please try again.