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

Advanced Router - DocumentFragment() not supported in Safari and Firefox? #57

Open
itsMattShull opened this issue Sep 28, 2016 · 1 comment

Comments

@itsMattShull
Copy link
Contributor

I was having issues in Safari and Firefox when testing the Advanced Router. It wasn't firing the xhr but is was firing _showSpinner(). For some odd reason when I changed new DocumentFragment() to document.createElement('div') it works in all the browsers I tested.

I know that DocumentFragment has performance benefits so I attempted to do

if (new DocumentFragment()) {
    this._view = new DocumentFragment();
}
else {
    this._view = document.createElement('div');
}

This worked in Chrome but still didn't work in Safari or FF. It appears that DocumentFragment is well supported so I'm confused by the xhr won't fire in those browsers if DocumentFragment is being used. I've shown here where I've changed the code to work in the browsers. Anyone have a thought on why this occurs and possibly how to fix it?

@github-polymer-user
Copy link

For anyone willing to debug on their own lovly OS X and Safari, just add some browser polyfills:

  1. npm install bower && bower install webcompnentsjs (instuctions from http://webcomponents.org/)
  2. add <script src=""/browser/webcomponents-lite.min.js"></script> to the header section of the header.partial.html file
  3. add app use section app.use('/browser',express.static('./app/../bower_components/webcomponentsjs'));
  4. add extra -moz-, -webkit-, -o-webkit- CSS animation and/or html5shim.js as needed

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

No branches or pull requests

2 participants