Skip to content

Define parallel activation for attribution#413

Open
martinthomson wants to merge 3 commits intomainfrom
activation
Open

Define parallel activation for attribution#413
martinthomson wants to merge 3 commits intomainfrom
activation

Conversation

@martinthomson
Copy link
Copy Markdown
Member

@martinthomson martinthomson commented Apr 29, 2026

This replicates much of the logic for transient activation, but rather than tracking the state on each Window, this tracks it in the top-level traversable (think browser tab).

The explanation is longer than the algorithms, but hopefully that means I don't need to repeat the rationale here.

I've gone with a bit of an unconventional method for monkey-patching the navigate algorithm. I think that this is more robust than the normal method of identifying concrete steps. I'd be interested in feedback on whether this is more comprehensible than other monkey-patching approaches. I despise monkey patching, but it seems unavoidable given the architecture of the specifications involved; hence my desire to find something less repugnant.

Closes #378.


Preview | Diff

This replicates much of the logic for transient activation, but rather
than tracking the state on each Window, this tracks it in the top-level
traversable (think browser tab).

The explanation is longer than the algorithms, but hopefully that means
I don't need to repeat the rationale here.

I've gone with a bit of an unconventional method for monkey-patching the
navigate algorithm.  I think that this is more robust than the normal
method of identifying concrete steps.  I'd be interested in feedback on
whether this is more comprehensible than other monkey-patching
approaches. I despise monkey patching, but it seems unavoidable given
the architecture of the specifications involved; hence my desire to find
something less repugnant.

Closes #378.
Comment thread api.bs Outdated
@martinthomson martinthomson requested a review from bmcase April 29, 2026 09:05
Comment thread api.bs Outdated
Comment thread api.bs Outdated
Comment thread api.bs Outdated
Comment thread api.bs Outdated
Comment thread api.bs
Co-authored-by: Andrew Paseltiner <apaseltiner@google.com>
Copy link
Copy Markdown
Collaborator

@apasel422 apasel422 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM but @bmcase should review too.

Comment thread api.bs
This should be no less than the [=transient activation duration=],
though a larger value
might be advisable to ensure that delays from [=navigate|navigation=]
do not cause the Attribution API to become inaccessible.
Copy link
Copy Markdown
Contributor

@bmcase bmcase May 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think when we had discussed and drafted something for user activation before, it was that case that when there was a user initiated navigation to a site the API would remain activated for that site at least for that session (with some site level enabled flag). Is that changing if the duration is the same as the transient activation duration which is only a few seconds?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

HTML's user activation modes don't work for us Resetting the global attribution API flag

3 participants