Skip to content

Commit d5dce51

Browse files
committed
update documentation
1 parent 326bd70 commit d5dce51

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

ads/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -279,13 +279,13 @@ documentation with the new behaviors on user's consent choices. You can refer to
279279

280280
#### JS reuse across iframes
281281

282-
To allow ads to bundle HTTP requests across multiple ad units on the same page the object `window.context.master` will contain the window object of the iframe being elected master iframe for the current page. The `window.context.isMaster` property is `true` when the current frame is the master frame.
282+
To allow ads to bundle HTTP requests across multiple ad units on the same page, use `window.context.coordinator` to access the coordinating iframe window object, and `window.context.isCoordinator` to check if the current frame is the coordinating frame.
283283

284-
**Note:** Preferred alternatives are available as `window.context.coordinator` and `window.context.isCoordinator` respectively.
284+
_Note: The legacy properties `window.context.master` and `window.context.isMaster` are still available for backward compatibility._
285285

286-
The `computeInMasterFrame` function is designed to make it easy to perform a task only in the master frame and provide the result to all frames. It is also available to custom ad iframes as `window.context.computeInMasterFrame`. See [3p.js](https://github.com/ampproject/amphtml/blob/main/3p/3p.js) for function signature.
286+
The `computeInCoordinatingFrame` function is designed to make it easy to perform a task only in the coordinating frame and provide the result to all frames. It is available to custom ad iframes as `window.context.computeInCoordinatingFrame`. See [3p.js](https://github.com/ampproject/amphtml/blob/main/3p/3p.js) for the function signature.
287287

288-
**Note:** A preferred alternative is available as `window.context.computeInCoordinatingFrame`.
288+
_Note: The legacy function `window.context.computeInMasterFrame` is still available for backward compatibility._
289289

290290
#### Preconnect and prefetch
291291

0 commit comments

Comments
 (0)