Skip to content

Instantly share code, notes, and snippets.

@hatched
Last active December 16, 2015 15:59

Revisions

  1. hatched revised this gist Apr 25, 2013. 1 changed file with 6 additions and 6 deletions.
    12 changes: 6 additions & 6 deletions plugin.js
    Original file line number Diff line number Diff line change
    @@ -1,15 +1,15 @@
    YUI.add('testplugin', function(Y) {

    var MyPlugin = Y.Base.create('testplugin', Y.Plugin.Base, [], {
    objectProperty : {
    def1: "foo",
    def2: "bar"
    },


    initializer : function() {
    this.objectProperty = Y.Object.create(MyPlugin.prototype.objectProperty);
    this.objectProperty.name = 'nobody';
    this.objectProperty = {
    def1: "foo",
    def2: "bar"
    }
    }

    }, {
    NS : 'testplugin'
    });
  2. @nhusher nhusher revised this gist Apr 25, 2013. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion plugin.js
    Original file line number Diff line number Diff line change
    @@ -7,7 +7,7 @@ YUI.add('testplugin', function(Y) {
    },

    initializer : function() {
    this.objectProperty = Y.Object.create(MyPlugin.prototype);
    this.objectProperty = Y.Object.create(MyPlugin.prototype.objectProperty);
    this.objectProperty.name = 'nobody';
    }
    }, {
  3. @nhusher nhusher created this gist Apr 25, 2013.
    17 changes: 17 additions & 0 deletions plugin.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,17 @@
    YUI.add('testplugin', function(Y) {

    var MyPlugin = Y.Base.create('testplugin', Y.Plugin.Base, [], {
    objectProperty : {
    def1: "foo",
    def2: "bar"
    },

    initializer : function() {
    this.objectProperty = Y.Object.create(MyPlugin.prototype);
    this.objectProperty.name = 'nobody';
    }
    }, {
    NS : 'testplugin'
    });

    }, '0.0.1', {requires: ['base-build', 'plugin']});