projects
/
platform
/
framework
/
web
/
crosswalk-tizen.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b7459d5
)
docs: Use <a> as example
author
Cheng Zhao
<zcbenz@gmail.com>
Sun, 3 Jul 2016 06:27:26 +0000
(15:27 +0900)
committer
Cheng Zhao
<zcbenz@gmail.com>
Sun, 3 Jul 2016 06:27:26 +0000
(15:27 +0900)
docs/tutorial/desktop-environment-integration.md
patch
|
blob
|
history
diff --git
a/docs/tutorial/desktop-environment-integration.md
b/docs/tutorial/desktop-environment-integration.md
index
e430cb4
..
ab84681
100644
(file)
--- 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
+<a href="#" id="drag">item</a>
+<script type="text/javascript" charset="utf-8">
+ document.getElementById('drag').ondragstart = (event) => {
+ event.preventDefault()
+ ipcRenderer.send('ondragstart', '/path/to/item')
+ }
+</script>
```
In the main process: