R
R
RaDir2017-04-12 12:06:35
BEM
RaDir, 2017-04-12 12:06:35

What is the script in the bundle.html header after the BEM project build?

Hello!
A script appears in the header after the default project-stub build from BEM:

(function(e, c) {
            e[c] = e[c].replace(/(ua_js_)no/g, "$1yes");
        })(document.documentElement, "className");

<!DOCTYPE html>
<html class="ua_js_no">

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>iDea | Home</title>
    <script>
        (function(e, c) {
            e[c] = e[c].replace(/(ua_js_)no/g, "$1yes");
        })(document.documentElement, "className");
    </script>
    <meta name="description" content="">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href="home.min.css">
    <link rel="shortcut icon" href="/favicon.ico">
</head>

<body class="page">
    <div class="header">header content goes here</div>
    <div class="content">content goes here</div>
    <div class="footer">footer content goes here</div>
    <script src="home.min.js"></script>
</body>

</html>

Also, what is the "ua_js_no" class in ? Tell me, please, what kind of script and class is this, and what are they for, are they necessary? <html class="ua_js_no">

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey delphinpro, 2017-04-12
@RaDir

js__no to set styles through it in case js is disabled
If js works, the class is replaced with ua_js_yes

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question