Skip to content
This repository was archived by the owner on Oct 4, 2020. It is now read-only.

contentWindow #122

Open
beckyconning opened this issue Sep 12, 2017 · 2 comments
Open

contentWindow #122

beckyconning opened this issue Sep 12, 2017 · 2 comments

Comments

@beckyconning
Copy link
Contributor

Yes please! The main thing I'd like this for is comparison to check that a MessageEvent's source is equal to a given iframes WindowProxy.

contentWindow :: HTMLIFrameElement -> Eff (dom :: DOM | eff) WindowProxy

https://github.com/purescript-web/purescript-dom/blob/9e624324f0ec63328f0cc269f168fd6c1ee9b337/src/DOM/HTML/HTMLIFrameElement.purs#L48

@garyb
Copy link
Member

garyb commented Sep 12, 2017

It'd be Maybe WindowProxy - the question mark isn't indicating whether we should include it, it's part of the IDL format indicating the field is nullable 😉

We don't have a WindowProxy type yet either, so that would need adding. It'd need an explicit equality function too I think, since it's a reference comparison rather than value comparison... or just make use of unsafeRefEq :)

@beckyconning
Copy link
Contributor Author

Cool, will do.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants