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

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

XMLWordPrintable

    • Windows
    • 2e8acbdf1 (dev), e2952a1e8 (6.8), 45637f5ec (6.7), cbfc77783 (tqtc/lts-6.5)

      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 

       

       

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

            fabiankosmale Fabian Kosmale
            saintown saintown
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes