HS: disable-scripting security attribute (+1 test)
Add hs-scripting-disabled? helper that walks the ancestor chain checking for the disable-scripting attribute. Guard hs-activate! with this check. Add disable-scripting to generator BOOL_ATTRS so the attribute is emitted in generated test setup code. Regen'd spec. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -399,7 +399,8 @@ def parse_html(html):
|
||||
'children': [], 'parent_idx': None
|
||||
}
|
||||
BOOL_ATTRS = {'checked', 'selected', 'disabled', 'multiple',
|
||||
'required', 'readonly', 'autofocus', 'hidden', 'open'}
|
||||
'required', 'readonly', 'autofocus', 'hidden', 'open',
|
||||
'disable-scripting'}
|
||||
for name, val in attrs:
|
||||
if name == 'id': el['id'] = val
|
||||
elif name == 'class': el['classes'] = (val or '').split()
|
||||
|
||||
Reference in New Issue
Block a user