Git Product home page Git Product logo

core-shared-lib's Introduction

core-shared-lib's People

Contributors

addyosmani avatar bamnet avatar dfreedm avatar ebidel avatar frankiefu avatar luizarmesto avatar mchmielarski avatar sorvell avatar tjsavage avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

core-shared-lib's Issues

No script to insert before

in core-shared-lib.html

addScript: function (src) {
                    var script = document.createElement('script');
                    script.src = src;
                    script.onerror = this.error.bind(this);
                    var s = document.querySelector('script');
                        s.parentNode.insertBefore(script, s);
                    this.script = script;
                }

In certain situations "s" will be null, was bitten by this and was able to fix it by checking s and inserting into the body.

addScript: function (src) {
                    var script = document.createElement('script');
                    script.src = src;
                    script.onerror = this.error.bind(this);
                    var s = document.querySelector('script');
                    if (s)
                        s.parentNode.insertBefore(script, s);
                    else
                        document.body.appendChild(script);
                    this.script = script;
                }

Add a core-shared-lib-error event

The component has an error event listener on the <script> that gets loaded, but that error listener is just used to trigger cleanup(). It would be nice if this element fire()d a core-shared-lib-error event indicating when there was a failure to load, to go along with the event it fires when loading is complete.

Adding async to script tag

Why did you choose to not include "async" on the script tag? Was there a purposeful reason that is specific to web components?

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.