What is "no-js" class?

Permalink
I saw "no-js" class added to <html> tag in the edit mode. There is no stylesheet attached to this class. Is it there to identify the page I am in is in the edit mode?
<html class="no-js" lang="en" style="cursor: auto ! important;">


Is there another way (or better way) to identify the page is in the edit mode? I want to hide some elements in the edit mode using CSS.

BlueFractals
View Replies:
mesuva replied on at Permalink Reply
mesuva
The no-js class is something that is removed by a Javascript library (normally Modernizr) and replaced with a js class. It's a way to be able to style things with and without Javascript easily.

In terms of concrete5, it's NOT a way to tell if the page is in edit mode.

There is a concrete5 function to test if you are in edit mode, and you can use that to add in an extra class. The following is an example of what you could do to your body tag in your template:
<?php
$editmode = $c->isEditMode();
?>
<body class="<?php echo ($editmode ? 'editmode' : ''); ?>">


I often will make this a bit more useful, by putting in the page type handle in there as well:
<?php
$pagetype = $c->getCollectionTypeHandle();
$editmode = $c->isEditMode();
?>
<body class="<?php echo $pagetype; ?> <?php echo ($editmode ? 'ineditmode' : ''); ?>">
BlueFractals replied on at Permalink Reply
BlueFractals
Yes I am aware of that function. I was wondering if there is another built-in class that automatically gets added while in the edit mode. Perhaps isEditMode() is the only way. Thanks!