(self)
| 250 | |
| 251 | @property |
| 252 | def frame(self) -> "Frame": |
| 253 | if not self._initializer.get("frame"): |
| 254 | raise Error("Service Worker requests do not have an associated frame.") |
| 255 | frame = cast("Frame", from_channel(self._initializer["frame"])) |
| 256 | if not frame._page: |
| 257 | raise Error( |
| 258 | "\n".join( |
| 259 | [ |
| 260 | "Frame for this navigation request is not available, because the request", |
| 261 | "was issued before the frame is created. You can check whether the request", |
| 262 | "is a navigation request by calling isNavigationRequest() method.", |
| 263 | ] |
| 264 | ) |
| 265 | ) |
| 266 | return frame |
| 267 | |
| 268 | def is_navigation_request(self) -> bool: |
| 269 | return self._initializer["isNavigationRequest"] |
nothing calls this directly
no test coverage detected