From ba1fe322e9532d1b2a866401056d9355e6b88c7c Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Sun, 3 Jul 2016 15:27:26 +0900 Subject: [PATCH] docs: Use as example --- docs/tutorial/desktop-environment-integration.md | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/docs/tutorial/desktop-environment-integration.md b/docs/tutorial/desktop-environment-integration.md index e430cb4235d9..ab84681609e1 100644 --- a/docs/tutorial/desktop-environment-integration.md +++ b/docs/tutorial/desktop-environment-integration.md @@ -329,11 +329,14 @@ app, you need to call `webContents.startDrag(item)` API on `ondragstart` event. In web page: -```javascript -document.getElementById('targetItem').ondragstart = (event) => { - event.preventDefault() - ipcRenderer.send('ondragstart', '/path/to/item') -} +```html +item + ``` In the main process: