title: Javascript toSource() method not working
body: <p>I'm getting a "Object doesn't support this property or method error", does anyone know why?</p>
  
  <p>I do have values plugged into userId, fname, lname, oname, sam, hasAccess</p>
  
  <pre><code>function Employee(id, fname, lname, oname, sam, access) {
      this.id = id;
      this.fname = fname;
      this.lname = lname;
      this.oname = oname
      this.sam = sam;
      this.access = access;
  }
  
  var emp = new Employee(userId, fname, lname, oname, sam, hasAccess);
  
  var jsonstuff = emp.toSource(); //Breaking here
  </code></pre>
  
  <p>Although this link says its possible <a href="http://www.w3schools.com/jsref/jsref_toSource_date.asp" rel="noreferrer">http://www.w3schools.com/jsref/jsref_toSource_date.asp</a></p>