Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!doctype html>
<html>
<head>
  <base href="https://polygit.org/components/">
  <script src="webcomponentsjs/webcomponents-lite.js"></script>
  <link rel="import" href="polymer/polymer.html">
</head>
<body>
  
  <dom-module id="my-parent">
    
    <template>
      <my-children on-content-changed="_contentChanged" large="[[large]]"></my-children>
    </template>
    <script>
      HTMLImports.whenReady(function() {
        Polymer({
          is: 'my-parent',
          
          properties: {
            
            large: {
              type: Object,
              value: {
                hello: {
                  my: {
                    friend: 'rob :P'
                  }
                }
              }
              
            }
            
          },
          
          _contentChanged: function(){
            
            console.log( this.large.hello.my.friend );
            
          }
          
        });
      });
    </script>
  </dom-module>
  <dom-module id="my-children">
    <template>
      <button type="button" on-tap="_handleTap">Click Me</button>
    </template>
  
    <script>
      HTMLImports.whenReady(function() {
        Polymer({
          is: 'my-children',
          properties: {
            
            large: {
              type: Object
            }
            
          },
          
          _handleTap: function(){
            
            this.large.hello.my.friend = 'paul';
            this.fire('content-changed');
            
          }
          
        });
      });
    </script>
  </dom-module>
  <my-parent></my-parent>
  
</body>
</html>
Output 300px

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

Dismiss x
public
Bin info
NicolasRannoupro
0viewers