From 218934fa2ed1c702a6d3923d2aa2cc6b43c48684 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:43:23 -0500 Subject: initial commit --- files/uk/archive/web/index.html | 81 +++++++++++++++++++++ .../web/javascript/date.tolocaleformat/index.html | 78 ++++++++++++++++++++ .../ecmascript_7_support_in_mozilla/index.html | 70 ++++++++++++++++++ .../web/javascript/for_each...in/index.html | 78 ++++++++++++++++++++ files/uk/archive/web/javascript/index.html | 12 ++++ .../legacy_generator_function/index.html | 57 +++++++++++++++ .../legacy_generator_function_statement/index.html | 67 +++++++++++++++++ .../error.description/index.html | 77 ++++++++++++++++++++ .../microsoft_extensions/error.number/index.html | 83 ++++++++++++++++++++++ .../web/javascript/microsoft_extensions/index.html | 70 ++++++++++++++++++ files/uk/archive/web/stopiteration/index.html | 63 ++++++++++++++++ 11 files changed, 736 insertions(+) create mode 100644 files/uk/archive/web/index.html create mode 100644 files/uk/archive/web/javascript/date.tolocaleformat/index.html create mode 100644 files/uk/archive/web/javascript/ecmascript_7_support_in_mozilla/index.html create mode 100644 files/uk/archive/web/javascript/for_each...in/index.html create mode 100644 files/uk/archive/web/javascript/index.html create mode 100644 files/uk/archive/web/javascript/legacy_generator_function/index.html create mode 100644 files/uk/archive/web/javascript/legacy_generator_function_statement/index.html create mode 100644 files/uk/archive/web/javascript/microsoft_extensions/error.description/index.html create mode 100644 files/uk/archive/web/javascript/microsoft_extensions/error.number/index.html create mode 100644 files/uk/archive/web/javascript/microsoft_extensions/index.html create mode 100644 files/uk/archive/web/stopiteration/index.html (limited to 'files/uk/archive/web') diff --git a/files/uk/archive/web/index.html b/files/uk/archive/web/index.html new file mode 100644 index 0000000000..ce3481b9ae --- /dev/null +++ b/files/uk/archive/web/index.html @@ -0,0 +1,81 @@ +--- +title: Archived open Web documentation +slug: Archive/Web +tags: + - Archive + - Landing + - NeedsTranslation + - TopicStub + - Web +translation_of: Archive/Web +--- + + +
{{Obsolete_Header}}
+ +

The documentation listed below is archived, obsolete material about open Web topics.

+ +
+
+
+
Talk:background-size
+
Should not the "Browser compatibility" table also list Google Chrome and Konqueror? Chome is not mentioned at all, but is becoming increasingly popular. Konqueror is listed below the table, which seems inconsistent. Znerd 04 August 2009
+
Browser Detection and Cross Browser Support
+
Improper browser detection can lead to web maintenance nightmares. Rethinking the basics of when and how to detect user agents is crucial to creating maintainable, cross browser web content. This article reviews several approaches to browser detection, their usefulness in specific circumstances to arrive at a common sense approach to browser detection.
+
Browser Feature Detection
+
An experimental approach to discovering degree of support for Standards
+
CSS
+
Obsolete CSS features
+
Displaying notifications (deprecated)
+
Firefox offers support for "desktop notifications"; these are notifications that are displayed to the user outside the context of the web content, using the standard notification system provided by the operating system.
+
E4X
+
ECMAScript for XML (E4X) is a programming language extension that adds native XML support to JavaScript. It does this by providing access to the XML document in a form that feels natural for ECMAScript programmers. The goal is to provide an alternative, simpler syntax for accessing XML documents than via DOM interfaces. A valid alternative to E4X is a non-native JXON algorithm.
+
E4X Tutorial
+
This tutorial walks you through the basic syntax of E4X (ECMAScript for XML). With E4X, programmers can manipulate an XML document with a syntax more familiar to JavaScript programming.
+
Talk:Array.forEach()
+
Ok, in the end I didn't remove the old code as it isn't hosted anywhere (I thought the github reference contained the code) but inserted a faster implementation above while retaining the rest of the document.
+
Iterator
+
The Iterator function returns an object which implements legacy iterator protocol and iterates over enumerable properties of an object.
+
LiveConnect
+
(Please update or remove as needed.)
+
MSX Emulator (jsMSX)
+
 
