Modernizr/Modernizr

View on GitHub
feature-detects/css/hyphens.js

Summary

Maintainability
C
7 hrs
Test Coverage

Function runHyphenTest has 127 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    function runHyphenTest() {
      if (!document.body && !document.getElementsByTagName('body')[0]) {
        setTimeout(runHyphenTest, waitTime);
        return;
      }
Severity: Major
Found in feature-detects/css/hyphens.js - About 5 hrs to fix

    Function test_hyphens_find has 38 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

          function test_hyphens_find(delimiter) {
            try {
              /* create a sample input for resetting selection location, and a div container
               * these have to be appended to document.body, otherwise some browsers can give false negative
               * div container gets the doubled testword, separated by the delimiter
    Severity: Minor
    Found in feature-detects/css/hyphens.js - About 1 hr to fix

      Function test_hyphens has 31 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

            function test_hyphens(delimiter, testWidth) {
              try {
                /* create a div container and a span within that
                 * these have to be appended to document.body, otherwise some browsers can give false negative */
                var div = createElement('div');
      Severity: Minor
      Found in feature-detects/css/hyphens.js - About 1 hr to fix

        There are no issues that match your filters.

        Category
        Status