code: function () {
        var orientation = $.orientation()
          , value = null;
        switch (orientation) {
          case UIA_DEVICE_ORIENTATION_UNKNOWN:
          case UIA_DEVICE_ORIENTATION_FACEUP:
          case UIA_DEVICE_ORIENTATION_FACEDOWN:
            value = "UNKNOWN";
            break;
          case UIA_DEVICE_ORIENTATION_PORTRAIT:
          case UIA_DEVICE_ORIENTATION_PORTRAIT_UPSIDEDOWN:
            value = "PORTRAIT";
            break;
          case UIA_DEVICE_ORIENTATION_LANDSCAPELEFT:
          case UIA_DEVICE_ORIENTATION_LANDSCAPERIGHT:
            value = "LANDSCAPE";
            break;
        }
        if (value !== null) {
          return value;
        } else {
          throw new ERROR.UnknownError('Unsupported Orientation: ' + orientation);
        }
      }
docs: Screen-related functions