Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-112320

javascript engine: Proxy handler.get() doesn't work on field 'name'

    XMLWordPrintable

Details

    • Windows

    Description

      function test_proxy() {

              let base =

      {             id: 'baseid',             name: 'basename',             type: 'basetype'         }

              let handler = {
                  get: function(ao, prop)

      {                 return Reflect.get(ao, prop);             }

              }

              let r = new Proxy(base, handler);

              // these fields work fine except 'name' shown later...
              console.info("xx", r.id);
              console.info("xx", r.type);

              // r.name is supposed to be 'basename', but got empty string always.
              console.info("xx", r.name);
      }

       

      ===== output =====

      qml: xx baseid
      qml: xx basetype
      qml: xx 

       

       

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            qtqmlteam Qt Qml Team User
            saintown saintown
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes