From e26e43b6311b936d5fb62c4c6d6b466e4a91c5bb Mon Sep 17 00:00:00 2001 From: Jeremy Rose Date: Tue, 9 Jan 2024 10:20:22 -0800 Subject: [PATCH] remove document-policy requirement --- README.md | 6 +----- index.html | 17 ----------------- 2 files changed, 1 insertion(+), 22 deletions(-) diff --git a/README.md b/README.md index fce843f..a3a012c 100644 --- a/README.md +++ b/README.md @@ -38,11 +38,7 @@ Finally, several other Web properties with large codebases have expressed intere ## API Overview -Before developers can make use of the profiler, they'll first have to signal to the UA that they wish to profile by exposing the `Document-Policy: js-profiling` header. - -> This header ensures that any UA-specific profiling overhead is incurred only on loads that may profile. - -Developers will then be able to spin up a new `profiler` via `new Profiler(options)`, where `options` contains the following required fields: +Developers can start a new profiler with `new Profiler(options)`, where `options` contains the following required fields: - `sampleInterval`: Target sample rate (in ms per sample) - The UA may choose a different sample rate than the one that the user requested (which must be the next lowest valid sampling interval). diff --git a/index.html b/index.html index 8c82897..1eccb37 100644 --- a/index.html +++ b/index.html @@ -245,7 +245,6 @@

new Profiler(options)

new Profiler(options) runs the following steps given an object options of type ProfilerInitOptions:
  1. If options' {{ProfilerInitOptions/sampleInterval}} is less than 0, throw a RangeError.
  2. -
  3. Get the policy value for "js-profiling" in the Document. If the result is false, throw a "NotAllowedError" DOMException.
  4. Create a new profiling session where:
    1. The associated sample interval is set to either ProfilerInitOptions.sampleInterval OR the next lowest interval supported by the UA.
    2. @@ -356,22 +355,6 @@

      The ProfilerInitOptions dictionary

    3. maxBufferSize is the desired sample buffer size limit, in samples.
    4. -
      -

      Document Policy

      -

      - This spec defines a configuration point in Document Policy with name js-profiling. Its type is boolean with default value false. -

      -

      - Document policy is leveraged to give UAs the ability to avoid storing - required metadata for profiling when the document does not explicitly - request it. While this metadata could conceivably be generated in - response to a profiler being started, we store this bit on the document - in order to signal to the engine as early as possible (as profiling early - in page load is a common use case). This overhead may be non-trivial - depending on the implementation, and therefore we default to - false. -

      -

      Automation