Giter VIP home page Giter VIP logo

ccm's People

Contributors

akless avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

ccm's Issues

[Feature Request]: function ccm.helper.svg

It could be useful to have a helper-function like ccm.helper.html, which transforms and replaces placeholders (recursive) from SVG (from ccm SVG data, String, ...) to a SVG Element

ccm-loading does not disappear

In my component, the cc-loading indicator is visible all the time. This is my code:

(() => {
    const component = {
        name: 'counter-kh',
        ccm: 'https://ccmjs.github.io/ccm/ccm.js',
        config: {
            css: ['ccm.load', '']
        },
        Instance: function () {
            let clicks = 0;
            let count = 0;

            const countDisplay = document.createElement('p');
            const clicksDisplay = document.createElement('p');

            const incrementButton = document.createElement('button');
            const decrementButton = document.createElement('button');
            incrementButton.innerText = '+';
            decrementButton.innerText = '-';
            incrementButton.onclick = () => {clicks++; count++; this.update();};
            decrementButton.onclick = () => {clicks++; count--; this.update();};

            this.update = () => {
                countDisplay.innerText = `count: ${count}`;
                clicksDisplay.innerText = `clicks: ${clicks}`;
            };

            this.start = async () => {
                this.update();
                this.element.appendChild(countDisplay);
                this.element.appendChild(clicksDisplay);
                this.element.appendChild(incrementButton);
                this.element.appendChild(decrementButton);
            };
        }
    };
    let b = "ccm." + component.name + (component.version ? "-" + component.version.join(".") : "") + ".js"; if (window.ccm && null === window.ccm.files[b]) return window.ccm.files[b] = component; (b = window.ccm && window.ccm.components[component.name]) && b.ccm && (component.ccm = b.ccm); "string" === typeof component.ccm && (component.ccm = { url: component.ccm }); let c = (component.ccm.url.match(/(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)/) || ["latest"])[0]; if (window.ccm && window.ccm[c]) window.ccm[c].component(component); else { var a = document.createElement("script"); document.head.appendChild(a); component.ccm.integrity && a.setAttribute("integrity", component.ccm.integrity); component.ccm.crossorigin && a.setAttribute("crossorigin", component.ccm.crossorigin); a.onload = function () { window.ccm[c].component(component); document.head.removeChild(a) }; a.src = component.ccm.url }
})();

image

TypeError in Firefox when loading CCM

  • The same loading procedure works fine in Vivaldi (Chromium based)
  • Firefox version: 64.0.2

screenshot

Edit: I have seen this deprecation message for a while in Vivaldi, maybe it's relevant?

screenshot

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.