Common Issues and Fixes
1. Content Not Loading
Problem: The page does not display the loaded content.
Solution: Ensure the file path is correct and accessible.
const app = oLoader();
app.body("./content.html", "b");
app.load();
2. JavaScript Not Executing
Problem: Scripts loaded using app.script()
do not execute.
Solution: Ensure the script is properly linked and set to execute.
const app = oLoader();
app.script("./script.js", "body");
app.load();
3. Fetching External Files Fails
Problem: External resources (HTML, CSS, JS) fail to load.
Solution: Check network errors and ensure CORS policies allow fetching the files.
4. Callback Not Triggering
Problem: The callback function in app.load()
is not executing.
Solution: Ensure the function is passed correctly.
const app = oLoader();
app.body("./content.html", "e");
app.load(() => console.log("Content loaded successfully!"));