Refactor Frame.waitForSelector method

Refactor Frame.waitForSelector to make room for Frame.waitForFunction
implementation.
This patch:
- removes AwaitedElement class which proved to be confusing, and
  introduces a more straight-forward WaitTask.
- refactors the mutation observer to return true in case of successful
  waiting or false in case of timeout.

References #91
This commit is contained in:
Andrey Lushnikov
2017-07-24 09:58:51 -07:00
parent 63e928f4cd
commit 0a3125434e
3 changed files with 107 additions and 116 deletions

View File

@@ -3,7 +3,6 @@ const mdBuilder = require('./MDBuilder');
const Documentation = require('./Documentation');
const EXCLUDE_CLASSES = new Set([
'AwaitedElement',
'Connection',
'EmulationManager',
'FrameManager',
@@ -12,6 +11,7 @@ const EXCLUDE_CLASSES = new Set([
'NetworkManager',
'ProxyStream',
'TaskQueue',
'WaitTask',
]);
const EXCLUDE_METHODS = new Set([