Phantomjs remove class
<p>I use pageres-cli (phantomjs) to take a screenshot from a website.</p>

<p>The animated stuff doesnt work while take a screenshot. I try to remove classes from HTML before rendering page. (".wow, .fadeIn, .animated ...")</p>

<p>I can remove elements etc, so i'm at the right point of the code, but this following specific code doesnt work.</p>

<pre><code>page.evaluate(function (css) {      
    [...]
    Array.prototype.slice.call(document.getElementsByClassName("wow")).forEach(function(script) {
        script.classList.remove("wow");
    });
}, opts.css);
</code></pre>

<p>HTML:</p>

<pre><code>    &lt;section class="well2 well2_ins bg-secondary-rgba"&gt;
        &lt;div class="container"&gt;
            &lt;h3 class="text-primary center991"&gt;
                Leistungen
                &lt;small&gt;
                    &lt;a href="/"&gt;&lt;span&gt;Alle Leistungen&lt;/span&gt;&lt;/a&gt;
                &lt;/small&gt;
            &lt;/h3&gt;
        &lt;/div&gt;
        &lt;div class="owl-carousel"&gt;
            &lt;div class="item"&gt;
                &lt;div class="container"&gt;
                    &lt;div class="row center991"&gt;
                        &lt;div class="col-md-3 col-sm-6 col-xs-12 wow fadeIn" data-wow-delay=".1s"&gt;
                            &lt;div class="thumbnail-1 thumbnail3"&gt;
                                &lt;img src="http://placehold.it/270x200?text=Platzhalter Bild" alt=""/&gt;

                                &lt;div class="caption" data-equal-group="2"&gt;
                                    &lt;h5 class="txt-sec"&gt;
                                        Hol- und Bringservice
                                    &lt;/h5&gt;
                                    &lt;a class="btn btn-primary offs1" href="/"&gt;Zum Angebot&lt;span class="triang"&gt;&lt;/span&gt;&lt;/a&gt;
                                &lt;/div&gt;
                            &lt;/div&gt;
                        &lt;/div&gt;
                        &lt;div class="col-md-3 col-sm-6 col-xs-12 wow fadeIn" data-wow-delay=".2s"&gt;
                            &lt;div class="thumbnail-1 thumbnail3"&gt;
                                &lt;img src="http://placehold.it/270x200?text=Platzhalter Bild" alt=""/&gt;

                                &lt;div class="caption" data-equal-group="2"&gt;
                                    &lt;h5 class="txt-sec"&gt;
                                        Mobiler Service
                                    &lt;/h5&gt;
                                    &lt;a class="btn btn-primary offs1" href="/"&gt;Zum Angebot&lt;span class="triang"&gt;&lt;/span&gt;&lt;/a&gt;
                                &lt;/div&gt;
                            &lt;/div&gt;
                        &lt;/div&gt;
                        &lt;div class="col-md-3 col-sm-6 col-xs-12 wow fadeIn" data-wow-delay=".3s"&gt;
                            &lt;div class="thumbnail-1 thumbnail3"&gt;
                                &lt;img src="http://placehold.it/270x200?text=Platzhalter Bild" alt=""/&gt;

                                &lt;div class="caption" data-equal-group="2"&gt;
                                    &lt;h5 class="txt-sec"&gt;
                                        Ersatzwagen
                                    &lt;/h5&gt;
                                    &lt;a class="btn btn-primary offs1" href="/"&gt;Zum Angebot&lt;span class="triang"&gt;&lt;/span&gt;&lt;/a&gt;
                                &lt;/div&gt;
                            &lt;/div&gt;
                        &lt;/div&gt;
                        &lt;div class="col-md-3 col-sm-6 col-xs-12 wow fadeIn" data-wow-delay=".4s"&gt;
                            &lt;div class="thumbnail-1 thumbnail3"&gt;
                                &lt;img src="http://placehold.it/270x200?text=Platzhalter Bild" alt=""/&gt;

                                &lt;div class="caption" data-equal-group="2"&gt;
                                    &lt;h5 class="txt-sec"&gt;
                                        Sonnenschutzfolien
                                    &lt;/h5&gt;
                                    &lt;a class="btn btn-primary offs1" href="/"&gt;Zum Angebot&lt;span class="triang"&gt;&lt;/span&gt;&lt;/a&gt;
                                &lt;/div&gt;
                            &lt;/div&gt;
                        &lt;/div&gt;
                    &lt;/div&gt;
                &lt;/div&gt;
            &lt;/div&gt;
            &lt;div class="item"&gt;
                &lt;div class="container"&gt;
                    &lt;div class="row center991"&gt;
                        &lt;div class="col-md-3 col-sm-6 col-xs-12"&gt;
                            &lt;div class="thumbnail-1 thumbnail3"&gt;
                                &lt;img src="http://placehold.it/270x200?text=Platzhalter Bild" alt=""/&gt;

                                &lt;div class="caption" data-equal-group="2"&gt;
                                    &lt;h5 class="txt-sec"&gt;
                                        Klimaanlagen-Service
                                    &lt;/h5&gt;
                                    &lt;a class="btn btn-primary offs1" href="/"&gt;Zum Angebot&lt;span class="triang"&gt;&lt;/span&gt;&lt;/a&gt;
                                &lt;/div&gt;
                            &lt;/div&gt;
                        &lt;/div&gt;
                        &lt;div class="col-md-3 col-sm-6 col-xs-12"&gt;
                            &lt;div class="thumbnail-1 thumbnail3"&gt;
                                &lt;img src="http://placehold.it/270x200?text=Platzhalter Bild" alt=""/&gt;

                                &lt;div class="caption" data-equal-group="2"&gt;
                                    &lt;h5 class="txt-sec"&gt;
                                        Autoglasversiegelung
                                    &lt;/h5&gt;
                                    &lt;a class="btn btn-primary offs1" href="/"&gt;Zum Angebot&lt;span class="triang"&gt;&lt;/span&gt;&lt;/a&gt;
                                &lt;/div&gt;
                            &lt;/div&gt;
                        &lt;/div&gt;
                        &lt;div class="col-md-3 col-sm-6 col-xs-12"&gt;
                            &lt;div class="thumbnail-1 thumbnail3"&gt;
                                &lt;img src="http://placehold.it/270x200?text=Platzhalter Bild" alt=""/&gt;

                                &lt;div class="caption" data-equal-group="2"&gt;
                                    &lt;h5 class="txt-sec"&gt;Dichtigkeitsprüfung&lt;/h5&gt;
                                    &lt;a class="btn btn-primary offs1" href="/"&gt;Zum Angebot&lt;span class="triang"&gt;&lt;/span&gt;&lt;/a&gt;
                                &lt;/div&gt;
                            &lt;/div&gt;
                        &lt;/div&gt;
                        &lt;div class="col-md-3 col-sm-6 col-xs-12"&gt;
                            &lt;div class="thumbnail-1 thumbnail3"&gt;
                                &lt;img src="http://placehold.it/270x200?text=Platzhalter Bild" alt=""/&gt;

                                &lt;div class="caption" data-equal-group="2"&gt;
                                    &lt;h5 class="txt-sec"&gt;Funktionstest&lt;/h5&gt;
                                    &lt;a class="btn btn-primary offs1" href="/"&gt;Zum Angebot&lt;span class="triang"&gt;&lt;/span&gt;&lt;/a&gt;
                                &lt;/div&gt;
                            &lt;/div&gt;
                        &lt;/div&gt;
                    &lt;/div&gt;
                &lt;/div&gt;
            &lt;/div&gt;
        &lt;/div&gt;
    &lt;/section&gt;
</code></pre>