title: forEach on iOS Safari won't work
body: <p>I have a function that allow me to load specific modules in specific pages based on their body classes. For some reason my forEach function won't work on iOS devices, specifcaly on safari. I am trying to solve this problem for a while, and I do not know how to preceed... Using try/catch, the given error is:</p>
  
  <p><strong>TypeError: document.getElementsByTagName("body")[0].classList.forEach is not a function. (In 'document.getElementsByTagName("body")[0].classList.forEach(function(e){var t=e;x.hasOwnProperty(t)&amp;&amp;new x[t]})', 'document.getElementsByTagName("body")[0].classList.forEach' is undefined)</strong></p>
  
  <p>Here is my code:</p>
  
  <pre><code>import Header from './Components/Header';
  import Shelf from './Components/Shelf';
  
  import Home from './Pages/Home';
  import Category from './Pages/Category';
  import Product from './Pages/Product';
  import NossasLojas from './Pages/NossasLojas';
  import Checkout from './Pages/Checkout';
  
  const Routes = {
      "home": Home,
      "single-product": Product,
      "page-template-nossas-lojas": NossasLojas,
      "archive": Category,
      "woocommerce-cart": Checkout
  };
  
  export default class Pages {
      constructor(){
          new Header();
          new Shelf();
  
          try {
                  document.getElementsByTagName("body")[0].classList.forEach(function(e){
                  let pageName = e;
  
                  if(Routes.hasOwnProperty(pageName)){
                      new Routes[pageName]();
                  }
              })  
          }
          catch (err) {
              alert(err);
          }
      }
  }
  </code></pre>
  
  <p>Thanks a lot! <strong>:)</strong></p>