title: access qml element from javascript
body: <p>Please, is it possible to access and change a property of a qml element from javascript function? I read that document.getElementById() should do the trick, but when I try that I get: </p>
  
  <blockquote>
    <p>ReferenceError: document is not defined</p>
  </blockquote>
  
  <p>Test.qml</p>
  
  <pre><code>import QtQuick 2.0
  import QtQuick.Controls 1.2
  import Test.js as JS 
  
  Rectangle{
      id: rect
      color: "red"
  
      onClicked: {
          JS.changeMe();
      }
  }
  </code></pre>
  
  <p>Test.js</p>
  
  <pre><code>function changeMe(){
     //change the color of element "rect"
     //document.getElementById("rect")
  }
  </code></pre>