Based on discussion in Bug 917448 and https://groups.google.com/d/msg/mozilla.dev.platform/Tkl68cZ1tQg/dPwxDIJsnT0J, we implemented a getter called containerElement in Bug 918884. This is a better way to get the DOM element from a window, specifically because it doesn't rely on querySelectorAll("iframe") which could be missing other elements, like <object>. We should update getFrameElement to use this new getter.
Created attachment 815362 [details] [diff] [review] containerElement-923166.patch Paul, here is a small patch to use the new containerElement in place of the current getFrameElement workaround. Here is a push to try: https://tbpl.mozilla.org/?tree=Try&rev=52dd0d222a21.