You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: 3-frames-and-windows/01-popup-windows/article.md
+20-20Lines changed: 20 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -54,22 +54,22 @@ params
54
54
تنظیمات برای `params`:
55
55
56
56
- Position:
57
-
-`left/top` (numeric) -- coordinates of the window top-left corner on the screen. There is a limitation: a new window cannot be positioned offscreen.
58
-
-`width/height` (numeric) -- width and height of a new window. There is a limit on minimal width/height, so it's impossible to create an invisible window.
59
-
-Window features:
60
-
-`menubar` (yes/no) -- shows or hides the browser menu on the new window.
61
-
-`toolbar` (yes/no) -- shows or hides the browser navigation bar (back, forward, reload etc) on the new window.
62
-
-`location` (yes/no) -- shows or hides the URL field in the new window. FF and IE don't allow to hide it by default.
63
-
-`status` (yes/no) -- shows or hides the status bar. Again, most browsers force it to show.
64
-
-`resizable` (yes/no) -- allows to disable the resize for the new window. Not recommended.
65
-
-`scrollbars` (yes/no) -- allows to disable the scrollbars for the new window. Not recommended.
57
+
-`چپ/بالا`(عددی) - مختصات گوشهی سمت چپ بالای پنجره در صفحه. یک محدودیت وجود دارد: یک پنجرهی جدید را نمیتوان خارج صفحه قرار داد.
58
+
-`عرض/ارتفاع`(عددی) - عرض و ارتفاع یک پنجرهی جدید. در حداقل عرض/ارتفاع یک محدودیت وجود دارد. بنابرین غیرممکن است که یک پنجرهی غیرقابل دیدن ایجاد کرد.
59
+
-ویژگیهای پنجره:
60
+
-`menubar` (بله/خیر) -- .منوی مرورگر را در پنجره جدید نشان میدهد یا پنهان میکند
61
+
-`toolbar` (بله/خیر) -- .نوار پیمایش مرورگر (به عقب، جلو، بارگذاری مجدد و ...) را در پنجره جدید نشان میدهد یا پنهان میکند
62
+
-`location` (بله/خیر) -- .به طور پیش فرض اجازه مخفی کردن آن را نمیدهند IE و FF را در پنجرهی جدید نشان میدهد یا پنهان میکند URL فیلد
63
+
-`status` (بله/خیر) -- .را نشان میدهد یا پنهان میکند. باز هم، اکثر مرورگرها آن را مجبور به نمایش میکنند status bar
64
+
-`resizable` (بله/خیر) -- .اجازه میدهد تا تغییر اندازه را برای پنجره جدید غیرفعال کنید. توصیه نمیشود
65
+
-`scrollbars` (بله/خیر) -- .اجازه میدهد تا نوارهای اسکرول را برای پنجره جدید غیرفعال کنید. توصیه نمیشود.
66
66
67
67
68
-
There is also a number of less supported browser-specific features, which are usually not used. Check <ahref="https://developer.mozilla.org/en/DOM/window.open">window.open in MDN</a> for examples.
68
+
همجنین، تعدادی ویژگی خاص مرورگر وجود دارند که کمتر پشتیبانی میشوند که معمولا از آنها استفاده نمیشود. برای مثال، <ahref="https://developer.mozilla.org/en/DOM/window.open">window.open در MDN</a> را بررسی کنید.
69
69
70
-
## Example: a minimalistic window
70
+
## مثال: یک پنجرهی minimalistic
71
71
72
-
Let's open a window with minimal set of features, just to see which of them browser allows to disable:
72
+
بیایید یک پنجره با حداقل مجموعهای ویژگیها باز کنیم، فقط برای آن که ببینیم مرورگر کدام یکی از آنها را غیرفعال میکند:
73
73
74
74
```js run
75
75
let params =`scrollbars=no,resizable=no,status=no,location=no,toolbar=no,menubar=no,
Here most "window features" are disabled and window is positioned offscreen. Run it and see what really happens. Most browsers "fix" odd things like zero`width/height`and offscreen`left/top`. For instance, Chrome open such a window with full width/height, so that it occupies the full screen.
81
+
اینجا اکثر "ویژگیهای پنجره" غیرفعال شدهاند و پنجره خارج صفحه قرار میگیرد. آن را اجرا کنید و ببینید واقعا چه اتفاقی میافتد. اکثر مرورگرها موارد عجیب و غریب مثل`width/height`صفر و`left/top` خارج از صفحه را درست میکنند. برای مثال، chrome همچین پنجرهای را با عرض/ارتفاع کامل باز میکند تا تمام صفحه را اشغال کند.
82
82
83
-
Let's add normal positioning options and reasonable `width`, `height`, `left`, `top` coordinates:
83
+
بیایید گزینههای موقعیتیابی عادی و مختصات `عرض`، `ارتفاع`، `چپ`، `بالا` را اضافه کنیم:
84
84
85
85
```js run
86
86
let params =`scrollbars=no,resizable=no,status=no,location=no,toolbar=no,menubar=no,
اکثر مرورگرها مثال بالا را در صورت لزوم نشان می دهند.
93
93
94
-
Rules for omitted settings:
94
+
قوانین مربوط به تنظیمات حذف شده:
95
95
96
-
-If there is no 3rd argument in the `open`call, or it is empty, then the default window parameters are used.
97
-
-If there is a string of params, but some `yes/no`features are omitted, then the omitted features assumed to have `no`value. So if you specify params, make sure you explicitly set all required features to yes.
98
-
-If there is no `left/top` in params, then the browser tries to open a new window near the last opened window.
99
-
-If there is no `width/height`, then the new window will be the same size as the last opened.
96
+
-اگر هیچ آرگومان سومی در فراخوانی `open`نیست یا خالی است، آنگاه پارامترهای پیشفرض پنجره استفاده میشوند.
97
+
-اگر رشتهای از params وجود دارد اما بعضی از ویژگیهای `yes/no`حذف شدهاند، آنگاه فرض میشود که ویژگیهای حذفشده مقدار `no`را دارند. اگر پارامترها را مشخص میکنید،مطمئن شوید که تمام ویژگیهای مورد نیاز به صراحت روی yes تنظیم شدهاند.
98
+
-اگر هیچ `left/top`ای در params وجود ندارد، مرورگر تلاش میکند که پنجرهای جدید را نزدیک آخرین پنجرهی باز شده، باز کند.
99
+
-اگر هیچ `width/height`ای وجود ندارد، پنجرهی جدید همان اندازهی آخرین پنجرهی باز شده را خواهد داشت.
0 commit comments