Open
Bug 1410741
Opened 7 years ago
Updated 2 years ago
Logged Service workers events are stringified
Categories
(DevTools :: Console, defect, P3)
Tracking
(Not tracked)
UNCONFIRMED
People
(Reporter: heidi.kasemir, Unassigned)
References
()
Details
Attachments
(1 file)
512.40 KB,
image/png
|
Details |
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:58.0) Gecko/20100101 Firefox/58.0 Build ID: 20171022100058 Steps to reproduce: register a simple service worker on an app with the following contents: ``` self.addEventListener('fetch', function(event) { console.log(event.request); }); ``` Actual results: I see `[object Request] sw.js:5:3` logged for each request Expected results: I'd like to be able to expand and inspect this request object, as you can on chrome, (see screen shot with chrome on the left, firefox nightly on the right)
Updated•7 years ago
|
Component: Untriaged → Developer Tools: Console
Comment 1•7 years ago
|
||
So, this is not an issue with the Request object itself, since the following : > fetch("https://jsonplaceholder.typicode.com/posts").then(console.log) do print > Response { type: "basic", url: "https://jsonplaceholder.typicode.com/posts", redirected: false, status: 200, ok: true, statusText: "OK", headers: Headers, bodyUsed: false }
Comment 2•7 years ago
|
||
Steps to reproduce: 1. Go to https://devtools-html-simple-service-worker.glitch.me/ 2. Open the console Expected results: I see the Event objects logged from the Actual results: The console shows logs like : > I am installing. [object ExtendableEvent] The event object seems to be replaced by its `.toString()` equivalent. --- Here is the service worker code: self.addEventListener('install', event => { console.log('I am installing.', event); }); self.addEventListener('activate', event => { console.log('I am alive!', event); }); self.addEventListener('fetch', event => { console.log('Someone tried to fetch something. ☺️', event); });
Summary: allow inspecting Request objects in the console → Allow inspecting service workers events in the console
Comment 3•7 years ago
|
||
Comment 1 is erroneous, since I tested the response object. Here is a test for Request: > new Request("https://jsonplaceholder.typicode.com/posts") The Request object is displayed as expected
Updated•7 years ago
|
Priority: -- → P3
Updated•6 years ago
|
Product: Firefox → DevTools
Updated•5 years ago
|
Summary: Allow inspecting service workers events in the console → Logged Service workers events are stringified
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•