Fix drawtext error (#938)

1. Start QB-Core on a slow or low-spec computer
2. Access the Debug UI page (localhost:13172)
3. Encounter an error in the drawtext.js file
4. The issue stems from the script loading successfully but any resource call function (hideText) and sending an event message before index.html of all resources are fully loaded on NUI it make
`html
<div className="text" />` is not loaded.
This commit is contained in:
worapol.pan.buraphan
2023-02-01 06:59:36 +07:00
committed by GitHub
parent 7b68f72cec
commit 14340bb374
+3 -3
View File
@@ -7,8 +7,6 @@
<link href="css/style.css" rel="stylesheet" />
<script src="https://cdn.jsdelivr.net/npm/vue@3/dist/vue.global.prod.js" defer></script>
<script src="https://cdn.jsdelivr.net/npm/quasar@2.1.0/dist/quasar.umd.prod.js" defer></script>
<script type="module" src="js/app.js"></script>
<script src="js/drawtext.js"></script>
<link rel="stylesheet" href="css/drawtext.css">
</head>
<body style="font-family: 'Poppins', sans-serif">
@@ -16,5 +14,7 @@
<div id="drawtext-container">
<div id="text" class="text"></div>
</div>
<script type="module" src="js/app.js"></script>
<script src="js/drawtext.js"></script>
</body>
</html>
</html>