fix(ios): add debug logging to verify HTML loading
Added immediate DOMContentLoaded handler to verify HTML is loading: Debug Logging: - Added console.log when DOM loads - Added body element check and background color set - Helps diagnose if HTML is loading at all Fixes: - Black screen debugging: can now see if HTML loads - JavaScript execution: verifies scripts are running - WebView loading: confirms WebView is serving HTML Result: Can now diagnose if issue is HTML loading or JavaScript execution
This commit is contained in:
@@ -83,6 +83,18 @@
|
||||
console.log('Script loading...');
|
||||
console.log('JavaScript is working!');
|
||||
|
||||
// Show immediate feedback that HTML is loading
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
console.log('DOM Content Loaded!');
|
||||
const body = document.body;
|
||||
if (body) {
|
||||
body.style.backgroundColor = '#667eea';
|
||||
console.log('Body element found, background color set');
|
||||
} else {
|
||||
console.error('Body element not found!');
|
||||
}
|
||||
});
|
||||
|
||||
// DailyNotification will be set after Capacitor loads (see initialization script at end)
|
||||
|
||||
// Define functions immediately and attach to window
|
||||
|
||||
Reference in New Issue
Block a user