Skip to content

Commit

Permalink
docs: remove note about DataTrander limited availability (#34243)
Browse files Browse the repository at this point in the history
  • Loading branch information
yury-s authored Jan 7, 2025
1 parent 0d34369 commit 8092255
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 5 deletions.
4 changes: 0 additions & 4 deletions docs/src/api/class-locator.md
Original file line number Diff line number Diff line change
Expand Up @@ -633,27 +633,23 @@ properties:
You can also specify [JSHandle] as the property value if you want live objects to be passed into the event:

```js
// Note you can only create DataTransfer in Chromium and Firefox
const dataTransfer = await page.evaluateHandle(() => new DataTransfer());
await locator.dispatchEvent('dragstart', { dataTransfer });
```

```java
// Note you can only create DataTransfer in Chromium and Firefox
JSHandle dataTransfer = page.evaluateHandle("() => new DataTransfer()");
Map<String, Object> arg = new HashMap<>();
arg.put("dataTransfer", dataTransfer);
locator.dispatchEvent("dragstart", arg);
```

```python async
# note you can only create data_transfer in chromium and firefox
data_transfer = await page.evaluate_handle("new DataTransfer()")
await locator.dispatch_event("#source", "dragstart", {"dataTransfer": data_transfer})
```

```python sync
# note you can only create data_transfer in chromium and firefox
data_transfer = page.evaluate_handle("new DataTransfer()")
locator.dispatch_event("#source", "dragstart", {"dataTransfer": data_transfer})
```
Expand Down
1 change: 0 additions & 1 deletion packages/playwright-core/types/types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12915,7 +12915,6 @@ export interface Locator {
* live objects to be passed into the event:
*
* ```js
* // Note you can only create DataTransfer in Chromium and Firefox
* const dataTransfer = await page.evaluateHandle(() => new DataTransfer());
* await locator.dispatchEvent('dragstart', { dataTransfer });
* ```
Expand Down

0 comments on commit 8092255

Please sign in to comment.