Strimoid/Strimoid

View on GitHub
resources/assets/riot/md-spoiler.html

Summary

Maintainability
Test Coverage
<element name="md-spoiler">
    <style>

    </style>
    <template>

    </template>
    <script>
        ({
            createdCallback: function() {
                this.spoiler = this.textContent;

                this.textContent = 'Pokaż ukrytą treść';

                this.addEventListener('click', this.clickHandler.bind(this), false);
            },
            clickHandler: function (e) {
                this.textContent = this.spoiler;
            }
        });
    </script>
</element>