mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-20 04:14:21 +08:00
chore(e2e): add domCount() perf tool
This commit is contained in:
@ -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'));
|
||||
|
Reference in New Issue
Block a user