Rename ElementHandle.release into ElementHandle.dispose (#284)

The ElementHandle.release feels related to ElementHandle.click.
The dispose is a more clear name.
This commit is contained in:
Andrey Lushnikov
2017-08-16 00:49:20 -07:00
committed by GitHub
parent 3c2aaaaeb0
commit 44c15220f9
4 changed files with 18 additions and 32 deletions

View File

@@ -566,7 +566,7 @@ class Page extends EventEmitter {
let handle = await this.$(selector);
console.assert(handle, 'No node found for selector: ' + selector);
await handle.click(options);
await handle.release();
await handle.dispose();
}
/**
@@ -577,7 +577,7 @@ class Page extends EventEmitter {
let handle = await this.$(selector);
console.assert(handle, 'No node found for selector: ' + selector);
await handle.hover();
await handle.release();
await handle.dispose();
}
/**
@@ -588,7 +588,7 @@ class Page extends EventEmitter {
let handle = await this.$(selector);
console.assert(handle, 'No node found for selector: ' + selector);
await handle.evaluate(element => element.focus());
await handle.release();
await handle.dispose();
}
/**