ampproject / ampproject/amphtml

[amp-script]Allow 'amp-script' to appear in descendants of 'amp-script'

Open
#35,468 1 comment 0 reactions 0 assignees View on GitHub
Component: amp-script Stale Type: Feature Request
Dominant language
JavaScript
Stars
14.9k
Forks
4.1k
PR merge metrics
No merged PRs in 30d

Description

### Description

I added custom javascript to a component with amp-script.
In addition, I wanted to use amp-script to add custom javascript to a more extensive dom containing that component, but I got the following error.
> The tag 'amp-script' may not appear as a descendant of tag 'amp-script'.

Please consider allowing amp-script descendants to have amp-script.

### Alternatives Considered

none

### Additional Context

_No response_

Contributor guide

Open the contributing guide

Research direction

No files or tests are identified in the issue. Start by locating the validation that emits the nested amp-script error and determine the intended behavior for descendant components. Done should include support for the requested nesting and coverage proving that valid descendants are accepted.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.