ampproject / ampproject/worker-dom
Responsive Native Ads - Using .postMessage() API
- Dominant language
- TypeScript
- Stars
- 3.3k
- Forks
- 154
- PR merge metrics
- No merged PRs in 30d
Description
Hi,
Our current native ads setup is based on [this architecture](https://medium.com/@funkymusic/how-to-run-fully-responsive-doubleclick-native-ads-without-iframes-994affce9007) in order to ensure fully responsive native ads with website-like styles.
We create a template with the variables for the native advertisement, but we render no html at all. Instead, we take the variable and put them into a `.postMessage()` back to a server-side service. This will then in turn expose these variables as render props in the NativeAd React component, which lets the consuming application do whatever it wants with them, such as rendering a component.
Since this setup makes use of `.postMessage()`, will this API be compatible in the near future?
Alternatively, is there any workaround to communicate with our server-side service?
Many thanks,
Contributor guide
Research direction
Start by reviewing worker-dom's handling of the .postMessage() API and the NativeAd React component mentioned in the issue. Determine whether communication with the server-side service is supported or what compatibility requirements apply; the issue is complete only when the API compatibility or a documented workaround is established.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend, web-dev
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 15/100