+
Old Proxy API
+
Proxies are objects for which the programmer has to define the semantics in JavaScript. The default object semantics are implemented in the JavaScript engine, often written in lower-level languages like C++. Proxies let the programmer define most of the behavior of an object in JavaScript. They are said to provide a meta-programming API.
+
ParallelArray
+
The goal of ParallelArray was to enable data-parallelism in web applications. The higher-order functions available on ParallelArray attempted to execute in parallel, though they may fall back to sequential execution if necessary. To ensure that your code executes in parallel, it is suggested that the functions should be limited to the parallelizable subset of JS that Firefox supports.
+
+ +
+
+
+ +
+
+
Properly Using CSS and JavaScript in XHTML Documents
+
XHTML™ 1.0 The Extensible HyperText Markup Language (Second Edition) defines XHTML to be a reformulation of HTML 4 as an XML 1.0 application.
+
Talk:JavaScript Reference
+
The guide section links to an interesting document discussing how to create and use private variables in objects, which is great if you want to protect the various properties within an object from being poked at accidentally. I also just read a document on proper inheritance using apply(). Well if you combine the two, you can have inherited private variables:
+
Scope Cheatsheet
+
JavaScript with Mozilla extensions has both function-scoped vars and block-scoped lets. Along with hoisting and dynamic behavior, scope in JavaScript is sometimes surprising.
+
Server-Side JavaScript
+
Here's a radical idea: Use one language to write entire Web apps -- the same language which billions of web pages already use, every day.
+
Sharp variables in JavaScript
+
A sharp variable is a syntax in object initializers that allows serialization of objects that have cyclic references or multiple references to the same object.
+
Standards-Compliant Authoring Tools
+
Creating cross-browser code upfront will save you lots of time quality testing your web content. The following authoring tools adhere to the W3 standards. If you're using older versions of tools that rely on old browser bugs or generate browser-specific code, it may be time to upgrade:
+
StopIteration
+
The StopIteration object was used to tell the end of the iteration in the legacy iterator protocol. Do not use this ancient feature.
+
Styling the Amazing Netscape Fish Cam Page
+
 
+
Using JavaScript Generators in Firefox
+
Generators can be used to simplify asynchronous code in Firefox by opting in to using JavaScript version 1.7 or later. You can opt in in HTML as follows:
+
Window.importDialog()
+
Because opening windows on mobile isn't necessarily appropriate, the Firefox Mobile team designed the importDialog() method to replace window.openDialog(). Instead of opening a new window, it merges the specified XUL dialog into the main window.
+
Writing JavaScript for XHTML
+
Technical review completed. Editorial review completed.
+
XForms
+
XForms were envisioned as the future of online forms as envisioned by the W3C. Drawing on other W3C standards like XML Schema, XPath, and XML Events, XForms tried to address some of the limitations of the current HTML forms model. However, XForms never gained traction and is now considered obsolete.
+
+
+
diff --git a/files/uk/archive/web/javascript/date.tolocaleformat/index.html b/files/uk/archive/web/javascript/date.tolocaleformat/index.html new file mode 100644 index 0000000000..80cbe06017 --- /dev/null +++ b/files/uk/archive/web/javascript/date.tolocaleformat/index.html @@ -0,0 +1,78 @@ +--- +title: Date.prototype.toLocaleFormat() +slug: Archive/Web/JavaScript/Date.toLocaleFormat +tags: + - Date + - JavaScript + - Довідка + - метод + - нестандартний +translation_of: Archive/Web/JavaScript/Date.toLocaleFormat +--- +
{{JSRef}} {{non-standard_header}}
+ +

Нестандартний метод toLocaleFormat() перетворює дату на рядок, використовуючи вказане форматування. {{jsxref("Global_Objects/DateTimeFormat", "Intl.DateTimeFormat")}} є альтернативою для форматування дат згідно зі стандартами. Також дивіться нову версію {{jsxref("Date.prototype.toLocaleDateString()")}}.

+ +

Ця функціональність була прибрана та більше не працює у Firefox 58+. Більше інформації та допомогу з міграцією дивіться у статті Warning: Date.prototype.toLocaleFormat is deprecated.

+ +

Синтаксис

+ +
dateObj.toLocaleFormat(formatString)
+ +

Параметри

+ +
+
formatString
+
Рядок форматування у такому ж форматі, який очікується функцією strftime() у C.
+
+ +

Повертає

+ +

Рядкове представлення наданої дати з використанням вказаного форматування.

+ +

Опис

+ +

Метод toLocaleFormat() надає більший програмний контроль над форматуванням створеної дати та/або часу. Назви місяців та днів тижня локалізуються за допомогою мовних налаштувань операційної системи. Однак, порядок дня та місяця, а також інші задачі локалізації не опрацьовуються автоматично, оскільки ви контролюєте те, в якому порядку вони виводяться. Ви повинні подбати про те, щоб рядок форматування був правильно локалізований згідно системних налаштувань користувача. Пам'ятайте, що мовні налаштування системи не обов'язково співпадають з налаштуваннями веб-переглядача.

+ +

Розробники XULRunner мають знати, що простого завантаження рядка форматування з файлу .dtd чи .properties за допомогою URI chrome://somedomain/locale/somefile.ext слід уникати, оскільки файл .dtd/.properties та метод toLocaleFormat() не обов'язково використовують однакову мову, що може призвести до дивних чи навіть неоднозначних або нечитабельних дат.

+ +

Також зауважте, що поведінка мови, що використовується, залежить від платформи, а користувач може змінити системні налаштування, а отже, використання системних налаштувань з рядком форматування може бути зовсім непридатним. Вам варто розглянути використання деяких більш загальних методів toLocale* об'єкта {{jsxref("Global_Objects/Date", "Date")}} або створення власної локалізації дати, яку потрібно, відобразити, за допомогою якогось з методів get* об'єкта {{jsxref("Global_Objects/Date", "Date")}} замість використання цього методу.

+ +

Приклади

+ +

Використання toLocaleFormat()

+ +
var today = new Date();
+var date = today.toLocaleFormat('%A, %B %e, %Y');
+
+ +

У цьому прикладі toLocaleFormat() повертає рядок, такий як "Wednesday, October 3, 2007". Зауважте, що рядок форматування у цьому прикладі не локалізований як слід, що призведе до описаних вище проблем.

+ +

Поліфіл

+ +

Використовуючи бібліотеку DateJS, ви можете створити поліфіл методу library you can polyfill {{jsxref("Date.prototype.toLocaleDateString()")}} ось так:

+ +
if (!Date.prototype.toLocaleFormat) {
+    (function() {
+        Date.prototype.toLocaleFormat = function(formatString) {
+            return this.format(formatString);
+        };
+    }());
+}
+ +

Специфікації

+ +

Не є частиною жодного стандарту.

+ +

Сумісність з веб-переглядачами

+ +

Не підтримується жодним переглядачем. Попередньо підтримувався у Firefox 1.5 до Firefox 57 (січень 2018).

+ +

Див. також

+ + diff --git a/files/uk/archive/web/javascript/ecmascript_7_support_in_mozilla/index.html b/files/uk/archive/web/javascript/ecmascript_7_support_in_mozilla/index.html new file mode 100644 index 0000000000..3168ce701c --- /dev/null +++ b/files/uk/archive/web/javascript/ecmascript_7_support_in_mozilla/index.html @@ -0,0 +1,70 @@ +--- +title: ECMAScript 7 підтримка в Mozilla +slug: Archive/Web/JavaScript/ECMAScript_7_support_in_Mozilla +tags: + - ECMAScript 2016 + - Firefox + - JavaScript +translation_of: Archive/Web/JavaScript/ECMAScript_Next_support_in_Mozilla +--- +

{{jsSidebar("New_in_JS")}}

+ +

ECMAScript 2016 є наступним етапом еволюції стандарту ECMA-262 (зазвичай називають JavaScript). Робота над ECMAScript 2015 була завершена 17 червня 2015, нові можливості вже впроваджуються. Ви можете побачити останні впровадження в tc39/ecma262 GitHub репозиторії.

+ +

Поточні недоліки в процесі специфікації планується вирішити в декілька етапів та чемпіонатів. Також, пропонується дотримуватися 2 річного циклу публікації стандарту. Для перегляду інформації що до процесу специфікації після випуску ES2015 дивіться у презентації Rafael Weinstein.

+ +

Канал зворотного зв'язку за стандартами ECMAScript es-discuss.

+ +

Експериментальні можливості

+ +

Наступні функції вже реалізовані, але доступні тільки в каналі нічних збірок Firefox:

+ +

Additions to the Array object

+ + + +

Additions to the ArrayBuffer object

+ + + +

New TypedObject objects

+ + + +

New SIMD objects

+ + + +

Можливості, які потребують стабілізації

+ +

The following features are supported beyond the Nightly channel, but ongoing specification and implementation work is happening. Features which were originally in the ECMAScript 6 draft and got postponed to ECMAScript 7 are likely to appear here.

+ +

Вирази

+ + + +

Можливості, які ще не підтримуються

+ +

Наступні функції ще не реалізовані, але орієнтовані на ECMAScript 7.

+ + + +

Дивіться також

+ + diff --git a/files/uk/archive/web/javascript/for_each...in/index.html b/files/uk/archive/web/javascript/for_each...in/index.html new file mode 100644 index 0000000000..ed070f7325 --- /dev/null +++ b/files/uk/archive/web/javascript/for_each...in/index.html @@ -0,0 +1,78 @@ +--- +title: for each...in +slug: Archive/Web/JavaScript/for_each...in +tags: + - E4X + - JavaScript + - Інструкція + - застаріла + - не рекомендована +translation_of: Archive/Web/JavaScript/for_each...in +--- +
{{jsSidebar("Statements")}}
+ +
+

Інструкція for each...in є застарілою, як частина стандарту ECMA-357 (E4X). Підтримка E4X була прибрана. Розгляньте натомість використання for...of.
+
+ Firefox застерігає від використання інструкції for each...in, вона більше не працює, починаючи з Firefox 57. Будь ласка, дивіться Застереження: цикли JavaScript 1.6 for-each-in є застарілими для допомоги у міграції.

+
+ +

Інструкція for each...in перебирає вказаною змінною усі значення властивостей об'єкта. Для кожної окремої властивості виконується вказана інструкція.

+ +

Синтаксис

+ +
for each (variable in object) {
+  statement
+}
+ +
+
variable
+
Змінна для перебору значень властивостей, може бути оголошена ключовим словом var. Ця змінна є локальною для функції, а не для циклу.
+
+ +
+
object
+
Об'єкт, чиї властивості перебираються.
+
+ +
+
statement
+
Інструкція, що виконуватиметься для кожної властивості. Щоб виконати більше однієї інструкції у циклі, використовуйте блок ({ ... }), щоб згрупувати ці інструкції.
+
+ +

Опис

+ +

Деякі вбудовані властивості не перебираються. Серед них усі вбудовані методи об'єктів, наприклад, метод indexOf об'єкта String. Однак, усі властивості, визначені користувачем, перебираються.

+ +

Приклади

+ +

Використання for each...in

+ +

Застереження: Ніколи не використовуйте цикл на масивах таким чином. Використовуйте його лише на об'єктах. Дивіться більше подробиць у for...in.

+ +

Наступний код перебирає властивості об'єкта, обчислюючи їхню суму:

+ +
var sum = 0;
+var obj = {prop1: 5, prop2: 13, prop3: 8};
+
+for each (var item in obj) {
+  sum += item;
+}
+
+console.log(sum); // виводить "26" як результат 5+13+8
+ +

Специфікації

+ +

Не є частиною жодного стандарту.

+ +

Сумісність з веб-переглядачами

+ +

Ніде не підтримується. Історично підтримується у Firefox від 1.5 до 56.

+ +

Див. також

+ + diff --git a/files/uk/archive/web/javascript/index.html b/files/uk/archive/web/javascript/index.html new file mode 100644 index 0000000000..4687b7bf23 --- /dev/null +++ b/files/uk/archive/web/javascript/index.html @@ -0,0 +1,12 @@ +--- +title: JavaScript +slug: Archive/Web/JavaScript +translation_of: Archive/Web/JavaScript +--- + + +

{{Obsolete_Header}}

+ +

Obsolete JavaScript features and unmaintained docs

+ +

{{SubpagesWithSummaries}}

diff --git a/files/uk/archive/web/javascript/legacy_generator_function/index.html b/files/uk/archive/web/javascript/legacy_generator_function/index.html new file mode 100644 index 0000000000..cb8f5acd5b --- /dev/null +++ b/files/uk/archive/web/javascript/legacy_generator_function/index.html @@ -0,0 +1,57 @@ +--- +title: Вираз застарілої функції-генератора +slug: Archive/Web/JavaScript/Legacy_generator_function +tags: + - JavaScript + - Оператор + - застарілий + - нестандартний +translation_of: Archive/Web/JavaScript/Legacy_generator_function +--- +
{{JSSidebar("Operators")}}{{Non-standard_Header}}{{Obsolete_Header("gecko58")}} +
Вираз застарілої функції-генератора був особливою функціональністю SpiderMonkey, прибраною у Firefox 58+. Для використання у майбутньому розгляньте {{JSxRef("Operators/function*", "вираз function*")}}.
+
+ +

Ключове слово function можна використати для визначення застарілої функції-генератора всередині виразу. Щоб зробити функцію застарілим генератором, тіло функції повинно містити принаймні один вираз {{JSxRef("Operators/yield", "yield")}}.

+ +

Синтаксис

+ +
function [name]([param1[, param2[, ..., paramN]]]) {
+   statements
+}
+ +

Параметри

+ +
+
name
+
Ім'я функції. Можна пропустити, в цьому випадку функція буде анонімною. Ім'я доступне лише всередині тіла функції.
+
paramN
+
Ім'я аргументу, що передається у функцію. Функція може мати до 255 аргументів.
+
statements
+
Інструкції, що складають тіло функції. Мають містити принаймні один вираз {{JSxRef("Operators/yield", "yield")}}.
+
+ +

Опис

+ +

Огляд використання доступний у статті Ітератори та генератори.

+ +

Сумісність з веб-переглядачами

+ +

Supported nowhere

+ +

Див. також

+ + diff --git a/files/uk/archive/web/javascript/legacy_generator_function_statement/index.html b/files/uk/archive/web/javascript/legacy_generator_function_statement/index.html new file mode 100644 index 0000000000..54307ddc3e --- /dev/null +++ b/files/uk/archive/web/javascript/legacy_generator_function_statement/index.html @@ -0,0 +1,67 @@ +--- +title: Застаріла функція-генератор +slug: Archive/Web/JavaScript/Legacy_generator_function_statement +tags: + - JavaScript + - legacy + - Довідка + - застарілий + - нестандартний +translation_of: Archive/Web/JavaScript/Legacy_generator_function_statement +--- +
{{JSSidebar("Statements")}}{{Non-standard_Header}}{{Obsolete_Header("gecko58")}} +
+

Застаріла функція-генератор була особливою функціональністю SpiderMonkey, прибраною у Firefox 58+. Для використання у майбутньому розгляньте {{JSxRef("Statements/function*", "function*")}}.

+
+
+ +

Оператор застарілої функції-генератора оголошує застарілу функцію-генератор із вказаними параметрами.

+ +

Ви також можете визначати функції, використовуючи конструктор {{JSxRef("Function")}} з параметром functionBody та принаймні одним виразом {{JSxRef("Operators/yield", "yield")}}, а також {{JSxRef("Operators/Legacy_generator_function", "вираз застарілої функції-генератора", "", 1)}}.

+ +

Синтаксис

+ +
function name([param,[, param,[..., param]]]) {
+   [statements]
+}
+
+ +
+
name
+
Ім'я функції.
+
+ +
+
param
+
Ім'я аргументу, що передається у функцію. Функція може мати до 255 аргументів.
+
+ +
+
statements
+
Інструкції, що складають тіло функції. Вони повинні містити принаймні один вираз {{JSxRef("Operators/yield", "yield")}}.
+
+ +

Опис

+ +

Огляд використання доступний у статті Ітератори та генератори.

+ +

Сумісність з веб-переглядачами

+ +

Supported nowhere.

+ +

Див. також

+ + diff --git a/files/uk/archive/web/javascript/microsoft_extensions/error.description/index.html b/files/uk/archive/web/javascript/microsoft_extensions/error.description/index.html new file mode 100644 index 0000000000..f4685ed8de --- /dev/null +++ b/files/uk/archive/web/javascript/microsoft_extensions/error.description/index.html @@ -0,0 +1,77 @@ +--- +title: Error.description +slug: Archive/Web/JavaScript/Microsoft_Extensions/Error.description +tags: + - Error + - Internet Explorer + - JavaScript + - Властивість + - нестандартна + - помилка +translation_of: Archive/Web/JavaScript/Microsoft_Extensions/Error.description +--- +
{{JSRef}}
+ +
Нестандартна властивість. Не використовуйте!
+Це розширення Microsoft, яке підтримується тільки у Internet Explorer.
+ +

Властивість Error.description повертає чи присвоює описовий рядок, асоційований з конкретною помилкою.

+ +

Синтаксис

+ +
object
+.description [= stringExpression]
+ +

Параметри

+ +
+
object
+
Обов'язковий. Будь-який екземпляр об'єкта Error.
+
stringExpression
+
Необов'язковий. Рядковий вираз, що містить опис помилки.
+
+ +

Зауваження

+ +

Властивість description містить рядок повідомлення помилки, асоційований з конкретною помилкою. Скористайтесь значенням, що міститься у цій властивості, щоб оповістити користувача про помилку.

+ +

Властивості description та message надають одну й ту саму функціональність; властивість description забезпечує зворотну сумісність; властивість message відповідає стандарту ECMA.

+ +

Приклад

+ +

Наступний приклад ілюструє використання властивості description.

+ +
try
+{
+// Спричиняє помилку:
+    x = y
+}
+catch(e)
+{
+// Виводить "[object Error]":
+    document.write(e)
+    document.write (" ");
+// Виводить 5009:
+    document.write((e.number & 0xFFFF))
+    document.write (" ");
+// Виводить "'y' is undefined":
+    document.write(e.description);
+    document.write (" ");
+// Виводить "'y' is undefined":
+    document.write(e.message)
+}
+
+ +

Вимоги

+ +

Підтримується у наступних режимах: режим сумісності (Quirks), стандарти Internet Explorer 6, стандарти Internet Explorer 7, стандарти Internet Explorer 8, стандарти Internet Explorer 9, стандарти Internet Explorer 10, стандарти Internet Explorer 11. Також підтримується у застосунках Store (Windows 8 та Windows Phone 8.1).

+ +

Належить доError Object

+ +

Див. також

+ + diff --git a/files/uk/archive/web/javascript/microsoft_extensions/error.number/index.html b/files/uk/archive/web/javascript/microsoft_extensions/error.number/index.html new file mode 100644 index 0000000000..9154808c29 --- /dev/null +++ b/files/uk/archive/web/javascript/microsoft_extensions/error.number/index.html @@ -0,0 +1,83 @@ +--- +title: Error.number +slug: Archive/Web/JavaScript/Microsoft_Extensions/Error.number +tags: + - Error + - Internet Explorer + - JavaScript + - Властивість + - нестандартна +translation_of: Archive/Web/JavaScript/Microsoft_Extensions/Error.number +--- +
{{JSRef}}
+ +
Нестандартна властивість. Не використовуйте!
+Це розширення Microsoft, яке підтримується тільки у Internet Explorer.
+ +

Властивість Error.number повертає числову величину, асоційовану з конкретною помилкою.

+ +

Синтаксис

+ +
object
+.number [= errorNumber]
+
+ +

Параметри

+ +
+
Object
+
Будь-який екземпляр об'єкта Error.
+
errorNumber
+
Ціле число, що відображає помилку.
+
+ +

Зауваження

+ +

Номер помилки є 32-бітним значенням. Перше 16-бітне слово є кодом об'єкта, а друге слово є кодом помилки. Щоб отримати код помилки, скористайтесь оператором & (побітове І), щоб об'єднати номер з шістнадцятковим числом 0xFFFF.

+ +

Приклад

+ +

Наступний приклад спричиняє викидання помилки та виводить код помилки, отриманий з номера помилки.

+ +
try
+    {
+    // Спричиняє помилку.
+    var x = y;
+    }
+catch(e)
+    {
+    document.write ("Код помилки: ");
+    document.write (e.number & 0xFFFF)
+    document.write ("<br />");
+
+    document.write ("Код об'єкта: ")
+    document.write(e.number>>16 & 0x1FFF)
+    document.write ("<br />");
+
+    document.write ("Повідомлення помилки: ")
+    document.write (e.message)
+    }
+
+ +

Приклад

+ +

Цей код виведе наступне.

+ +
Код помилки: 5009
+Код об'єкта: 10
+Повідомлення помилки: 'y' is undefined
+
+ +

Вимоги

+ +

Підтримується у наступних режимах: режим сумісності (Quirks), стандарти Internet Explorer 6, стандарти Internet Explorer 7, стандарти Internet Explorer 8, стандарти Internet Explorer 9, стандарти Internet Explorer 10, стандарти Internet Explorer 11. Також підтримується у застосунках Store (Windows 8 та Windows Phone 8.1).

+ +

Належить доError Object

+ +

Див. також

+ + diff --git a/files/uk/archive/web/javascript/microsoft_extensions/index.html b/files/uk/archive/web/javascript/microsoft_extensions/index.html new file mode 100644 index 0000000000..a128cb7caf --- /dev/null +++ b/files/uk/archive/web/javascript/microsoft_extensions/index.html @@ -0,0 +1,70 @@ +--- +title: Microsoft JavaScript extensions +slug: Archive/Web/JavaScript/Microsoft_Extensions +tags: + - JavaScript + - 'JavaScript:Microsoft Extensions' + - NeedsTranslation + - Non-standard + - Reference + - TopicStub +translation_of: Archive/Web/JavaScript/Microsoft_Extensions +--- +
{{JSSidebar("Microsoft Extensions")}}{{Non-standard_Header}} +
+

Warning: These APIs will only work in Microsoft applications, and are not on a standards track.

+
+
+ +

Microsoft browsers (Internet Explorer, and in a few cases, Microsoft Edge) support a number of special Microsoft extensions to the otherwise standard JavaScript APIs.

+ +

Objects

+ +
+ +
+ +

Functions

+ +
+ +
+ +

Statements

+ +
+ +
+ +

Other

+ +
+ +
+ +

See also

+ + diff --git a/files/uk/archive/web/stopiteration/index.html b/files/uk/archive/web/stopiteration/index.html new file mode 100644 index 0000000000..022bd6caff --- /dev/null +++ b/files/uk/archive/web/stopiteration/index.html @@ -0,0 +1,63 @@ +--- +title: StopIteration +slug: Archive/Web/StopIteration +tags: + - JavaScript + - застарілий +translation_of: Archive/Web/StopIteration +--- +
Нестандартний. Об'єкт StopIteration був особливою функціональністю SpiderMonkey та був прибраний у Firefox 58+. Для використання у майбутньому розгляньте цикли for..of та протоколи перебору.
+ +

Об'єкт StopIteration використовувався для повідомлення про закінчення перебору у протоколі застарілого ітератора. Не використовуйте цю давню функціональність.

+ +

Синтаксис

+ +
StopIteration
+ +

Опис

+ +

StopIteration є частиною протоколу застарілого ітератора та буде прибраний одночасно із застарілим ітератором та застарілим генератором.

+ +

Приклади

+ +

StopIteration викидається об'єктом Iterator.

+ +
var a = {
+  x: 10,
+  y: 20
+};
+var iter = Iterator(a);
+console.log(iter.next()); // ["x", 10]
+console.log(iter.next()); // ["y", 20]
+console.log(iter.next()); // викидає StopIteration
+
+ +

Викидання об'єкта StopIteration.

+ +
function f() {
+  yield 1;
+  yield 2;
+  throw StopIteration;
+  yield 3; // це не виконується.
+}
+
+for (var n in f()) {
+  console.log(n);   // 1
+                    // 2
+}
+
+ +

Специфікації

+ +

Нестандартний. Не є частиною жодних актуальних стандартів.

+ +

Сумісність з веб-переглядачами

+ +

Не підтримується. Використовувався у Firefox у версіях до Firefox 57.

+ +

Див. також

+ + -- cgit v1.2.3-54-g00ecf