JSFiddle - React, Tailwind, and code Playground

by ericf

HTML

<script src="http://yui.yahooapis.com/3.5.0pr4/build/yui/yui-min.js"></script>

JavaScript

YUI().use('view', function (Y) {

    Y.PieView = Y.Base.create('pieView', Y.View, [], {
        render: function () {
            var container = this.get('container');
            container.set('text', 'My ID is: ' + container.get('id'));
            
            return this;
        }
    }, {
        // Specify attributes and static properties for your View here.
        ATTRS: {
            // Override the default container attribute.
            container: {
                valueFn: function () {
                    return Y.Node.create('<div id="pie"/>');
                }
            }
        }
    });

    new Y.PieView().render().get('container').appendTo('body');
});