-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for workers #206
Conversation
This adds support for configuring reporting in worker scripts, and for generating reports from a worker context. Initialization of reporting endpoints is decoupled from fetch so that it can be referenced in HTML instead, when documents and workers are created.
@bakulf, FYI |
This move endpoint and report lists, as well as registered reporting observers to the relevant WindowOrWorkerGlobalScope.
index.src.html
Outdated
|
||
Each <a>document</a> has an <dfn for="document" export attribute>reports</dfn> | ||
list, which is a list of <a>reports</a>. | ||
To <dfn export>initialize a document or worker's endpoint list</dfn>, given a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be "initialize a global's endpoint list" perhaps?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm assuming the idea is to patch HTML to run this algorithm on global object creation?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that's in progress in whatwg/html#5470
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ping on
Should this be "initialize a global's endpoint list" perhaps?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be "initialize a global's endpoint list" perhaps?
I missed that one; that's a better name 👍
index.src.html
Outdated
1. Let |environment| be the <a spec=ecmascript lt=realm>ECMAScript global | ||
environment</a> associated with the <a>context object</a>. | ||
1. Let |global| be the <a spec=ecmascript>global object</a> of the <a | ||
spec=ecmascript>realm</a> associated with the <a>context object</a>. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can be Let |global| be the [=relevant global object=] of [=this=]
. (Although perhaps you should keep using "context object" for consistency for now, instead of "this".)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done. (Will switch to [=this=] soon)
index.src.html
Outdated
environment</a> associated with |observer|. | ||
4. If the size of |observer|'s <a>report queue</a> is 1: | ||
1. Let |global| be the <a spec=ecmascript>global object</a> of the <a | ||
spec=ecmascript>realm</a> associated with |observer|. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM modulo algorithm naming
index.src.html
Outdated
|
||
Each <a>document</a> has an <dfn for="document" export attribute>reports</dfn> | ||
list, which is a list of <a>reports</a>. | ||
To <dfn export>initialize a document or worker's endpoint list</dfn>, given a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ping on
Should this be "initialize a global's endpoint list" perhaps?
This adds support for configuring reporting in worker scripts, and for
generating reports from a worker context. Initialization of reporting endpoints
is decoupled from fetch so that it can be referenced in HTML instead, when
documents and workers are created.
Preview | Diff