Tune DOM complexity score

This commit is contained in:
Gaël Métais
2015-01-06 16:40:33 +01:00
parent 5bc32ea89a
commit aee0905ea5
2 changed files with 5 additions and 5 deletions
+3 -3
View File
@@ -6,8 +6,8 @@ var policies = {
"label": "DOM elements count",
"message": "<p>A high number of DOM elements means a lot of work for the browser to render the page.</p><p>It also slows down JavaScript DOM queries, as there are more elements to search through.</p>",
"isOkThreshold": 1000,
"isBadThreshold": 3000,
"isAbnormalThreshold": 5000
"isBadThreshold": 2500,
"isAbnormalThreshold": 4000
},
"DOMelementMaxDepth": {
"tool": "phantomas",
@@ -15,7 +15,7 @@ var policies = {
"message": "<p>A deep DOM makes the CSS matching with DOM elements difficult.</p><p>It also slows down JavaScript modifications to the DOM because changing the dimensions of an element makes the browser re-calculate the dimensions of it's parents. Same thing for JavaScript events, that bubble up to the document root.</p>",
"isOkThreshold": 10,
"isBadThreshold": 20,
"isAbnormalThreshold": 30
"isAbnormalThreshold": 28
},
"iframesCount": {
"tool": "phantomas",
+2 -2
View File
@@ -30,7 +30,7 @@ describe('yellowlabtools', function() {
});
});
it('should succeeds on simple-page.html', function(done) {
it('should succeed on simple-page.html', function(done) {
this.timeout(15000);
// Check if console.log is called
@@ -65,7 +65,7 @@ describe('yellowlabtools', function() {
"message": "<p>A deep DOM makes the CSS matching with DOM elements difficult.</p><p>It also slows down JavaScript modifications to the DOM because changing the dimensions of an element makes the browser re-calculate the dimensions of it's parents. Same thing for JavaScript events, that bubble up to the document root.</p>",
"isOkThreshold": 10,
"isBadThreshold": 20,
"isAbnormalThreshold": 30
"isAbnormalThreshold": 28
},
"value": 1,
"bad": false,