var view = require('./view');

var proto = Object.create(HTMLElement.prototype);
proto.createdCallback = function() {
  this.view = view(this);
};

document.registerElement('bare-select', {prototype: proto});

@@ -1,16 +1,27 @@
 var view
+Constructor
  = requi
@@ -43,59 +43,554 @@
 var 
-proto = Object.create(HTMLElement.prototype);%0Aproto
+executed = false;%0A%0A /**%0A  * Create the element%E2%80%99s prototype%0A  *%0A  * @param  %7BObject%7D  %5Boptions=%7B%7D%5D%0A  *   Options passed from %60bareSelect%60.%0A  *%0A  * @function  proto%0A  * @api       private%0A  */%0Afunction proto(options) %7B%0A%0A  // Read options.%0A  if (!options) options = %7B%7D;%0A  var plugins = (%0A    Array.isArray(options.plugins) && options.plugins %7C%7C%0A    %5B%5D%0A  );%0A  var logger = options.logger %7C%7C console;%0A%0A  // Create the prototype.%0A  var result = Object.create(HTMLElement.prototype);%0A%0A  // Enclose all properties within the constructor function%0A  result
 .cre
@@ -616,43 +616,1658 @@
 tion
+ createdCallback
 () %7B%0A
+%0A
   
-this.view = view(this);%0A%7D;%0A%0A
+  // Initialize the %60view%60.%0A    var view = this.view = viewConstructor(this);%0A%0A    // Add the method %60registerPlugin%60 and register default plugins.%0A    var registeredPlugins = %5B%5D;%0A    var registerPlugin = this.registerPlugin = function(plugin) %7B%0A      if (typeof plugin !== 'function') return logger.warn('bare-select: ' +%0A        'Can%E2%80%99t register plugin %E2%80%93 it%E2%80%99s not a function.',%0A        '%5CnPlugin:',%0A        plugin%0A      );%0A      registeredPlugins.push(plugin(%7B%0A        view: view,%0A        logger: logger,%0A      %7D));%0A    %7D;%0A    plugins.forEach(registerPlugin);%0A%0A    // Define a read-only property %60plugins%60.%0A    Object.defineProperty(this, 'plugins', %7B%0A      get: function() %7Breturn registeredPlugins.slice();%7D%0A    %7D);%0A  %7D;%0A%0A  // Return the prototype.%0A  return result;%0A%7D%0A%0A /**%0A  * Create the element%E2%80%99s prototype%0A  *%0A  * @param  %7BObject%7D      %5Boptions=%7B%7D%5D%0A  * @param  %7BFunction%5B%5D%7D  %5Boptions.plugins=%5B%5D%5D%0A  *   Default plugins. They%E2%80%99ll be registered on any newly created %3Cbare-select%3E%0A  *   element.%0A  * @param  %7BObject%7D      %5Boptions.logger=console%5D%0A  *   A custom logger, implementing the interface of %60console%60.%0A  * @param  %7BFunction%7D    %5Boptions.logger.warn%5D%0A  * @param  %7BFunction%7D    %5Boptions.logger.info%5D%0A  *%0A  * @module    bare-select%0A  * @function  default%0A  * @alias     bareSelect%0A  */%0Amodule.exports = function bareSelect(options) %7B%0A  if (!options) options = %7B%7D;%0A  var logger = options.logger %7C%7C console;%0A%0A  // Only allow to register the element once.%0A  if (executed) return logger.warn('bare-select: ' +%0A    'The initialization function can only be called once.'%0A  );%0A  executed = true;%0A%0A  // Register the element.%0A  
 docu
@@ -2301,16 +2301,20 @@
 select',
+%0A   
  %7Bprotot
@@ -2323,12 +2323,27 @@
 e: proto
+(options)%7D%0A  );%0A
 %7D
-)
 ;%0A

Initialize the library, accept settings [#6773]