Skip to content

Commit b433ca6

Browse files
committed
Remove Full Flex parsing from header validator
1 parent 41dc262 commit b433ca6

File tree

12 files changed

+9
-666
lines changed

12 files changed

+9
-666
lines changed

ts/src/flexible-event/main.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,6 @@ if (options.json_file !== undefined) {
101101
const [{ errors, warnings }, source] = validateSource(json, {
102102
vsv: vsv.Chromium,
103103
sourceType: options.source_type,
104-
fullFlex: true,
105104
})
106105
warnings.forEach((i) => logIssue('W', i))
107106
if (errors.length > 0) {

ts/src/header-validator/index.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,6 @@ <h1>Attribution Reporting Header Validation</h1>
8484
<p><label><input type=radio name=header value=eligible><code>Attribution-Reporting-Eligible</code></label>
8585
<p><label><input type=radio name=header value=info><code>Attribution-Reporting-Info</code></label>
8686
<p><label><input type=checkbox checked disabled>Use Chromium's vendor-specific values</label> <a href="https://github.com/WICG/attribution-reporting-api/blob/main/params/chromium-params.md" target=_blank>(details)</a>
87-
<p><label><input type=checkbox name=flex>Enable experimental Flexible Event fields</label> <a href="https://github.com/WICG/attribution-reporting-api/blob/main/flexible_event_config.md" target=_blank>(details)</a>
8887
</fieldset>
8988
<fieldset id=output>
9089
<legend>Validation Result</legend>

ts/src/header-validator/index.ts

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -22,34 +22,27 @@ const sourceTypeFieldset =
2222
document.querySelector<HTMLFieldSetElement>('#source-type')!
2323
const effective = document.querySelector('#effective')!
2424

25-
const flexCheckbox = form.elements.namedItem('flex') as HTMLInputElement
26-
2725
function sourceType(): SourceType {
2826
return parseSourceType(sourceTypeRadios.value)
2927
}
3028

3129
function validate(): void {
3230
sourceTypeFieldset.disabled = true
33-
flexCheckbox.disabled = true
3431

3532
let v: validator.Validator<unknown>
3633

3734
switch (headerRadios.value) {
3835
case 'source':
3936
sourceTypeFieldset.disabled = false
40-
flexCheckbox.disabled = false
4137
v = source.validator({
4238
vsv: vsv.Chromium,
4339
sourceType: sourceType(),
44-
fullFlex: flexCheckbox.checked,
4540
noteInfoGain: true,
4641
})
4742
break
4843
case 'trigger':
49-
flexCheckbox.disabled = false
5044
v = trigger.validator({
5145
vsv: vsv.Chromium,
52-
fullFlex: flexCheckbox.checked,
5346
})
5447
break
5548
case 'os-source':
@@ -99,8 +92,6 @@ document.querySelector('#linkify')!.addEventListener('click', () => {
9992
url.searchParams.set('source-type', sourceType())
10093
}
10194

102-
url.searchParams.set('flex', flexCheckbox.checked.toString())
103-
10495
void navigator.clipboard.writeText(url.toString())
10596
})
10697

@@ -136,6 +127,4 @@ if (st !== null && st in SourceType) {
136127
}
137128
sourceTypeRadios.value = st
138129

139-
flexCheckbox.checked = params.get('flex') === 'true'
140-
141130
validate()

ts/src/header-validator/main.ts

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ interface Arguments {
1111
input?: string
1212
file?: string
1313

14-
fullFlex: boolean
1514
sourceType?: SourceType
1615

1716
silent: boolean
@@ -43,11 +42,6 @@ const options = parse<Arguments>(
4342
'If present, parse input as a source. Otherwise, parse as a trigger.',
4443
},
4544

46-
fullFlex: {
47-
type: Boolean,
48-
description: 'If true, parse experimental Full Flexible Event fields.',
49-
},
50-
5145
silent: {
5246
type: Boolean,
5347
description: 'If true, suppress output.',
@@ -94,11 +88,9 @@ const out = validate<unknown>(
9488
options.sourceType === undefined
9589
? trigger.validator({
9690
vsv: vsv.Chromium,
97-
fullFlex: options.fullFlex,
9891
})
9992
: source.validator({
10093
vsv: vsv.Chromium,
101-
fullFlex: options.fullFlex,
10294
sourceType: options.sourceType,
10395
})
10496
)

0 commit comments

Comments
 (0)