Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when running HTML checks: HTML5Outline is not define #108

Closed
rdeltour opened this issue Nov 7, 2017 · 1 comment
Closed

Error when running HTML checks: HTML5Outline is not define #108

rdeltour opened this issue Nov 7, 2017 · 1 comment
Assignees
Labels

Comments

@rdeltour
Copy link
Member

rdeltour commented Nov 7, 2017

Sometimes Ace fails with the following stack trace:

 Error when running HTML checks: Error: Evaluation failed: ReferenceError: HTML5Outline is not defined
    at Object.ace.getHTMLOutline (/Users/Me/.config/yarn/global/node_modules/ace-core/dist/scripts/ace-extraction.js:126:3)
    at Object.ace.createReport (/Users/Me/.config/yarn/global/node_modules/ace-core/dist/scripts/ace-extraction.js:13:30)
    at /Users/Me/.config/yarn/global/node_modules/ace-core/dist/scripts/ace-axe.js:112:17
    at d (/Users/Me/.config/yarn/global/node_modules/axe-core/axe.min.js:12:26128)

This was reported by @amesga and I could reproduce. To be investigated.

@rdeltour rdeltour added the bug label Nov 7, 2017
@rdeltour rdeltour added this to the v0.7.0 “Beta 3” milestone Nov 7, 2017
@rdeltour rdeltour self-assigned this Nov 7, 2017
@rdeltour
Copy link
Member Author

rdeltour commented Nov 7, 2017

The issue comes from errors in the bundled JS that prevent Ace-injected scripts to run. We should mitigate that by at least showing a warning, and if possible retry a second time with all the scripts disabled.

rdeltour added a commit that referenced this issue Dec 13, 2017
EPUB scripts based on RequireJS were conflicting with the injected
HTML5 outliner library (h5o), and caused an unexpected error.
("HTML5Outline is not defined").

This fix wraps h5o in a function that undefines any global `define`
function, to prevent this conflict.

Fixes #108
rdeltour added a commit that referenced this issue Dec 13, 2017
EPUB scripts based on RequireJS were conflicting with the injected
HTML5 outliner library (h5o), and caused an unexpected error.
("HTML5Outline is not defined").

This fix wraps h5o in a function that undefines any global `define`
function, to prevent this conflict.

Fixes #108
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant