<commit_before><!-- this applies to Light DOM elements, so lives outside the template -->
<link rel="stylesheet" href="/stylesheets/designer-element.css">
<polymer-element name="ceci-element" extends="ceci-element-base">
  <template id="ceci-element">
    <style>
      :host {
        position: relative;
      }
    </style>
    <content></content>
  </template>
  <script>
    Polymer('ceci-element', {
      ready: function() {
        this.super();
        this.classList.add("brick");

        // Just to preserve "this" for event handlers
        this._cleanUp = this.cleanUp.bind(this);
        this._cloneBrick = this.cloneBrick.bind(this);
      },
      broadcast: function(name, data) {
        this.super(arguments);
        var broadcastElement = this.querySelector('ceci-broadcast[from="' + name + '"]');
        if (broadcastElement) {
          this.log(broadcastElement.on, 'broadcasts', name);
          var broadcastDetails = {
            channel : broadcastElement.on,
            handler : name,
            data: data ? data : this.gettext(this.localName + "-component/attributes/" + name) || name
          };
          this.dispatchEvent(new CustomEvent('broadcastFired', {name: name, bubbles: true, detail: broadcastDetails}));
        }
      },
      log: function(eventChannel, eventType, eventName) {
        var message = {};
        message.component = this.tagName.substr(5);
        message.eventChannel = eventChannel;
        message.eventType = eventType;
        message.eventName = eventName;
        this.dispatchEvent(new CustomEvent('log', {bubbles: true, detail: message}));
      },
      cloneBrick : function(){
        var clone = this.cloneNode();
        clone.applyDefaults();
        var next = this.nextSibling;
        if(next){
          this.parentNode.insertBefore(clone,next);
        } else {
          this.parentNode.appendChild(clone);
        }
        this.classList.remove("selected");
        document.dispatchEvent(new CustomEvent('CeciElementAdded', {bubbles: true, detail: clone}));
      },
      cleanUp: function () {<commit_msg>fix channel fix broadcast defaults too<commit_after><!-- this applies to Light DOM elements, so lives outside the template -->
<link rel="stylesheet" href="/stylesheets/designer-element.css">
<polymer-element name="ceci-element" extends="ceci-element-base">
  <template id="ceci-element">
    <style>
      :host {
        position: relative;
      }
    </style>
    <content></content>
  </template>
  <script>
    Polymer('ceci-element', {
      ready: function() {
        this.super();
        this.classList.add("brick");

        // Just to preserve "this" for event handlers
        this._cleanUp = this.cleanUp.bind(this);
        this._cloneBrick = this.cloneBrick.bind(this);
      },
      broadcast: function(name, data) {
        this.super(arguments);
        var broadcastElement = this.querySelector('ceci-broadcast[from="' + name + '"]');
        if (broadcastElement) {
          this.log(broadcastElement.on, 'broadcasts', name);
          if (data === undefined) {
            data = this.gettext(this.localName + "-component/attributes/" + name) || name;
          }
          var broadcastDetails = {
            channel : broadcastElement.on,
            handler : name,
            data: data
          };
          this.dispatchEvent(new CustomEvent('broadcastFired', {name: name, bubbles: true, detail: broadcastDetails}));
        }
      },
      log: function(eventChannel, eventType, eventName) {
        var message = {};
        message.component = this.tagName.substr(5);
        message.eventChannel = eventChannel;
        message.eventType = eventType;
        message.eventName = eventName;
        this.dispatchEvent(new CustomEvent('log', {bubbles: true, detail: message}));
      },
      cloneBrick : function(){
        var clone = this.cloneNode();
        clone.applyDefaults();
        var next = this.nextSibling;
        if(next){
          this.parentNode.insertBefore(clone,next);
        } else {
          this.parentNode.appendChild(clone);
        }
        this.classList.remove("selected");
        document.dispatchEvent(new CustomEvent('CeciElementAdded', {bubbles: true, detail: clone}));
      },
      cleanUp: function () {
{'fraction_non_alphanumeric': 0.13509099393373775, 'fraction_numerical': 0.0004666355576294914, 'mean_word_length': 2.465642683912692, 'pattern_counts': {'":': 0, '<': 23, '<?xml version=': 0, '>': 23, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4328361', 'n_tokens_mistral': 1188, 'n_tokens_neox': 1185, 'n_words': 248}