Index: Source/modules/gamepad/NavigatorGamepad.cpp |
diff --git a/Source/modules/gamepad/NavigatorGamepad.cpp b/Source/modules/gamepad/NavigatorGamepad.cpp |
index 0846608d4fd11bf2265318aca4aa0dd90448c76c..3cbc3f912c9cc66f9578eac7988de58ebf65c58d 100644 |
--- a/Source/modules/gamepad/NavigatorGamepad.cpp |
+++ b/Source/modules/gamepad/NavigatorGamepad.cpp |
@@ -97,7 +97,8 @@ GamepadList* NavigatorGamepad::gamepads() |
{ |
if (!m_gamepads) |
m_gamepads = GamepadList::create(); |
- if (frame() && frame()->domWindow()) { |
+ if (frame() && frame()->host()) { |
+ // The frame must be attached to start updating. |
startUpdating(); |
sampleGamepads<Gamepad>(m_gamepads.get()); |
} |