Add JSON resource type
Added in Qt 6.8, documented as:
a JSON module (import ... with { type: "json" })
See #8242
This commit is contained in:
parent
4d5ed99ff5
commit
d7328af221
|
|
@ -109,6 +109,7 @@ class RequestInterceptor(QWebEngineUrlRequestInterceptor):
|
|||
}
|
||||
new_types = {
|
||||
"WebSocket": interceptors.ResourceType.websocket, # added in Qt 6.4
|
||||
"Json": interceptors.ResourceType.json, # added in Qt 6.8
|
||||
}
|
||||
for qt_name, qb_value in new_types.items():
|
||||
qt_value = getattr(
|
||||
|
|
|
|||
|
|
@ -96,6 +96,7 @@ _RESOURCE_TYPE_STRINGS = {
|
|||
ResourceType.preload_main_frame: "other",
|
||||
ResourceType.preload_sub_frame: "other",
|
||||
ResourceType.websocket: "websocket",
|
||||
ResourceType.json: "other",
|
||||
ResourceType.unknown: "other",
|
||||
None: "",
|
||||
}
|
||||
|
|
|
|||
|
|
@ -40,6 +40,7 @@ class ResourceType(enum.Enum):
|
|||
# 18 is "preload", deprecated in Chromium
|
||||
preload_main_frame = 19
|
||||
preload_sub_frame = 20
|
||||
json = 21
|
||||
websocket = 254
|
||||
unknown = 255
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue