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

'instanceof' throws when left-hand side is not QObject instance

    XMLWordPrintable

Details

    • All
    • ee8589dd9a681a469511308345e4ef0b304aaaab (qt/qtdeclarative/5.15)

    Description

      The 'instanceof' operator in QML engine throws unexpectedly comparing to browser behavior and the MDN document:

      // throw 'TypeError' in QML engine:
           null instanceof QtObject; // false
      undefined instanceof QtObject; // false
             {} instanceof QtObject; // false
             "" instanceof QtObject; // false
              9 instanceof QtObject; // false
           true instanceof QtObject; // false

      Attachments

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

        Activity

          People

            fabiankosmale Fabian Kosmale
            gpbeta Joshua GPBeta
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes