paper-input

http://stackoverflow.com/questions/27577669/polymer-paper-input-element-not-rendering

by H17737

HTML

<script src="https://www.polymer-project.org/1.0/components/webcomponentsjs/webcomponents.js"></script>
<link rel="import" href="http://www.polymer-project.org/1.0/components/polymer/polymer.html">
<link rel="import" href="http://www.polymer-project.org/1.0/components/paper-input/paper-input.html">
<paper-input></paper-input>

JavaScript

var elements = [];

function listAllEventListeners() {
  const allElements = shadowRoot.querySelectorAll('*');
  const types = [];
  for (let ev in window) {
    if (/^on/.test(ev)) types[types.length] = ev;
  }

  for (let i = 0; i < allElements.length; i++) {
    const currentElement = allElements[i];
    for (let j = 0; j < types.length; j++) {
      if (typeof currentElement[types[j]] === 'function') {
        elements.push({
          "node": currentElement,
          "listeners": [ {
            "type": types[j],
            "func": currentElement[types[j]].toString(),
          }]
        });
      }
    }
  }

  return elements.filter(element => element.listeners.length)
};

var recursiveWalk = function (node, func) {
    var done = func(node);
    if (done) {
        return true;
    }
 
    if ('shadowRoot' in node &&  node.shadowRoot) {
        
        var done = recursiveWalk(node.shadowRoot, func);
        if (done) {
            return true;
        }
    }
    node = node.firstChild;

    while (node) {
		    listAllEventListeners()
        var done = recursiveWalk(node, func);
        if (done) {
            return true;
        }
        node = node.nextSibling;
    }
}
document.addEventListener('polymer-ready', function() {
    recursiveWalk(document.body, function (node) {
        console.log(node.nodeName);
    });
})