From 27a70fbdd85e77115d708672ceca15274e629840 Mon Sep 17 00:00:00 2001 From: "Manu Mtz.-Almeida" Date: Wed, 3 May 2017 14:51:07 +0200 Subject: [PATCH] chore(e2e): add domCount() perf tool --- scripts/e2e/index.html | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/scripts/e2e/index.html b/scripts/e2e/index.html index fe5971a76d..65b155dcec 100644 --- a/scripts/e2e/index.html +++ b/scripts/e2e/index.html @@ -26,6 +26,17 @@ document.dir = 'ltr'; } + window.domCount = function domCount(ele) { + if(!ele) { + return 0; + } + var count = 1; + for(var i = 0; i < ele.children.length; i++) { + count += domCount(ele.children[i]); + } + return count; + } + if (location.href.indexOf('theme=dark') > -1) { var link = document.getElementById('ionicLink'); link.setAttribute('href', link.getAttribute('href').replace('.css', '.dark.css'));