Open main menu

CDOT Wiki β

Changes

Mouse Lock Implementation FAQ

309 bytes added, 21:49, 17 November 2011
no edit summary
<pre>git config --unset merge.renameLimit</pre>
</blockquote>
 
===How do I get a Document (nsIDocument) from a Window (nsIDOMWindow)?===
 
Answer: Given aWindow, an nsIDOMWindow*
<pre>
nsCOMPtr<nsPIDOMWindow> win = do_QueryInterface(aWindow);
nsCOMPtr<nsIDocument> doc;
if (win) {
doc = do_QueryInterface(win->GetExtantDocument());
}
// doc is now an nsIDocument
</pre>