<commit_before><html>

<head>
  <script type="text/javascript" src="../webduino-js/src/module/IRLed.js"></script>
</head>

<body>
  <script>
  (function() {
    var proto = Object.create(HTMLElement.prototype, {
      encode: {
        get: function() {
          return this.getAttribute('encode');
        },
        set: function(val) {
          this.setAttribute('encode', val);
        }
      },
      initsend: {
        get: function() {
          return this.getAttribute('initsend');
        },
        set: function(val) {
          this.setAttribute('initsend', val);
        }
      }
    });

    proto.init_ = function(board) {
      var observer, config, IRLed = webduino.module.IRLed;
      this.irled = new IRLed(board, this.encode);
      
      if (this.initsend === 'true') {
        this.send();
      }
    };

    proto.send = function() {
      this.irled.send();
    };

    document.registerElement('wa-irled', {
      prototype: proto
    });

  })();
  </script>
</body>

</html><commit_msg>Fixed bug: send method in irled.<commit_after><html>

<head>
  <script type="text/javascript" src="../webduino-js/src/module/IRLed.js"></script>
</head>

<body>
  <script>
  (function() {
    var proto = Object.create(HTMLElement.prototype, {
      encode: {
        get: function() {
          return this.getAttribute('encode');
        },
        set: function(val) {
          this.setAttribute('encode', val);
        }
      },
      initsend: {
        get: function() {
          return this.getAttribute('initsend');
        },
        set: function(val) {
          this.setAttribute('initsend', val);
        }
      }
    });

    proto.init_ = function(board) {
      var observer, config, IRLed = webduino.module.IRLed;
      this.irled = new IRLed(board, this.encode);
      
      if (this.initsend === 'true') {
        this.send();
      }
    };

    proto.send = function(code) {
      code = code || this.encode;
      this.irled.send(code);
    };

    proto.attributeChangedCallback = function(attrName, oldVal, newVal) {
      if (this.irled) {
        switch (attrName) {
          case 'encode':
            this.irled.updateEncode(newVal);
            break;
        }
      }
    };

    document.registerElement('wa-irled', {
      prototype: proto
    });

  })();
  </script>
</body>

</html>
{'fraction_non_alphanumeric': 0.1621160409556314, 'fraction_numerical': 0.0, 'mean_word_length': 1.934918648310388, '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': '861404', 'n_tokens_mistral': 754, 'n_tokens_neox': 742, 'n_words': 127}