Skip to content

refactor: add element existence checks and improve chatbot initializa…#150

Open
Natwar589 wants to merge 1 commit intotestingfrom
script_fixes
Open

refactor: add element existence checks and improve chatbot initializa…#150
Natwar589 wants to merge 1 commit intotestingfrom
script_fixes

Conversation

@Natwar589
Copy link
Copy Markdown
Contributor

…tion robustness

  • Added ensureInterfaceElements method to verify and recreate missing DOM elements before opening chatbot
  • Added ensureStylesheetInjected method to ensure stylesheet is loaded when needed
  • Updated initializeChatbot to check document.readyState before adding DOMContentLoaded listener
  • Wrapped loadContent logic in try-catch block with error logging
  • Added document.body availability check in loadContent before

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant