Skip to content

amp-script nodom has no access to amp-state #32984

@dritter

Description

@dritter

Hi there,

TBH, I am not sure if this is a Bug, or on purpose (and not documented). I noticed that amp-script with nodom attribute has no access to amp-state.
The documentation about nodom says that with nodom it is not allowed to make DOM modifications, but in my Case I just wanted to read out the current state (so no modification). If this is on purpose, it should be clearly documented.

Testcase in Playground. Just open your dev console, and you'll see that the scripts with nodom cannot access the amp-state.

image

Which AMP version is affected?

At least 2101300534005, but probably all versions are affected.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions