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

Feat(respecDocWriter): throw if not a ReSpec doc (closes #704) #708

Merged
merged 1 commit into from Apr 21, 2016

Conversation

marcoscaceres
Copy link
Member

No description provided.

@marcoscaceres
Copy link
Member Author

@tripu or @dontcallmedom, wdty?

@marcoscaceres
Copy link
Member Author

I'll make it look like this:

screenshot 2016-04-22 02 02 32

@marcoscaceres
Copy link
Member Author

Argh! Need an emoji in there too!

return document.readyState === "complete";
})
.evaluate(function(){
const selector = "script[src='https://www.w3.org/Tools/respec/respec-w3c-common']";
Copy link
Member

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)

Copy link
Member Author

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;
          }

@marcoscaceres marcoscaceres force-pushed the bug_704_stop_on_norespec branch 2 times, most recently from c61c2d2 to a41ad59 Compare April 21, 2016 16:42
 * Add check for respecIsReady on document object as first check
 * Added color + emoji
 * Fixed color of HTTP error also
@marcoscaceres
Copy link
Member Author

Even better with moar emoji... even @nrooney would approve.

screenshot 2016-04-22 02 57 30

@marcoscaceres marcoscaceres merged commit 8beee33 into develop Apr 21, 2016
marcoscaceres added a commit that referenced this pull request Apr 21, 2016
* develop:
  v3.2.120
  Feat(respecDocWriter): throw if not a ReSpec doc (closes #704) (#708)
@marcoscaceres marcoscaceres deleted the bug_704_stop_on_norespec branch May 6, 2016 06:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants