garris / garris/BackstopJS

Custom Elements v1 + BackstopJS + PhantomJS

Open
#309 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
7.2k
Forks
621
PR merge metrics
No merged PRs in 30d

Description

Hey folks,

I'm currently building a web component library that's using the [Custom Elements v1 spec](https://developers.google.com/web/fundamentals/getting-started/primers/customelements). I've got a demo page that loads in some of my components, and I'm running `$ backstop reference` to generate the initial screenshots. However when PhantomJS is taking the screenshots it isn't initialising the custom elements.

I've tried using `readyEvent` and `delay` but with no luck. My demo page currently has a code block on similar to this, but :

```
window.customElements
.whenDefined('custom-element')
.then(function() {
console.log('backstopjs_ready');
})
```

When running my demo page in Chrome (v53), the above code block executes as expected, and I get `backstopjs_ready` logged to the console.

Has anyone had any experience with BackstopJS + Custom Elements?

Some other details:
`phantomjs -v`: 2.1.1
`backstop -v`: BackstopJS 2.0.4

Thanks!

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.