fix: converted single to triple backticks11 (#36238)
This commit is contained in:
@@ -10,16 +10,17 @@ localeTitle: اكتشاف أحداث النقرات الأصلية
|
||||
|
||||
#### هنا مثال على استخدام هذه الطريقة
|
||||
|
||||
`// Assume there is a button in the HTML
|
||||
const button = document.querySelector('button');
|
||||
|
||||
button.addEventListener('click', (e) => {
|
||||
if (e.isTrusted) {
|
||||
console.log('Button clicked by a real user');
|
||||
} else {
|
||||
console.log('Button click simulated by a script');
|
||||
}
|
||||
});
|
||||
|
||||
button.click() // Outputs "Button click simulated by a script"
|
||||
`
|
||||
```javascript
|
||||
// Assume there is a button in the HTML
|
||||
const button = document.querySelector('button');
|
||||
|
||||
button.addEventListener('click', (e) => {
|
||||
if (e.isTrusted) {
|
||||
console.log('Button clicked by a real user');
|
||||
} else {
|
||||
console.log('Button click simulated by a script');
|
||||
}
|
||||
});
|
||||
|
||||
button.click() // Outputs "Button click simulated by a script"
|
||||
```
|
Reference in New Issue
Block a user