Git Product home page Git Product logo

Comments (2)

ebidel avatar ebidel commented on May 3, 2024

I agree with the appropriate. 2 is the big one that simplifies things quit a bit. It means we dont need special logic at page load time to reconstruct the deep link.

It replicates what polymer-project.org does: https://github.com/Polymer/docs/blob/master/js/app.js#L79

There are two gotchas we ned to watch out for:

  1. Vulcanizing polymer elements. If we have separate vulcanized bundles for each page (we should for perf), any shared components used on multiple pages need to be moved to the main page's bundle and excluded from the subpage's vulcanized bundle. Otherwise, when you navigate back to a page, there will be a "x element has already been registered" error.

    We'd rely on the URL deduping of imports. For example, it's ok if the main page /app/elements/elements.vulcanized.html gets re-requested on page navigation. It'll be de-duped.

    This might be an interesting case for SW modifying responses.

  2. IIRC, custom elements in the xhr'd document are not upgraded. This means they won't have their correct prototype yet (e.g. can't access properties/methods). Example: https://github.com/Polymer/docs/blob/master/js/app.js#L137

from ioweb2015.

devnook avatar devnook commented on May 3, 2024

Fixed by implementing app/scripts/router.js

from ioweb2015.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.