minor fixes

This commit is contained in:
Ilya Kantor 2022-02-04 14:37:13 +03:00
parent 4db69b43e9
commit 1f92729254

View file

@ -116,6 +116,13 @@ document.domain = 'site.com';
That's all. Now they can interact without limitations. Again, that's only possible for pages with the same second-level domain.
```warn header="Deprecated, but still working"
The `document.domain` property is in the process of being removed from the [specification](https://html.spec.whatwg.org/multipage/origin.html#relaxing-the-same-origin-restriction). The cross-window messaging (explained below) is the suggested replacement.
That said, as of now all browsers support it. And the support will be kept for the future, not to break old code that relies on `document.domain`.
```
## Iframe: wrong document pitfall
When an iframe comes from the same origin, and we may access its `document`, there's a pitfall. It's not related to cross-origin things, but important to know.