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
Feat(respecDocWriter): throw if not a ReSpec doc (closes #704) #708
Conversation
@tripu or @dontcallmedom, wdty? |
Argh! Need an emoji in there too! |
7ee41c5
to
f11711d
Compare
return document.readyState === "complete"; | ||
}) | ||
.evaluate(function(){ | ||
const selector = "script[src='https://www.w3.org/Tools/respec/respec-w3c-common']"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can't you test the presence of a ReSpec global (assuming there is still such a thing)?
Relying the the URL detection makes the tool more brittle (I know I've used it on locally hosted version of respec for instance)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll add that as first check. Problem is that I've seen people add ReSpec asycn. I'll add as first check:
if(document.hasOwnProperty("respectIsReady")){
return true;
}
c61c2d2
to
a41ad59
Compare
* Add check for respecIsReady on document object as first check * Added color + emoji * Fixed color of HTTP error also
a41ad59
to
0bfed3e
Compare
Even better with moar emoji... even @nrooney would approve. |
No description provided.