-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjs-current-v1.22.html
More file actions
36 lines (33 loc) · 1.53 KB
/
Copy pathjs-current-v1.22.html
File metadata and controls
36 lines (33 loc) · 1.53 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<!doctype html>
<html dir="rtl" lang="ar">
<head>
<title>تطبيق JavaScript حديث</title>
</head>
<body>
<section id="تطبيق">
<h1>تطبيق عربي بتقنيات JavaScript الحالية</h1>
<p>هذا المثال يحول مفردات JavaScript الحديثة مع الحفاظ على النصوص والبيانات الخام.</p>
</section>
<script>
const نتيجة_قيم = Iterator.from([1, 2, 3, 4].values())
.filter(function (رقم_حالي) { return رقم_حالي > 1; })
.map(function (رقم_حالي) { return رقم_حالي * 2; })
.take(2)
.toArray();
const امن = RegExp.escape("a+b");
const انصاف = new Float16Array([1.5, 2.5]);
const عرض = new DataView(انصاف.buffer);
عرض.setFloat16(0, Math.f16round(1.25), true);
const متحكم_مهام = new TaskController({ priority: "user-visible" });
const نتيجة = await scheduler.postTask(function () {
return { نتيجة_قيم, امن };
}, { priority: "user-blocking", delay: 10, signal: متحكم_مهام.signal });
متحكم_مهام.setPriority("background");
await scheduler.yield();
const تسجيل_حالي = await navigator.serviceWorker.register("/sw.js", { scope: "/" });
await تسجيل_حالي.navigationPreload.enable();
const جاهزية = await navigator.serviceWorker.ready;
console.log(نتيجة, جاهزية, عرض.getFloat16(0, true));
</script>
</body>
</html>