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

deal with scheme-relative imports of respec in respec2html #358

Merged
merged 1 commit into from Nov 10, 2014
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 8 additions & 0 deletions tools/respec2html.js
Expand Up @@ -47,6 +47,14 @@ if (args.length < 2 || args.length > 4) {
phantom.exit(1);
}

// Dealing with ReSpec source being loaded with scheme-relative link
// i.e. <script src='//www.w3.org/Tools/respec/respec-w3c-common'>
page.onResourceRequested = function (requestData, networkRequest) {
if (requestData.url === "file://www.w3.org/Tools/respec/respec-w3c-common") {
networkRequest.changeUrl("https://www.w3.org/Tools/respec/respec-w3c-common");
}
};

page.onConsoleMessage = function (msg) {
if (msg.match(/^ERROR: /)) {
errors.push(msg);
Expand Down