DeviceReady event not firing

Inside of a template page of f7 i have a script running and deviceready is not firing inside since i dont get anything in my console. It works fine if i dont include ondeviceready but i have to use it for the local notification plugin. I am trying to get a notification when i press the btnzaaltoevoegen button.

<template>
  <div class="page" data-name="light">
    <div class="navbar">
      <div class="navbar-bg"></div>
      <div class="navbar-inner sliding">
        <div class="title" id="logoutDiv">
          Zaal Toevoegen
          <a class="btnLogout" id="logoutzaal"
            ><i class="fas fa-sign-out-alt logoutButton"></i
          ></a>
          <script>
            document
              .getElementById("logoutzaal")
              .addEventListener("click", function () {
                window.location.href = "../index.html";
              });
          </script>
        </div>
      </div>
    </div>

    <div class="page-content">
        <button id="btnZaalToevoegen">Voeg zaal toe</button>
<script>
          document.addEventListener("deviceready", onDeviceReady, false);

          function onDeviceReady() {
            document
              .getElementById("btnZaalToevoegen")
              .addEventListener("click", function () {
                //#region noti
                cordova.plugins.notification.local.schedule({
                  title: "My first notification",
                  text: "Thats pretty easy...",
                  foreground: true,
                });
</div>
</template>

How are you previewing your content? ‘deviceready’ will only fire if it is used in a Cordova environment. By default, opening your page in a browser won’t run things in a Cordova environment.

To simulate Cordova in a desktop web browser, download Visual Studio Code and use the Tools for Apache Cordova plugin. Then click ‘Simulate iOS in browser’ to run your app in a Chrome browser, as if it was running in a Cordova environment. Then the ‘deviceready’ event will fire.

Alternately on the command line type cordova emulate ios and see what happens!

i am amulating it to an android device