Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width">
  <title>JS Bin</title>
  
  <base href="http://polygit.org/components/">
  <link href="polymer/polymer.html" rel="import">
</head>
<body>
  <dom-module id="my-wrapper">
    <template>
      <span id="placeholder"></span>
    </template>
    <script>
      Polymer({
        is: 'my-wrapper',
        ready: function() {
          var self = this;
          Polymer.dom(Polymer.dom(this)).observeNodes(function(info) {
            self.$.placeholder.textContent = info.target.textContent.toUpperCase();
          });
          
          /*var mutationObserver = new MutationObserver(function(e) {
            console.log(e);
          });
          
          mutationObserver.observe(this.root, {characterData: true, childList: true});*/
        },
      });
    </script>
  </dom-module>
  
  <template is="dom-bind">
    <input type="text" value="{{test::input}}" />
    
    <ul>
      <li>Plain binding: [[test]]</li>
      <li>Custom wrapper binding: <my-wrapper>[[test]]</my-wrapper></li>
      <li>Custom wrapper static text: <my-wrapper>Hello, World!</my-wrapper></li>
    </ul>
  </template>
</body>
</html>
Output

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
anonymouspro
0viewers