From 95aca4b4d8fa62815d4bd412fff1a364f842814a Mon Sep 17 00:00:00 2001 From: Ryan Johnson Date: Thu, 29 Apr 2021 16:16:42 -0700 Subject: remove retired locales (#699) --- files/uk/_redirects.txt | 207 - files/uk/_wikihistory.json | 6298 -------------------- files/uk/conflicting/glossary/doctype/index.html | 11 - .../conflicting/learn/css/first_steps/index.html | 48 - .../web/api/windoworworkerglobalscope/index.html | 127 - .../reference/global_objects/boolean/index.html | 84 - .../reference/global_objects/error/index.html | 116 - .../reference/global_objects/evalerror/index.html | 91 - .../reference/global_objects/function/index.html | 101 - .../global_objects/generatorfunction/index.html | 67 - .../global_objects/internalerror/index.html | 64 - .../reference/global_objects/number/index.html | 91 - .../reference/global_objects/promise/index.html | 71 - .../reference/global_objects/rangeerror/index.html | 91 - .../global_objects/referenceerror/index.html | 92 - .../global_objects/syntaxerror/index.html | 90 - .../reference/global_objects/typeerror/index.html | 89 - .../reference/global_objects/urierror/index.html | 90 - .../web/javascript/reference/operators/index.html | 315 - .../reference/operators/spread_syntax/index.html | 284 - .../index.html | 421 -- .../index.html | 562 -- .../index.html | 247 - .../index.html | 255 - .../reference/statements/switch/index.html | 119 - files/uk/glossary/404/index.html | 18 - files/uk/glossary/abstraction/index.html | 19 - files/uk/glossary/accessibility/index.html | 33 - files/uk/glossary/adobe_flash/index.html | 20 - files/uk/glossary/ajax/index.html | 25 - files/uk/glossary/algorithm/index.html | 19 - files/uk/glossary/alignment_container/index.html | 17 - files/uk/glossary/alignment_subject/index.html | 33 - files/uk/glossary/api/index.html | 35 - files/uk/glossary/apple_safari/index.html | 26 - files/uk/glossary/argument/index.html | 28 - files/uk/glossary/array/index.html | 33 - files/uk/glossary/ascii/index.html | 14 - files/uk/glossary/asynchronous/index.html | 38 - files/uk/glossary/block/css/index.html | 24 - files/uk/glossary/block/index.html | 20 - files/uk/glossary/block/scripting/index.html | 20 - files/uk/glossary/boolean/index.html | 54 - files/uk/glossary/browser/index.html | 27 - files/uk/glossary/buffer/index.html | 34 - files/uk/glossary/cache/index.html | 19 - files/uk/glossary/callback_function/index.html | 35 - files/uk/glossary/canvas/index.html | 29 - files/uk/glossary/character/index.html | 21 - files/uk/glossary/character_encoding/index.html | 25 - files/uk/glossary/cipher/index.html | 34 - files/uk/glossary/ciphertext/index.html | 20 - files/uk/glossary/closure/index.html | 47 - files/uk/glossary/compile/index.html | 27 - files/uk/glossary/computer_programming/index.html | 21 - files/uk/glossary/conditional/index.html | 30 - files/uk/glossary/constant/index.html | 19 - files/uk/glossary/control_flow/index.html | 45 - files/uk/glossary/cryptanalysis/index.html | 20 - .../cryptographic_hash_function/index.html | 28 - files/uk/glossary/cryptography/index.html | 23 - files/uk/glossary/css/index.html | 48 - files/uk/glossary/data_structure/index.html | 16 - files/uk/glossary/decryption/index.html | 26 - files/uk/glossary/doctype/index.html | 30 - files/uk/glossary/dom/index.html | 30 - .../dynamic_programming_language/index.html | 23 - files/uk/glossary/ecmascript/index.html | 22 - files/uk/glossary/element/index.html | 21 - files/uk/glossary/encryption/index.html | 25 - files/uk/glossary/engine/index.html | 18 - files/uk/glossary/falsy/index.html | 107 - files/uk/glossary/function/index.html | 90 - files/uk/glossary/general_header/index.html | 12 - files/uk/glossary/global_object/index.html | 35 - files/uk/glossary/gpu/index.html | 11 - files/uk/glossary/hash/index.html | 14 - files/uk/glossary/hoisting/index.html | 87 - files/uk/glossary/html/index.html | 47 - files/uk/glossary/html5/index.html | 14 - files/uk/glossary/http/index.html | 26 - files/uk/glossary/http_2/index.html | 19 - files/uk/glossary/http_header/index.html | 78 - files/uk/glossary/hyperlink/index.html | 27 - files/uk/glossary/hypertext/index.html | 25 - files/uk/glossary/ide/index.html | 17 - files/uk/glossary/identifier/index.html | 20 - files/uk/glossary/iife/index.html | 62 - files/uk/glossary/index.html | 24 - files/uk/glossary/internet/index.html | 20 - files/uk/glossary/java/index.html | 18 - files/uk/glossary/javascript/index.html | 44 - files/uk/glossary/json/index.html | 28 - files/uk/glossary/ligature/index.html | 18 - files/uk/glossary/loop/index.html | 79 - files/uk/glossary/method/index.html | 39 - files/uk/glossary/mozilla_firefox/index.html | 28 - files/uk/glossary/nan/index.html | 28 - files/uk/glossary/node.js/index.html | 27 - files/uk/glossary/null/index.html | 25 - files/uk/glossary/number/index.html | 26 - files/uk/glossary/object/index.html | 18 - files/uk/glossary/object_reference/index.html | 50 - files/uk/glossary/oop/index.html | 22 - files/uk/glossary/operator/index.html | 24 - files/uk/glossary/polyfill/index.html | 21 - files/uk/glossary/primitive/index.html | 35 - files/uk/glossary/property/css/index.html | 37 - files/uk/glossary/property/index.html | 10 - files/uk/glossary/property/javascript/index.html | 26 - files/uk/glossary/protocol/index.html | 21 - .../prototype-based_programming/index.html | 16 - files/uk/glossary/proxy_server/index.html | 24 - files/uk/glossary/recursion/index.html | 43 - files/uk/glossary/regular_expression/index.html | 36 - files/uk/glossary/rest/index.html | 31 - files/uk/glossary/rss/index.html | 29 - files/uk/glossary/scope/index.html | 20 - .../self-executing_anonymous_function/index.html | 10 - files/uk/glossary/server/index.html | 25 - files/uk/glossary/shim/index.html | 16 - files/uk/glossary/statement/index.html | 34 - files/uk/glossary/static_method/index.html | 48 - files/uk/glossary/string/index.html | 21 - files/uk/glossary/svg/index.html | 36 - files/uk/glossary/symbol/index.html | 109 - files/uk/glossary/synchronous/index.html | 22 - files/uk/glossary/truthy/index.html | 52 - files/uk/glossary/type/index.html | 24 - files/uk/glossary/type_coercion/index.html | 42 - files/uk/glossary/type_conversion/index.html | 27 - files/uk/glossary/undefined/index.html | 23 - files/uk/glossary/uri/index.html | 23 - files/uk/glossary/url/index.html | 27 - files/uk/glossary/urn/index.html | 19 - files/uk/glossary/utf-8/index.html | 22 - files/uk/glossary/ux/index.html | 22 - files/uk/glossary/value/index.html | 36 - files/uk/glossary/variable/index.html | 25 - files/uk/glossary/viewport/index.html | 24 - files/uk/glossary/w3c/index.html | 32 - files/uk/glossary/webgl/index.html | 33 - files/uk/glossary/websockets/index.html | 35 - files/uk/glossary/whitespace/index.html | 44 - files/uk/glossary/world_wide_web/index.html | 41 - files/uk/glossary/wrapper/index.html | 19 - files/uk/glossary/xml/index.html | 18 - files/uk/learn/accessibility/index.html | 76 - files/uk/learn/common_questions/index.html | 133 - .../set_up_a_local_testing_server/index.html | 95 - .../cascade_and_inheritance/index.html | 337 -- files/uk/learn/css/building_blocks/index.html | 90 - files/uk/learn/css/css_layout/index.html | 71 - .../learn/css/first_steps/how_css_works/index.html | 115 - files/uk/learn/css/first_steps/index.html | 53 - .../learn/css/first_steps/what_is_css/index.html | 130 - files/uk/learn/css/index.html | 68 - files/uk/learn/css/styling_text/index.html | 57 - .../css/styling_text/styling_lists/index.html | 395 -- files/uk/learn/forms/index.html | 78 - files/uk/learn/forms/your_first_form/index.html | 299 - files/uk/learn/front-end_web_developer/index.html | 203 - .../css_basics/index.html | 273 - .../dealing_with_files/index.html | 101 - .../how_the_web_works/index.html | 94 - .../html_basics/index.html | 214 - .../learn/getting_started_with_the_web/index.html | 64 - .../installing_basic_software/index.html | 63 - .../javascript_basics/index.html | 401 -- .../publishing_your_website/index.html | 111 - .../the_web_and_web_standards/index.html | 165 - .../what_will_your_website_look_like/index.html | 118 - files/uk/learn/html/index.html | 54 - .../creating_hyperlinks/index.html | 322 - .../introduction_to_html/debugging_html/index.html | 186 - .../getting_started/index.html | 522 -- .../html_text_fundamentals/index.html | 953 --- .../uk/learn/html/introduction_to_html/index.html | 55 - .../the_head_metadata_in_html/index.html | 277 - .../learn/html/multimedia_and_embedding/index.html | 55 - files/uk/learn/html/tables/index.html | 40 - files/uk/learn/index.html | 112 - files/uk/learn/javascript/asynchronous/index.html | 52 - .../uk/learn/javascript/building_blocks/index.html | 58 - .../javascript/client-side_web_apis/index.html | 43 - files/uk/learn/javascript/first_steps/index.html | 69 - .../first_steps/what_is_javascript/index.html | 422 -- files/uk/learn/javascript/index.html | 65 - .../uk/learn/javascript/objects/basics/index.html | 259 - files/uk/learn/javascript/objects/index.html | 46 - .../objects/object-oriented_js/index.html | 295 - .../uk/learn/learning_and_getting_help/index.html | 316 - files/uk/learn/server-side/django/index.html | 60 - .../server-side/django/introduction/index.html | 285 - .../uk/learn/server-side/express_nodejs/index.html | 77 - .../server-side/express_nodejs/routes/index.html | 644 -- files/uk/learn/server-side/index.html | 52 - .../client-side_javascript_frameworks/index.html | 139 - .../svelte_getting_started/index.html | 538 -- .../cross_browser_testing/index.html | 42 - files/uk/learn/tools_and_testing/github/index.html | 87 - files/uk/learn/tools_and_testing/index.html | 61 - .../understanding_client-side_tools/index.html | 38 - files/uk/mdn/about/index.html | 116 - files/uk/mdn/contribute/getting_started/index.html | 107 - .../howto/create_and_edit_pages/index.html | 181 - files/uk/mdn/contribute/howto/index.html | 13 - files/uk/mdn/contribute/index.html | 18 - files/uk/mdn/guidelines/index.html | 13 - .../mdn/guidelines/writing_style_guide/index.html | 727 --- files/uk/mdn/index.html | 28 - files/uk/mdn/structures/index.html | 14 - .../macros/commonly-used_macros/index.html | 218 - files/uk/mdn/structures/macros/index.html | 47 - files/uk/mdn/tools/index.html | 17 - files/uk/mdn/tools/kumascript/index.html | 500 -- .../tools/kumascript/troubleshooting/index.html | 62 - files/uk/mdn/yari/index.html | 26 - files/uk/mozilla/add-ons/index.html | 110 - .../mozilla/add-ons/webextensions/api/index.html | 57 - .../add-ons/webextensions/api/sessions/index.html | 136 - .../webextensions/api/sessions/restore/index.html | 108 - files/uk/mozilla/add-ons/webextensions/index.html | 120 - .../interact_with_the_clipboard/index.html | 171 - .../what_are_webextensions/index.html | 26 - .../firefox/experimental_features/index.html | 537 -- files/uk/mozilla/firefox/index.html | 86 - files/uk/mozilla/firefox/releases/53/index.html | 135 - files/uk/mozilla/firefox/releases/54/index.html | 116 - files/uk/mozilla/firefox/releases/56/index.html | 122 - files/uk/mozilla/firefox/releases/index.html | 12 - files/uk/mozilla/index.html | 14 - .../uk/orphaned/learn/how_to_contribute/index.html | 84 - files/uk/orphaned/mdn/community/index.html | 54 - .../contribute/howto/be_a_beta_tester/index.html | 46 - .../howto/create_an_mdn_account/index.html | 43 - .../howto/do_an_editorial_review/index.html | 65 - .../howto/set_the_summary_for_a_page/index.html | 48 - .../global_objects/array/prototype/index.html | 186 - .../asyncfunction/prototype/index.html | 60 - files/uk/tools/index.html | 310 - files/uk/tools/network_monitor/index.html | 54 - .../performance_analysis/index.html | 37 - .../uk/tools/network_monitor/recording/index.html | 33 - .../network_monitor/request_details/index.html | 189 - .../tools/network_monitor/request_list/index.html | 346 -- .../uk/tools/network_monitor/throttling/index.html | 98 - files/uk/tools/network_monitor/toolbar/index.html | 54 - files/uk/tools/page_inspector/how_to/index.html | 13 - files/uk/tools/page_inspector/index.html | 60 - .../tools/web_console/console_messages/index.html | 386 -- files/uk/tools/web_console/index.html | 38 - .../uk/tools/web_console/split_console/index.html | 23 - files/uk/tools/web_console/ui_tour/index.html | 26 - files/uk/web/accessibility/index.html | 74 - .../accessibility/understanding_wcag/index.html | 59 - .../understanding_wcag/keyboard/index.html | 94 - files/uk/web/api/ambient_light_events/index.html | 66 - files/uk/web/api/angle_instanced_arrays/index.html | 83 - files/uk/web/api/blob/index.html | 230 - files/uk/web/api/canvas_api/index.html | 166 - .../api/canvas_api/tutorial/basic_usage/index.html | 152 - .../hit_regions_and_accessibility/index.html | 109 - files/uk/web/api/canvas_api/tutorial/index.html | 63 - files/uk/web/api/console/dir/index.html | 104 - files/uk/web/api/console/index.html | 278 - files/uk/web/api/console/log/index.html | 173 - files/uk/web/api/customevent/index.html | 96 - .../web/api/customevent/initcustomevent/index.html | 120 - files/uk/web/api/document/index.html | 470 -- .../api/document/visibilitychange_event/index.html | 82 - files/uk/web/api/domstring/index.html | 45 - files/uk/web/api/element/getclientrects/index.html | 219 - files/uk/web/api/element/index.html | 490 -- files/uk/web/api/event/index.html | 189 - files/uk/web/api/event/target/index.html | 135 - files/uk/web/api/globaleventhandlers/index.html | 273 - .../api/globaleventhandlers/onkeydown/index.html | 93 - .../web/api/globaleventhandlers/onkeyup/index.html | 95 - .../api/globaleventhandlers/onmouseover/index.html | 71 - files/uk/web/api/headers/index.html | 133 - files/uk/web/api/history_api/index.html | 122 - files/uk/web/api/html_dom_api/index.html | 472 -- .../api/html_dom_api/microtask_guide/index.html | 324 - files/uk/web/api/htmlcanvaselement/index.html | 264 - files/uk/web/api/htmlelement/index.html | 486 -- files/uk/web/api/htmlelement/offsettop/index.html | 60 - files/uk/web/api/htmlformelement/index.html | 245 - files/uk/web/api/htmlformelement/reset/index.html | 70 - files/uk/web/api/htmlimageelement/image/index.html | 117 - files/uk/web/api/htmlimageelement/index.html | 401 -- .../api/htmlmediaelement/abort_event/index.html | 69 - files/uk/web/api/index.html | 26 - .../web/api/intersection_observer_api/index.html | 610 -- .../web/api/mediaquerylist/addlistener/index.html | 82 - files/uk/web/api/mediaquerylist/index.html | 109 - .../uk/web/api/network_information_api/index.html | 87 - files/uk/web/api/networkinformation/index.html | 88 - files/uk/web/api/node/contains/index.html | 112 - files/uk/web/api/node/index.html | 508 -- files/uk/web/api/page_visibility_api/index.html | 202 - files/uk/web/api/promiserejectionevent/index.html | 95 - .../api/promiserejectionevent/promise/index.html | 76 - .../promiserejectionevent/index.html | 89 - .../api/promiserejectionevent/reason/index.html | 66 - .../web/api/svganimatedstring/animval/index.html | 44 - files/uk/web/api/svganimatedstring/index.html | 60 - files/uk/web/api/urlsearchparams/index.html | 171 - files/uk/web/api/web_workers_api/index.html | 215 - files/uk/web/api/webgl_api/index.html | 238 - files/uk/web/api/websocket/index.html | 330 - files/uk/web/api/window/confirm/index.html | 69 - files/uk/web/api/window/console/index.html | 56 - .../api/window/domcontentloaded_event/index.html | 153 - files/uk/web/api/window/history/index.html | 63 - files/uk/web/api/window/index.html | 460 -- files/uk/web/api/window/localstorage/index.html | 147 - .../api/window/rejectionhandled_event/index.html | 85 - files/uk/web/api/window/self/index.html | 70 - .../api/window/unhandledrejection_event/index.html | 120 - files/uk/web/api/windoweventhandlers/index.html | 105 - .../onrejectionhandled/index.html | 52 - .../onunhandledrejection/index.html | 56 - .../web/api/windoworworkerglobalscope/index.html | 189 - .../settimeout/index.html | 429 -- files/uk/web/api/xmlhttprequest/index.html | 178 - files/uk/web/css/-moz-orient/index.html | 153 - .../uk/web/css/@font-face/font-display/index.html | 87 - files/uk/web/css/@font-face/index.html | 197 - files/uk/web/css/@page/bleed/index.html | 83 - files/uk/web/css/@page/index.html | 112 - files/uk/web/css/_colon_active/index.html | 129 - files/uk/web/css/_colon_root/index.html | 100 - files/uk/web/css/_doublecolon_before/index.html | 237 - files/uk/web/css/_doublecolon_slotted/index.html | 104 - .../uk/web/css/alternative_style_sheets/index.html | 81 - files/uk/web/css/animation-name/index.html | 141 - files/uk/web/css/attr()/index.html | 265 - files/uk/web/css/backdrop-filter/index.html | 136 - files/uk/web/css/css_animations/index.html | 140 - .../css_animations/using_css_animations/index.html | 358 -- files/uk/web/css/css_box_model/index.html | 162 - .../mastering_margin_collapsing/index.html | 91 - .../basic_concepts_of_flexbox/index.html | 392 -- .../uk/web/css/css_flexible_box_layout/index.html | 132 - .../basic_concepts_of_grid_layout/index.html | 699 --- files/uk/web/css/css_grid_layout/index.html | 245 - .../relationship_of_grid_layout/index.html | 628 -- files/uk/web/css/css_selectors/index.html | 116 - files/uk/web/css/filter/index.html | 1184 ---- files/uk/web/css/flex-grow/index.html | 194 - files/uk/web/css/flex/index.html | 209 - files/uk/web/css/font-smooth/index.html | 85 - files/uk/web/css/font-weight/index.html | 271 - files/uk/web/css/grid-template-areas/index.html | 181 - files/uk/web/css/index.html | 92 - files/uk/web/css/layout_cookbook/index.html | 81 - files/uk/web/css/layout_mode/index.html | 31 - files/uk/web/css/linear-gradient()/index.html | 208 - files/uk/web/css/mozilla_extensions/index.html | 680 --- files/uk/web/css/order/index.html | 170 - files/uk/web/css/position/index.html | 461 -- files/uk/web/css/reference/index.html | 189 - files/uk/web/css/resize/index.html | 212 - .../uk/web/css/visual_formatting_model/index.html | 226 - files/uk/web/css/z-index/index.html | 134 - files/uk/web/events/index.html | 2310 ------- files/uk/web/guide/graphics/index.html | 50 - .../web/guide/html/content_categories/index.html | 168 - files/uk/web/guide/html/html5/index.html | 164 - .../using_html_sections_and_outlines/index.html | 338 -- files/uk/web/guide/index.html | 66 - files/uk/web/houdini/index.html | 88 - files/uk/web/html/attributes/index.html | 654 -- files/uk/web/html/block-level_elements/index.html | 133 - files/uk/web/html/element/header/index.html | 146 - files/uk/web/html/element/html/index.html | 170 - files/uk/web/html/element/iframe/index.html | 261 - files/uk/web/html/element/index.html | 97 - files/uk/web/html/element/input/date/index.html | 510 -- .../html/element/input/datetime-local/index.html | 543 -- files/uk/web/html/element/input/index.html | 753 --- files/uk/web/html/element/link/index.html | 326 - files/uk/web/html/element/nav/index.html | 100 - files/uk/web/html/element/script/index.html | 244 - files/uk/web/html/element/section/index.html | 174 - files/uk/web/html/element/style/index.html | 202 - files/uk/web/html/element/table/index.html | 372 -- files/uk/web/html/element/video/index.html | 421 -- .../web/html/global_attributes/hidden/index.html | 69 - files/uk/web/html/global_attributes/index.html | 475 -- .../html/global_attributes/itemscope/index.html | 320 - .../uk/web/html/global_attributes/lang/index.html | 91 - .../web/html/global_attributes/tabindex/index.html | 97 - files/uk/web/html/index.html | 91 - files/uk/web/html/inline_elements/index.html | 79 - .../html/quirks_mode_and_standards_mode/index.html | 47 - files/uk/web/html/reference/index.html | 28 - files/uk/web/http/basics_of_http/index.html | 51 - .../web/http/basics_of_http/mime_types/index.html | 367 -- files/uk/web/http/cors/index.html | 550 -- .../uk/web/http/headers/accept-encoding/index.html | 110 - .../uk/web/http/headers/accept-language/index.html | 95 - files/uk/web/http/headers/connection/index.html | 47 - .../uk/web/http/headers/content-length/index.html | 63 - files/uk/web/http/headers/content-type/index.html | 114 - files/uk/web/http/headers/etag/index.html | 99 - files/uk/web/http/headers/if-match/index.html | 87 - files/uk/web/http/headers/index.html | 383 -- files/uk/web/http/headers/location/index.html | 79 - files/uk/web/http/headers/referer/index.html | 81 - files/uk/web/http/headers/user-agent/index.html | 134 - .../web/http/headers/x-forwarded-proto/index.html | 70 - files/uk/web/http/index.html | 100 - files/uk/web/http/methods/get/index.html | 69 - files/uk/web/http/methods/index.html | 75 - files/uk/web/http/methods/post/index.html | 118 - files/uk/web/http/methods/put/index.html | 97 - files/uk/web/http/session/index.html | 171 - files/uk/web/http/status/100/index.html | 46 - files/uk/web/http/status/101/index.html | 46 - files/uk/web/http/status/200/index.html | 54 - files/uk/web/http/status/201/index.html | 46 - files/uk/web/http/status/203/index.html | 45 - files/uk/web/http/status/204/index.html | 56 - files/uk/web/http/status/206/index.html | 84 - files/uk/web/http/status/418/index.html | 39 - files/uk/web/http/status/422/index.html | 41 - files/uk/web/http/status/index.html | 171 - files/uk/web/index.html | 121 - .../a_re-introduction_to_javascript/index.html | 949 --- .../uk/web/javascript/about_javascript/index.html | 61 - files/uk/web/javascript/closures/index.html | 471 -- files/uk/web/javascript/data_structures/index.html | 305 - .../index.html | 330 - .../equality_comparisons_and_sameness/index.html | 495 -- files/uk/web/javascript/eventloop/index.html | 152 - .../control_flow_and_error_handling/index.html | 465 -- .../guide/details_of_the_object_model/index.html | 761 --- .../guide/expressions_and_operators/index.html | 926 --- files/uk/web/javascript/guide/functions/index.html | 655 -- .../javascript/guide/grammar_and_types/index.html | 716 --- files/uk/web/javascript/guide/index.html | 131 - .../guide/indexed_collections/index.html | 578 -- .../web/javascript/guide/introduction/index.html | 147 - .../guide/iterators_and_generators/index.html | 214 - .../guide/loops_and_iteration/index.html | 355 -- .../javascript/guide/numbers_and_dates/index.html | 383 -- .../guide/regular_expressions/index.html | 635 -- .../web/javascript/guide/using_promises/index.html | 363 -- .../guide/working_with_objects/index.html | 490 -- files/uk/web/javascript/index.html | 119 - .../inheritance_and_the_prototype_chain/index.html | 306 - .../javascript_technologies_overview/index.html | 88 - .../uk/web/javascript/memory_management/index.html | 204 - .../reference/classes/constructor/index.html | 119 - .../reference/classes/extends/index.html | 112 - .../uk/web/javascript/reference/classes/index.html | 418 -- .../javascript/reference/classes/static/index.html | 137 - .../deprecated_and_obsolete_features/index.html | 293 - .../the_legacy_iterator_protocol/index.html | 76 - .../reference/errors/cant_delete/index.html | 59 - .../errors/deprecated_tolocaleformat/index.html | 93 - .../uk/web/javascript/reference/errors/index.html | 31 - .../errors/invalid_for-in_initializer/index.html | 77 - .../reference/errors/json_bad_parse/index.html | 112 - .../errors/more_arguments_needed/index.html | 46 - .../errors/negative_repetition_count/index.html | 48 - .../reference/errors/not_a_constructor/index.html | 91 - .../reference/errors/not_a_function/index.html | 124 - .../errors/resulting_string_too_large/index.html | 53 - .../functions/arguments/@@iterator/index.html | 77 - .../reference/functions/arguments/index.html | 282 - .../functions/arguments/length/index.html | 85 - .../reference/functions/arrow_functions/index.html | 363 -- .../javascript/reference/functions/get/index.html | 175 - .../web/javascript/reference/functions/index.html | 605 -- .../functions/method_definitions/index.html | 219 - .../reference/functions/rest_parameters/index.html | 212 - .../javascript/reference/functions/set/index.html | 152 - .../global_objects/array/@@iterator/index.html | 116 - .../global_objects/array/@@species/index.html | 72 - .../global_objects/array/@@unscopables/index.html | 76 - .../global_objects/array/array/index.html | 87 - .../global_objects/array/concat/index.html | 168 - .../global_objects/array/copywithin/index.html | 188 - .../global_objects/array/entries/index.html | 96 - .../global_objects/array/every/index.html | 195 - .../reference/global_objects/array/fill/index.html | 155 - .../global_objects/array/filter/index.html | 235 - .../reference/global_objects/array/find/index.html | 233 - .../global_objects/array/findindex/index.html | 187 - .../reference/global_objects/array/flat/index.html | 150 - .../global_objects/array/flatmap/index.html | 152 - .../global_objects/array/foreach/index.html | 290 - .../reference/global_objects/array/from/index.html | 242 - .../global_objects/array/includes/index.html | 135 - .../reference/global_objects/array/index.html | 431 -- .../global_objects/array/indexof/index.html | 260 - .../global_objects/array/isarray/index.html | 131 - .../reference/global_objects/array/join/index.html | 114 - .../reference/global_objects/array/keys/index.html | 82 - .../global_objects/array/lastindexof/index.html | 166 - .../global_objects/array/length/index.html | 139 - .../reference/global_objects/array/map/index.html | 349 -- .../reference/global_objects/array/of/index.html | 100 - .../reference/global_objects/array/pop/index.html | 118 - .../reference/global_objects/array/push/index.html | 136 - .../global_objects/array/reduce/index.html | 578 -- .../global_objects/array/reduceright/index.html | 364 -- .../global_objects/array/reverse/index.html | 89 - .../global_objects/array/shift/index.html | 141 - .../global_objects/array/slice/index.html | 242 - .../reference/global_objects/array/some/index.html | 206 - .../reference/global_objects/array/sort/index.html | 274 - .../global_objects/array/splice/index.html | 162 - .../global_objects/array/tolocalestring/index.html | 182 - .../global_objects/array/tosource/index.html | 72 - .../global_objects/array/tostring/index.html | 80 - .../global_objects/array/unshift/index.html | 123 - .../global_objects/array/values/index.html | 93 - .../global_objects/asyncfunction/index.html | 128 - .../global_objects/bigint/asintn/index.html | 78 - .../global_objects/bigint/asuintn/index.html | 77 - .../global_objects/bigint/bigint/index.html | 64 - .../reference/global_objects/bigint/index.html | 296 - .../bigint/tolocalestring/index.html | 123 - .../global_objects/bigint/tostring/index.html | 93 - .../global_objects/bigint/valueof/index.html | 57 - .../global_objects/boolean/boolean/index.html | 75 - .../reference/global_objects/boolean/index.html | 157 - .../global_objects/boolean/tosource/index.html | 58 - .../global_objects/boolean/tostring/index.html | 99 - .../global_objects/boolean/valueof/index.html | 94 - .../global_objects/date/@@toprimitive/index.html | 73 - .../reference/global_objects/date/date/index.html | 135 - .../global_objects/date/getdate/index.html | 64 - .../global_objects/date/getday/index.html | 77 - .../global_objects/date/getfullyear/index.html | 68 - .../global_objects/date/gethours/index.html | 65 - .../global_objects/date/getmilliseconds/index.html | 61 - .../global_objects/date/getminutes/index.html | 61 - .../global_objects/date/getmonth/index.html | 74 - .../global_objects/date/getseconds/index.html | 63 - .../global_objects/date/gettime/index.html | 109 - .../date/gettimezoneoffset/index.html | 97 - .../global_objects/date/getutcdate/index.html | 60 - .../global_objects/date/getutcday/index.html | 62 - .../global_objects/date/getutcfullyear/index.html | 65 - .../global_objects/date/getutchours/index.html | 61 - .../date/getutcmilliseconds/index.html | 63 - .../global_objects/date/getutcminutes/index.html | 59 - .../global_objects/date/getutcmonth/index.html | 61 - .../global_objects/date/getutcseconds/index.html | 61 - .../global_objects/date/getyear/index.html | 107 - .../reference/global_objects/date/index.html | 269 - .../reference/global_objects/date/now/index.html | 86 - .../reference/global_objects/date/parse/index.html | 198 - .../global_objects/date/setdate/index.html | 79 - .../global_objects/date/setfullyear/index.html | 77 - .../global_objects/date/sethours/index.html | 82 - .../global_objects/date/setmilliseconds/index.html | 70 - .../global_objects/date/setminutes/index.html | 80 - .../global_objects/date/setmonth/index.html | 83 - .../global_objects/date/setseconds/index.html | 78 - .../global_objects/date/settime/index.html | 71 - .../global_objects/date/setutcdate/index.html | 70 - .../global_objects/date/setutcfullyear/index.html | 76 - .../global_objects/date/setutchours/index.html | 78 - .../date/setutcmilliseconds/index.html | 70 - .../global_objects/date/setutcminutes/index.html | 76 - .../global_objects/date/setutcmonth/index.html | 74 - .../global_objects/date/setutcseconds/index.html | 74 - .../global_objects/date/setyear/index.html | 74 - .../global_objects/date/todatestring/index.html | 81 - .../global_objects/date/togmtstring/index.html | 64 - .../global_objects/date/toisostring/index.html | 93 - .../global_objects/date/tojson/index.html | 69 - .../date/tolocaledatestring/index.html | 154 - .../global_objects/date/tolocalestring/index.html | 178 - .../date/tolocaletimestring/index.html | 152 - .../global_objects/date/tosource/index.html | 49 - .../global_objects/date/tostring/index.html | 110 - .../global_objects/date/totimestring/index.html | 68 - .../global_objects/date/toutcstring/index.html | 109 - .../reference/global_objects/date/utc/index.html | 153 - .../global_objects/date/valueof/index.html | 65 - .../global_objects/error/columnnumber/index.html | 44 - .../global_objects/error/error/index.html | 63 - .../global_objects/error/filename/index.html | 47 - .../reference/global_objects/error/index.html | 216 - .../global_objects/error/linenumber/index.html | 56 - .../global_objects/error/message/index.html | 57 - .../reference/global_objects/error/name/index.html | 57 - .../global_objects/error/stack/index.html | 125 - .../global_objects/error/tosource/index.html | 59 - .../global_objects/error/tostring/index.html | 98 - .../reference/global_objects/eval/index.html | 323 - .../reference/global_objects/evalerror/index.html | 98 - .../global_objects/function/apply/index.html | 239 - .../global_objects/function/arguments/index.html | 92 - .../global_objects/function/bind/index.html | 329 - .../global_objects/function/call/index.html | 168 - .../global_objects/function/caller/index.html | 82 - .../global_objects/function/displayname/index.html | 80 - .../reference/global_objects/function/index.html | 155 - .../global_objects/function/length/index.html | 91 - .../global_objects/function/name/index.html | 223 - .../global_objects/function/tosource/index.html | 70 - .../global_objects/function/tostring/index.html | 233 - .../reference/global_objects/generator/index.html | 138 - .../global_objects/generator/next/index.html | 114 - .../global_objects/generator/return/index.html | 101 - .../global_objects/generator/throw/index.html | 100 - .../global_objects/generatorfunction/index.html | 114 - .../reference/global_objects/globalthis/index.html | 81 - .../javascript/reference/global_objects/index.html | 193 - .../reference/global_objects/infinity/index.html | 79 - .../global_objects/internalerror/index.html | 83 - .../reference/global_objects/isfinite/index.html | 88 - .../reference/global_objects/isnan/index.html | 190 - .../reference/global_objects/json/index.html | 158 - .../reference/global_objects/json/parse/index.html | 133 - .../global_objects/json/stringify/index.html | 321 - .../reference/global_objects/map/index.html | 201 - .../reference/global_objects/math/abs/index.html | 104 - .../reference/global_objects/math/acos/index.html | 110 - .../reference/global_objects/math/acosh/index.html | 91 - .../reference/global_objects/math/asin/index.html | 103 - .../reference/global_objects/math/asinh/index.html | 92 - .../reference/global_objects/math/atan/index.html | 106 - .../reference/global_objects/math/atan2/index.html | 119 - .../reference/global_objects/math/atanh/index.html | 92 - .../reference/global_objects/math/cbrt/index.html | 100 - .../reference/global_objects/math/ceil/index.html | 174 - .../reference/global_objects/math/clz32/index.html | 113 - .../reference/global_objects/math/cos/index.html | 83 - .../reference/global_objects/math/cosh/index.html | 93 - .../reference/global_objects/math/e/index.html | 85 - .../reference/global_objects/math/exp/index.html | 76 - .../reference/global_objects/math/expm1/index.html | 85 - .../reference/global_objects/math/floor/index.html | 164 - .../global_objects/math/fround/index.html | 114 - .../reference/global_objects/math/hypot/index.html | 119 - .../reference/global_objects/math/imul/index.html | 97 - .../reference/global_objects/math/index.html | 153 - .../reference/global_objects/math/ln10/index.html | 66 - .../reference/global_objects/math/ln2/index.html | 70 - .../reference/global_objects/math/log/index.html | 113 - .../reference/global_objects/math/log10/index.html | 92 - .../global_objects/math/log10e/index.html | 66 - .../reference/global_objects/math/log1p/index.html | 94 - .../reference/global_objects/math/log2/index.html | 102 - .../reference/global_objects/math/log2e/index.html | 66 - .../reference/global_objects/math/max/index.html | 102 - .../reference/global_objects/math/min/index.html | 98 - .../reference/global_objects/math/pi/index.html | 64 - .../reference/global_objects/math/pow/index.html | 117 - .../global_objects/math/random/index.html | 113 - .../reference/global_objects/math/round/index.html | 195 - .../reference/global_objects/math/sign/index.html | 116 - .../reference/global_objects/math/sin/index.html | 78 - .../reference/global_objects/math/sinh/index.html | 93 - .../reference/global_objects/math/sqrt/index.html | 81 - .../global_objects/math/sqrt1_2/index.html | 65 - .../reference/global_objects/math/sqrt2/index.html | 65 - .../reference/global_objects/math/tan/index.html | 83 - .../reference/global_objects/math/tanh/index.html | 85 - .../reference/global_objects/math/trunc/index.html | 128 - .../reference/global_objects/nan/index.html | 91 - .../reference/global_objects/null/index.html | 93 - .../global_objects/number/epsilon/index.html | 68 - .../reference/global_objects/number/index.html | 187 - .../global_objects/number/isfinite/index.html | 87 - .../global_objects/number/isinteger/index.html | 95 - .../global_objects/number/isnan/index.html | 101 - .../global_objects/number/issafeinteger/index.html | 96 - .../number/max_safe_integer/index.html | 79 - .../global_objects/number/max_value/index.html | 65 - .../number/min_safe_integer/index.html | 63 - .../global_objects/number/min_value/index.html | 67 - .../reference/global_objects/number/nan/index.html | 60 - .../number/negative_infinity/index.html | 83 - .../global_objects/number/number/index.html | 64 - .../global_objects/number/parsefloat/index.html | 89 - .../global_objects/number/parseint/index.html | 84 - .../number/positive_infinity/index.html | 83 - .../global_objects/number/toexponential/index.html | 90 - .../global_objects/number/tofixed/index.html | 96 - .../number/tolocalestring/index.html | 155 - .../global_objects/number/toprecision/index.html | 89 - .../global_objects/number/tosource/index.html | 55 - .../global_objects/number/tostring/index.html | 98 - .../global_objects/number/valueof/index.html | 68 - .../object/__definegetter__/index.html | 101 - .../object/__definesetter__/index.html | 116 - .../object/__lookupgetter__/index.html | 89 - .../object/__lookupsetter__/index.html | 89 - .../global_objects/object/assign/index.html | 273 - .../global_objects/object/constructor/index.html | 237 - .../global_objects/object/create/index.html | 406 -- .../object/defineproperties/index.html | 198 - .../object/defineproperty/index.html | 501 -- .../global_objects/object/entries/index.html | 157 - .../global_objects/object/freeze/index.html | 256 - .../global_objects/object/fromentries/index.html | 112 - .../object/getownpropertydescriptor/index.html | 159 - .../object/getownpropertydescriptors/index.html | 118 - .../object/getownpropertynames/index.html | 175 - .../object/getownpropertysymbols/index.html | 84 - .../object/getprototypeof/index.html | 98 - .../object/hasownproperty/index.html | 158 - .../reference/global_objects/object/index.html | 267 - .../reference/global_objects/object/is/index.html | 128 - .../global_objects/object/isextensible/index.html | 112 - .../global_objects/object/isfrozen/index.html | 178 - .../global_objects/object/isprototypeof/index.html | 125 - .../global_objects/object/issealed/index.html | 139 - .../global_objects/object/keys/index.html | 171 - .../global_objects/object/object/index.html | 84 - .../object/preventextensions/index.html | 139 - .../object/propertyisenumerable/index.html | 149 - .../global_objects/object/proto/index.html | 127 - .../global_objects/object/seal/index.html | 151 - .../object/setprototypeof/index.html | 220 - .../object/tolocalestring/index.html | 111 - .../global_objects/object/tosource/index.html | 132 - .../global_objects/object/tostring/index.html | 148 - .../global_objects/object/valueof/index.html | 115 - .../global_objects/object/values/index.html | 104 - .../reference/global_objects/parsefloat/index.html | 111 - .../reference/global_objects/parseint/index.html | 215 - .../global_objects/promise/all/index.html | 232 - .../global_objects/promise/allsettled/index.html | 61 - .../global_objects/promise/any/index.html | 86 - .../global_objects/promise/catch/index.html | 189 - .../global_objects/promise/finally/index.html | 103 - .../reference/global_objects/promise/index.html | 232 - .../global_objects/promise/promise/index.html | 77 - .../global_objects/promise/race/index.html | 177 - .../global_objects/promise/reject/index.html | 74 - .../global_objects/promise/resolve/index.html | 137 - .../global_objects/promise/then/index.html | 297 - .../reference/global_objects/proxy/index.html | 399 -- .../reference/global_objects/rangeerror/index.html | 141 - .../global_objects/referenceerror/index.html | 108 - .../reference/global_objects/reflect/index.html | 82 - .../global_objects/regexp/exec/index.html | 227 - .../reference/global_objects/regexp/index.html | 699 --- .../global_objects/regexp/source/index.html | 170 - .../global_objects/regexp/test/index.html | 151 - .../reference/global_objects/set/index.html | 242 - .../global_objects/string/@@iterator/index.html | 78 - .../global_objects/string/anchor/index.html | 83 - .../reference/global_objects/string/big/index.html | 73 - .../global_objects/string/blink/index.html | 70 - .../global_objects/string/bold/index.html | 66 - .../global_objects/string/charat/index.html | 316 - .../global_objects/string/charcodeat/index.html | 161 - .../global_objects/string/codepointat/index.html | 142 - .../global_objects/string/concat/index.html | 88 - .../global_objects/string/endswith/index.html | 90 - .../global_objects/string/fixed/index.html | 62 - .../global_objects/string/fontcolor/index.html | 81 - .../global_objects/string/fontsize/index.html | 80 - .../global_objects/string/fromcharcode/index.html | 109 - .../global_objects/string/fromcodepoint/index.html | 171 - .../global_objects/string/includes/index.html | 125 - .../reference/global_objects/string/index.html | 374 -- .../global_objects/string/indexof/index.html | 154 - .../global_objects/string/italics/index.html | 65 - .../global_objects/string/lastindexof/index.html | 107 - .../global_objects/string/length/index.html | 105 - .../global_objects/string/link/index.html | 72 - .../global_objects/string/localecompare/index.html | 173 - .../global_objects/string/match/index.html | 194 - .../global_objects/string/matchall/index.html | 143 - .../global_objects/string/normalize/index.html | 226 - .../global_objects/string/padend/index.html | 66 - .../global_objects/string/padstart/index.html | 84 - .../reference/global_objects/string/raw/index.html | 117 - .../global_objects/string/repeat/index.html | 119 - .../global_objects/string/replace/index.html | 240 - .../global_objects/string/replaceall/index.html | 169 - .../global_objects/string/search/index.html | 107 - .../global_objects/string/slice/index.html | 116 - .../global_objects/string/small/index.html | 70 - .../global_objects/string/split/index.html | 220 - .../global_objects/string/startswith/index.html | 96 - .../global_objects/string/strike/index.html | 67 - .../global_objects/string/string/index.html | 64 - .../reference/global_objects/string/sub/index.html | 68 - .../global_objects/string/substr/index.html | 118 - .../global_objects/string/substring/index.html | 181 - .../reference/global_objects/string/sup/index.html | 66 - .../string/tolocalelowercase/index.html | 106 - .../string/tolocaleuppercase/index.html | 107 - .../global_objects/string/tolowercase/index.html | 74 - .../global_objects/string/tosource/index.html | 56 - .../global_objects/string/tostring/index.html | 65 - .../global_objects/string/touppercase/index.html | 88 - .../global_objects/string/trim/index.html | 84 - .../global_objects/string/trimend/index.html | 80 - .../global_objects/string/trimstart/index.html | 115 - .../global_objects/string/valueof/index.html | 64 - .../global_objects/symbol/@@toprimitive/index.html | 64 - .../global_objects/symbol/asynciterator/index.html | 86 - .../global_objects/symbol/description/index.html | 67 - .../reference/global_objects/symbol/for/index.html | 108 - .../global_objects/symbol/hasinstance/index.html | 81 - .../reference/global_objects/symbol/index.html | 466 -- .../symbol/isconcatspreadable/index.html | 99 - .../global_objects/symbol/iterator/index.html | 116 - .../global_objects/symbol/keyfor/index.html | 75 - .../global_objects/symbol/match/index.html | 71 - .../global_objects/symbol/matchall/index.html | 78 - .../global_objects/symbol/replace/index.html | 66 - .../global_objects/symbol/search/index.html | 66 - .../global_objects/symbol/species/index.html | 69 - .../global_objects/symbol/split/index.html | 66 - .../global_objects/symbol/symbol/index.html | 83 - .../global_objects/symbol/toprimitive/index.html | 75 - .../global_objects/symbol/tosource/index.html | 57 - .../global_objects/symbol/tostring/index.html | 76 - .../global_objects/symbol/tostringtag/index.html | 99 - .../global_objects/symbol/unscopables/index.html | 89 - .../global_objects/symbol/valueof/index.html | 64 - .../global_objects/syntaxerror/index.html | 115 - .../reference/global_objects/typeerror/index.html | 118 - .../reference/global_objects/undefined/index.html | 140 - .../reference/global_objects/uneval/index.html | 68 - .../reference/global_objects/urierror/index.html | 116 - files/uk/web/javascript/reference/index.html | 50 - .../reference/iteration_protocols/index.html | 353 -- .../reference/lexical_grammar/index.html | 667 --- .../reference/operators/addition/index.html | 81 - .../operators/addition_assignment/index.html | 77 - .../reference/operators/assignment/index.html | 61 - .../reference/operators/async_function/index.html | 115 - .../reference/operators/await/index.html | 126 - .../reference/operators/bitwise_and/index.html | 111 - .../operators/bitwise_and_assignment/index.html | 60 - .../reference/operators/bitwise_not/index.html | 99 - .../reference/operators/bitwise_or/index.html | 113 - .../operators/bitwise_or_assignment/index.html | 61 - .../reference/operators/bitwise_xor/index.html | 113 - .../operators/bitwise_xor_assignment/index.html | 61 - .../reference/operators/class/index.html | 122 - .../reference/operators/comma_operator/index.html | 90 - .../operators/conditional_operator/index.html | 109 - .../reference/operators/decrement/index.html | 82 - .../reference/operators/delete/index.html | 298 - .../operators/destructuring_assignment/index.html | 454 -- .../reference/operators/division/index.html | 75 - .../operators/division_assignment/index.html | 61 - .../reference/operators/equality/index.html | 125 - .../reference/operators/exponentiation/index.html | 102 - .../operators/exponentiation_assignment/index.html | 60 - .../reference/operators/function/index.html | 154 - .../reference/operators/function_star_/index.html | 90 - .../reference/operators/greater_than/index.html | 114 - .../operators/greater_than_or_equal/index.html | 99 - .../reference/operators/grouping/index.html | 90 - .../javascript/reference/operators/in/index.html | 150 - .../reference/operators/increment/index.html | 80 - .../web/javascript/reference/operators/index.html | 273 - .../reference/operators/inequality/index.html | 97 - .../reference/operators/instanceof/index.html | 186 - .../reference/operators/left_shift/index.html | 73 - .../operators/left_shift_assignment/index.html | 60 - .../reference/operators/less_than/index.html | 99 - .../operators/less_than_or_equal/index.html | 101 - .../reference/operators/logical_and/index.html | 142 - .../reference/operators/logical_not/index.html | 105 - .../reference/operators/logical_or/index.html | 151 - .../reference/operators/multiplication/index.html | 73 - .../operators/multiplication_assignment/index.html | 60 - .../reference/operators/new.target/index.html | 97 - .../javascript/reference/operators/new/index.html | 197 - .../nullish_coalescing_operator/index.html | 160 - .../operators/object_initializer/index.html | 297 - .../operators/operator_precedence/index.html | 332 -- .../operators/optional_chaining/index.html | 184 - .../operators/pipeline_operator/index.html | 87 - .../operators/property_accessors/index.html | 157 - .../reference/operators/remainder/index.html | 77 - .../operators/remainder_assignment/index.html | 61 - .../reference/operators/right_shift/index.html | 74 - .../operators/right_shift_assignment/index.html | 60 - .../reference/operators/spread_syntax/index.html | 253 - .../reference/operators/strict_equality/index.html | 105 - .../operators/strict_inequality/index.html | 99 - .../reference/operators/subtraction/index.html | 67 - .../operators/subtraction_assignment/index.html | 60 - .../reference/operators/super/index.html | 184 - .../javascript/reference/operators/this/index.html | 408 -- .../reference/operators/typeof/index.html | 278 - .../reference/operators/unary_negation/index.html | 77 - .../reference/operators/unary_plus/index.html | 78 - .../operators/unsigned_right_shift/index.html | 74 - .../unsigned_right_shift_assignment/index.html | 60 - .../javascript/reference/operators/void/index.html | 123 - .../reference/operators/yield/index.html | 121 - .../reference/operators/yield_star_/index.html | 162 - .../reference/statements/async_function/index.html | 272 - .../reference/statements/block/index.html | 132 - .../reference/statements/break/index.html | 151 - .../reference/statements/class/index.html | 119 - .../reference/statements/const/index.html | 232 - .../reference/statements/continue/index.html | 164 - .../reference/statements/debugger/index.html | 78 - .../reference/statements/do...while/index.html | 101 - .../reference/statements/empty/index.html | 105 - .../reference/statements/export/index.html | 205 - .../reference/statements/for-await...of/index.html | 253 - .../reference/statements/for...in/index.html | 149 - .../reference/statements/for...of/index.html | 319 - .../javascript/reference/statements/for/index.html | 165 - .../reference/statements/function/index.html | 179 - .../reference/statements/function_star_/index.html | 268 - .../reference/statements/if...else/index.html | 173 - .../web/javascript/reference/statements/index.html | 130 - .../reference/statements/label/index.html | 182 - .../javascript/reference/statements/let/index.html | 272 - .../reference/statements/return/index.html | 159 - .../reference/statements/switch/index.html | 295 - .../reference/statements/throw/index.html | 198 - .../reference/statements/try...catch/index.html | 319 - .../javascript/reference/statements/var/index.html | 226 - .../reference/statements/while/index.html | 104 - .../reference/statements/with/index.html | 107 - .../javascript/reference/strict_mode/index.html | 364 -- .../reference/template_literals/index.html | 259 - .../reference/trailing_commas/index.html | 171 - files/uk/web/progressive_web_apps/index.html | 95 - files/uk/web/reference/index.html | 29 - files/uk/web/tutorials/index.html | 185 - files/uk/web/xml/index.html | 17 - files/uk/web/xml/xml_introduction/index.html | 136 - files/uk/web/xslt/index.html | 54 - 940 files changed, 139583 deletions(-) delete mode 100644 files/uk/_redirects.txt delete mode 100644 files/uk/_wikihistory.json delete mode 100644 files/uk/conflicting/glossary/doctype/index.html delete mode 100644 files/uk/conflicting/learn/css/first_steps/index.html delete mode 100644 files/uk/conflicting/web/api/windoworworkerglobalscope/index.html delete mode 100644 files/uk/conflicting/web/javascript/reference/global_objects/boolean/index.html delete mode 100644 files/uk/conflicting/web/javascript/reference/global_objects/error/index.html delete mode 100644 files/uk/conflicting/web/javascript/reference/global_objects/evalerror/index.html delete mode 100644 files/uk/conflicting/web/javascript/reference/global_objects/function/index.html delete mode 100644 files/uk/conflicting/web/javascript/reference/global_objects/generatorfunction/index.html delete mode 100644 files/uk/conflicting/web/javascript/reference/global_objects/internalerror/index.html delete mode 100644 files/uk/conflicting/web/javascript/reference/global_objects/number/index.html delete mode 100644 files/uk/conflicting/web/javascript/reference/global_objects/promise/index.html delete mode 100644 files/uk/conflicting/web/javascript/reference/global_objects/rangeerror/index.html delete mode 100644 files/uk/conflicting/web/javascript/reference/global_objects/referenceerror/index.html delete mode 100644 files/uk/conflicting/web/javascript/reference/global_objects/syntaxerror/index.html delete mode 100644 files/uk/conflicting/web/javascript/reference/global_objects/typeerror/index.html delete mode 100644 files/uk/conflicting/web/javascript/reference/global_objects/urierror/index.html delete mode 100644 files/uk/conflicting/web/javascript/reference/operators/index.html delete mode 100644 files/uk/conflicting/web/javascript/reference/operators/spread_syntax/index.html delete mode 100644 files/uk/conflicting/web/javascript/reference/operators_1cd48548c16282df3883f99267726c3e/index.html delete mode 100644 files/uk/conflicting/web/javascript/reference/operators_7c8eb9475d97a4a734c5991857698560/index.html delete mode 100644 files/uk/conflicting/web/javascript/reference/operators_a8aa9ce42ce1749862961c61113d120b/index.html delete mode 100644 files/uk/conflicting/web/javascript/reference/operators_f71733c8e7001a29c3ec40d8522a4aca/index.html delete mode 100644 files/uk/conflicting/web/javascript/reference/statements/switch/index.html delete mode 100644 files/uk/glossary/404/index.html delete mode 100644 files/uk/glossary/abstraction/index.html delete mode 100644 files/uk/glossary/accessibility/index.html delete mode 100644 files/uk/glossary/adobe_flash/index.html delete mode 100644 files/uk/glossary/ajax/index.html delete mode 100644 files/uk/glossary/algorithm/index.html delete mode 100644 files/uk/glossary/alignment_container/index.html delete mode 100644 files/uk/glossary/alignment_subject/index.html delete mode 100644 files/uk/glossary/api/index.html delete mode 100644 files/uk/glossary/apple_safari/index.html delete mode 100644 files/uk/glossary/argument/index.html delete mode 100644 files/uk/glossary/array/index.html delete mode 100644 files/uk/glossary/ascii/index.html delete mode 100644 files/uk/glossary/asynchronous/index.html delete mode 100644 files/uk/glossary/block/css/index.html delete mode 100644 files/uk/glossary/block/index.html delete mode 100644 files/uk/glossary/block/scripting/index.html delete mode 100644 files/uk/glossary/boolean/index.html delete mode 100644 files/uk/glossary/browser/index.html delete mode 100644 files/uk/glossary/buffer/index.html delete mode 100644 files/uk/glossary/cache/index.html delete mode 100644 files/uk/glossary/callback_function/index.html delete mode 100644 files/uk/glossary/canvas/index.html delete mode 100644 files/uk/glossary/character/index.html delete mode 100644 files/uk/glossary/character_encoding/index.html delete mode 100644 files/uk/glossary/cipher/index.html delete mode 100644 files/uk/glossary/ciphertext/index.html delete mode 100644 files/uk/glossary/closure/index.html delete mode 100644 files/uk/glossary/compile/index.html delete mode 100644 files/uk/glossary/computer_programming/index.html delete mode 100644 files/uk/glossary/conditional/index.html delete mode 100644 files/uk/glossary/constant/index.html delete mode 100644 files/uk/glossary/control_flow/index.html delete mode 100644 files/uk/glossary/cryptanalysis/index.html delete mode 100644 files/uk/glossary/cryptographic_hash_function/index.html delete mode 100644 files/uk/glossary/cryptography/index.html delete mode 100644 files/uk/glossary/css/index.html delete mode 100644 files/uk/glossary/data_structure/index.html delete mode 100644 files/uk/glossary/decryption/index.html delete mode 100644 files/uk/glossary/doctype/index.html delete mode 100644 files/uk/glossary/dom/index.html delete mode 100644 files/uk/glossary/dynamic_programming_language/index.html delete mode 100644 files/uk/glossary/ecmascript/index.html delete mode 100644 files/uk/glossary/element/index.html delete mode 100644 files/uk/glossary/encryption/index.html delete mode 100644 files/uk/glossary/engine/index.html delete mode 100644 files/uk/glossary/falsy/index.html delete mode 100644 files/uk/glossary/function/index.html delete mode 100644 files/uk/glossary/general_header/index.html delete mode 100644 files/uk/glossary/global_object/index.html delete mode 100644 files/uk/glossary/gpu/index.html delete mode 100644 files/uk/glossary/hash/index.html delete mode 100644 files/uk/glossary/hoisting/index.html delete mode 100644 files/uk/glossary/html/index.html delete mode 100644 files/uk/glossary/html5/index.html delete mode 100644 files/uk/glossary/http/index.html delete mode 100644 files/uk/glossary/http_2/index.html delete mode 100644 files/uk/glossary/http_header/index.html delete mode 100644 files/uk/glossary/hyperlink/index.html delete mode 100644 files/uk/glossary/hypertext/index.html delete mode 100644 files/uk/glossary/ide/index.html delete mode 100644 files/uk/glossary/identifier/index.html delete mode 100644 files/uk/glossary/iife/index.html delete mode 100644 files/uk/glossary/index.html delete mode 100644 files/uk/glossary/internet/index.html delete mode 100644 files/uk/glossary/java/index.html delete mode 100644 files/uk/glossary/javascript/index.html delete mode 100644 files/uk/glossary/json/index.html delete mode 100644 files/uk/glossary/ligature/index.html delete mode 100644 files/uk/glossary/loop/index.html delete mode 100644 files/uk/glossary/method/index.html delete mode 100644 files/uk/glossary/mozilla_firefox/index.html delete mode 100644 files/uk/glossary/nan/index.html delete mode 100644 files/uk/glossary/node.js/index.html delete mode 100644 files/uk/glossary/null/index.html delete mode 100644 files/uk/glossary/number/index.html delete mode 100644 files/uk/glossary/object/index.html delete mode 100644 files/uk/glossary/object_reference/index.html delete mode 100644 files/uk/glossary/oop/index.html delete mode 100644 files/uk/glossary/operator/index.html delete mode 100644 files/uk/glossary/polyfill/index.html delete mode 100644 files/uk/glossary/primitive/index.html delete mode 100644 files/uk/glossary/property/css/index.html delete mode 100644 files/uk/glossary/property/index.html delete mode 100644 files/uk/glossary/property/javascript/index.html delete mode 100644 files/uk/glossary/protocol/index.html delete mode 100644 files/uk/glossary/prototype-based_programming/index.html delete mode 100644 files/uk/glossary/proxy_server/index.html delete mode 100644 files/uk/glossary/recursion/index.html delete mode 100644 files/uk/glossary/regular_expression/index.html delete mode 100644 files/uk/glossary/rest/index.html delete mode 100644 files/uk/glossary/rss/index.html delete mode 100644 files/uk/glossary/scope/index.html delete mode 100644 files/uk/glossary/self-executing_anonymous_function/index.html delete mode 100644 files/uk/glossary/server/index.html delete mode 100644 files/uk/glossary/shim/index.html delete mode 100644 files/uk/glossary/statement/index.html delete mode 100644 files/uk/glossary/static_method/index.html delete mode 100644 files/uk/glossary/string/index.html delete mode 100644 files/uk/glossary/svg/index.html delete mode 100644 files/uk/glossary/symbol/index.html delete mode 100644 files/uk/glossary/synchronous/index.html delete mode 100644 files/uk/glossary/truthy/index.html delete mode 100644 files/uk/glossary/type/index.html delete mode 100644 files/uk/glossary/type_coercion/index.html delete mode 100644 files/uk/glossary/type_conversion/index.html delete mode 100644 files/uk/glossary/undefined/index.html delete mode 100644 files/uk/glossary/uri/index.html delete mode 100644 files/uk/glossary/url/index.html delete mode 100644 files/uk/glossary/urn/index.html delete mode 100644 files/uk/glossary/utf-8/index.html delete mode 100644 files/uk/glossary/ux/index.html delete mode 100644 files/uk/glossary/value/index.html delete mode 100644 files/uk/glossary/variable/index.html delete mode 100644 files/uk/glossary/viewport/index.html delete mode 100644 files/uk/glossary/w3c/index.html delete mode 100644 files/uk/glossary/webgl/index.html delete mode 100644 files/uk/glossary/websockets/index.html delete mode 100644 files/uk/glossary/whitespace/index.html delete mode 100644 files/uk/glossary/world_wide_web/index.html delete mode 100644 files/uk/glossary/wrapper/index.html delete mode 100644 files/uk/glossary/xml/index.html delete mode 100644 files/uk/learn/accessibility/index.html delete mode 100644 files/uk/learn/common_questions/index.html delete mode 100644 files/uk/learn/common_questions/set_up_a_local_testing_server/index.html delete mode 100644 files/uk/learn/css/building_blocks/cascade_and_inheritance/index.html delete mode 100644 files/uk/learn/css/building_blocks/index.html delete mode 100644 files/uk/learn/css/css_layout/index.html delete mode 100644 files/uk/learn/css/first_steps/how_css_works/index.html delete mode 100644 files/uk/learn/css/first_steps/index.html delete mode 100644 files/uk/learn/css/first_steps/what_is_css/index.html delete mode 100644 files/uk/learn/css/index.html delete mode 100644 files/uk/learn/css/styling_text/index.html delete mode 100644 files/uk/learn/css/styling_text/styling_lists/index.html delete mode 100644 files/uk/learn/forms/index.html delete mode 100644 files/uk/learn/forms/your_first_form/index.html delete mode 100644 files/uk/learn/front-end_web_developer/index.html delete mode 100644 files/uk/learn/getting_started_with_the_web/css_basics/index.html delete mode 100644 files/uk/learn/getting_started_with_the_web/dealing_with_files/index.html delete mode 100644 files/uk/learn/getting_started_with_the_web/how_the_web_works/index.html delete mode 100644 files/uk/learn/getting_started_with_the_web/html_basics/index.html delete mode 100644 files/uk/learn/getting_started_with_the_web/index.html delete mode 100644 files/uk/learn/getting_started_with_the_web/installing_basic_software/index.html delete mode 100644 files/uk/learn/getting_started_with_the_web/javascript_basics/index.html delete mode 100644 files/uk/learn/getting_started_with_the_web/publishing_your_website/index.html delete mode 100644 files/uk/learn/getting_started_with_the_web/the_web_and_web_standards/index.html delete mode 100644 files/uk/learn/getting_started_with_the_web/what_will_your_website_look_like/index.html delete mode 100644 files/uk/learn/html/index.html delete mode 100644 files/uk/learn/html/introduction_to_html/creating_hyperlinks/index.html delete mode 100644 files/uk/learn/html/introduction_to_html/debugging_html/index.html delete mode 100644 files/uk/learn/html/introduction_to_html/getting_started/index.html delete mode 100644 files/uk/learn/html/introduction_to_html/html_text_fundamentals/index.html delete mode 100644 files/uk/learn/html/introduction_to_html/index.html delete mode 100644 files/uk/learn/html/introduction_to_html/the_head_metadata_in_html/index.html delete mode 100644 files/uk/learn/html/multimedia_and_embedding/index.html delete mode 100644 files/uk/learn/html/tables/index.html delete mode 100644 files/uk/learn/index.html delete mode 100644 files/uk/learn/javascript/asynchronous/index.html delete mode 100644 files/uk/learn/javascript/building_blocks/index.html delete mode 100644 files/uk/learn/javascript/client-side_web_apis/index.html delete mode 100644 files/uk/learn/javascript/first_steps/index.html delete mode 100644 files/uk/learn/javascript/first_steps/what_is_javascript/index.html delete mode 100644 files/uk/learn/javascript/index.html delete mode 100644 files/uk/learn/javascript/objects/basics/index.html delete mode 100644 files/uk/learn/javascript/objects/index.html delete mode 100644 files/uk/learn/javascript/objects/object-oriented_js/index.html delete mode 100644 files/uk/learn/learning_and_getting_help/index.html delete mode 100644 files/uk/learn/server-side/django/index.html delete mode 100644 files/uk/learn/server-side/django/introduction/index.html delete mode 100644 files/uk/learn/server-side/express_nodejs/index.html delete mode 100644 files/uk/learn/server-side/express_nodejs/routes/index.html delete mode 100644 files/uk/learn/server-side/index.html delete mode 100644 files/uk/learn/tools_and_testing/client-side_javascript_frameworks/index.html delete mode 100644 files/uk/learn/tools_and_testing/client-side_javascript_frameworks/svelte_getting_started/index.html delete mode 100644 files/uk/learn/tools_and_testing/cross_browser_testing/index.html delete mode 100644 files/uk/learn/tools_and_testing/github/index.html delete mode 100644 files/uk/learn/tools_and_testing/index.html delete mode 100644 files/uk/learn/tools_and_testing/understanding_client-side_tools/index.html delete mode 100644 files/uk/mdn/about/index.html delete mode 100644 files/uk/mdn/contribute/getting_started/index.html delete mode 100644 files/uk/mdn/contribute/howto/create_and_edit_pages/index.html delete mode 100644 files/uk/mdn/contribute/howto/index.html delete mode 100644 files/uk/mdn/contribute/index.html delete mode 100644 files/uk/mdn/guidelines/index.html delete mode 100644 files/uk/mdn/guidelines/writing_style_guide/index.html delete mode 100644 files/uk/mdn/index.html delete mode 100644 files/uk/mdn/structures/index.html delete mode 100644 files/uk/mdn/structures/macros/commonly-used_macros/index.html delete mode 100644 files/uk/mdn/structures/macros/index.html delete mode 100644 files/uk/mdn/tools/index.html delete mode 100644 files/uk/mdn/tools/kumascript/index.html delete mode 100644 files/uk/mdn/tools/kumascript/troubleshooting/index.html delete mode 100644 files/uk/mdn/yari/index.html delete mode 100644 files/uk/mozilla/add-ons/index.html delete mode 100644 files/uk/mozilla/add-ons/webextensions/api/index.html delete mode 100644 files/uk/mozilla/add-ons/webextensions/api/sessions/index.html delete mode 100644 files/uk/mozilla/add-ons/webextensions/api/sessions/restore/index.html delete mode 100644 files/uk/mozilla/add-ons/webextensions/index.html delete mode 100644 files/uk/mozilla/add-ons/webextensions/interact_with_the_clipboard/index.html delete mode 100644 files/uk/mozilla/add-ons/webextensions/what_are_webextensions/index.html delete mode 100644 files/uk/mozilla/firefox/experimental_features/index.html delete mode 100644 files/uk/mozilla/firefox/index.html delete mode 100644 files/uk/mozilla/firefox/releases/53/index.html delete mode 100644 files/uk/mozilla/firefox/releases/54/index.html delete mode 100644 files/uk/mozilla/firefox/releases/56/index.html delete mode 100644 files/uk/mozilla/firefox/releases/index.html delete mode 100644 files/uk/mozilla/index.html delete mode 100644 files/uk/orphaned/learn/how_to_contribute/index.html delete mode 100644 files/uk/orphaned/mdn/community/index.html delete mode 100644 files/uk/orphaned/mdn/contribute/howto/be_a_beta_tester/index.html delete mode 100644 files/uk/orphaned/mdn/contribute/howto/create_an_mdn_account/index.html delete mode 100644 files/uk/orphaned/mdn/contribute/howto/do_an_editorial_review/index.html delete mode 100644 files/uk/orphaned/mdn/contribute/howto/set_the_summary_for_a_page/index.html delete mode 100644 files/uk/orphaned/web/javascript/reference/global_objects/array/prototype/index.html delete mode 100644 files/uk/orphaned/web/javascript/reference/global_objects/asyncfunction/prototype/index.html delete mode 100644 files/uk/tools/index.html delete mode 100644 files/uk/tools/network_monitor/index.html delete mode 100644 files/uk/tools/network_monitor/performance_analysis/index.html delete mode 100644 files/uk/tools/network_monitor/recording/index.html delete mode 100644 files/uk/tools/network_monitor/request_details/index.html delete mode 100644 files/uk/tools/network_monitor/request_list/index.html delete mode 100644 files/uk/tools/network_monitor/throttling/index.html delete mode 100644 files/uk/tools/network_monitor/toolbar/index.html delete mode 100644 files/uk/tools/page_inspector/how_to/index.html delete mode 100644 files/uk/tools/page_inspector/index.html delete mode 100644 files/uk/tools/web_console/console_messages/index.html delete mode 100644 files/uk/tools/web_console/index.html delete mode 100644 files/uk/tools/web_console/split_console/index.html delete mode 100644 files/uk/tools/web_console/ui_tour/index.html delete mode 100644 files/uk/web/accessibility/index.html delete mode 100644 files/uk/web/accessibility/understanding_wcag/index.html delete mode 100644 files/uk/web/accessibility/understanding_wcag/keyboard/index.html delete mode 100644 files/uk/web/api/ambient_light_events/index.html delete mode 100644 files/uk/web/api/angle_instanced_arrays/index.html delete mode 100644 files/uk/web/api/blob/index.html delete mode 100644 files/uk/web/api/canvas_api/index.html delete mode 100644 files/uk/web/api/canvas_api/tutorial/basic_usage/index.html delete mode 100644 files/uk/web/api/canvas_api/tutorial/hit_regions_and_accessibility/index.html delete mode 100644 files/uk/web/api/canvas_api/tutorial/index.html delete mode 100644 files/uk/web/api/console/dir/index.html delete mode 100644 files/uk/web/api/console/index.html delete mode 100644 files/uk/web/api/console/log/index.html delete mode 100644 files/uk/web/api/customevent/index.html delete mode 100644 files/uk/web/api/customevent/initcustomevent/index.html delete mode 100644 files/uk/web/api/document/index.html delete mode 100644 files/uk/web/api/document/visibilitychange_event/index.html delete mode 100644 files/uk/web/api/domstring/index.html delete mode 100644 files/uk/web/api/element/getclientrects/index.html delete mode 100644 files/uk/web/api/element/index.html delete mode 100644 files/uk/web/api/event/index.html delete mode 100644 files/uk/web/api/event/target/index.html delete mode 100644 files/uk/web/api/globaleventhandlers/index.html delete mode 100644 files/uk/web/api/globaleventhandlers/onkeydown/index.html delete mode 100644 files/uk/web/api/globaleventhandlers/onkeyup/index.html delete mode 100644 files/uk/web/api/globaleventhandlers/onmouseover/index.html delete mode 100644 files/uk/web/api/headers/index.html delete mode 100644 files/uk/web/api/history_api/index.html delete mode 100644 files/uk/web/api/html_dom_api/index.html delete mode 100644 files/uk/web/api/html_dom_api/microtask_guide/index.html delete mode 100644 files/uk/web/api/htmlcanvaselement/index.html delete mode 100644 files/uk/web/api/htmlelement/index.html delete mode 100644 files/uk/web/api/htmlelement/offsettop/index.html delete mode 100644 files/uk/web/api/htmlformelement/index.html delete mode 100644 files/uk/web/api/htmlformelement/reset/index.html delete mode 100644 files/uk/web/api/htmlimageelement/image/index.html delete mode 100644 files/uk/web/api/htmlimageelement/index.html delete mode 100644 files/uk/web/api/htmlmediaelement/abort_event/index.html delete mode 100644 files/uk/web/api/index.html delete mode 100644 files/uk/web/api/intersection_observer_api/index.html delete mode 100644 files/uk/web/api/mediaquerylist/addlistener/index.html delete mode 100644 files/uk/web/api/mediaquerylist/index.html delete mode 100644 files/uk/web/api/network_information_api/index.html delete mode 100644 files/uk/web/api/networkinformation/index.html delete mode 100644 files/uk/web/api/node/contains/index.html delete mode 100644 files/uk/web/api/node/index.html delete mode 100644 files/uk/web/api/page_visibility_api/index.html delete mode 100644 files/uk/web/api/promiserejectionevent/index.html delete mode 100644 files/uk/web/api/promiserejectionevent/promise/index.html delete mode 100644 files/uk/web/api/promiserejectionevent/promiserejectionevent/index.html delete mode 100644 files/uk/web/api/promiserejectionevent/reason/index.html delete mode 100644 files/uk/web/api/svganimatedstring/animval/index.html delete mode 100644 files/uk/web/api/svganimatedstring/index.html delete mode 100644 files/uk/web/api/urlsearchparams/index.html delete mode 100644 files/uk/web/api/web_workers_api/index.html delete mode 100644 files/uk/web/api/webgl_api/index.html delete mode 100644 files/uk/web/api/websocket/index.html delete mode 100644 files/uk/web/api/window/confirm/index.html delete mode 100644 files/uk/web/api/window/console/index.html delete mode 100644 files/uk/web/api/window/domcontentloaded_event/index.html delete mode 100644 files/uk/web/api/window/history/index.html delete mode 100644 files/uk/web/api/window/index.html delete mode 100644 files/uk/web/api/window/localstorage/index.html delete mode 100644 files/uk/web/api/window/rejectionhandled_event/index.html delete mode 100644 files/uk/web/api/window/self/index.html delete mode 100644 files/uk/web/api/window/unhandledrejection_event/index.html delete mode 100644 files/uk/web/api/windoweventhandlers/index.html delete mode 100644 files/uk/web/api/windoweventhandlers/onrejectionhandled/index.html delete mode 100644 files/uk/web/api/windoweventhandlers/onunhandledrejection/index.html delete mode 100644 files/uk/web/api/windoworworkerglobalscope/index.html delete mode 100644 files/uk/web/api/windoworworkerglobalscope/settimeout/index.html delete mode 100644 files/uk/web/api/xmlhttprequest/index.html delete mode 100644 files/uk/web/css/-moz-orient/index.html delete mode 100644 files/uk/web/css/@font-face/font-display/index.html delete mode 100644 files/uk/web/css/@font-face/index.html delete mode 100644 files/uk/web/css/@page/bleed/index.html delete mode 100644 files/uk/web/css/@page/index.html delete mode 100644 files/uk/web/css/_colon_active/index.html delete mode 100644 files/uk/web/css/_colon_root/index.html delete mode 100644 files/uk/web/css/_doublecolon_before/index.html delete mode 100644 files/uk/web/css/_doublecolon_slotted/index.html delete mode 100644 files/uk/web/css/alternative_style_sheets/index.html delete mode 100644 files/uk/web/css/animation-name/index.html delete mode 100644 files/uk/web/css/attr()/index.html delete mode 100644 files/uk/web/css/backdrop-filter/index.html delete mode 100644 files/uk/web/css/css_animations/index.html delete mode 100644 files/uk/web/css/css_animations/using_css_animations/index.html delete mode 100644 files/uk/web/css/css_box_model/index.html delete mode 100644 files/uk/web/css/css_box_model/mastering_margin_collapsing/index.html delete mode 100644 files/uk/web/css/css_flexible_box_layout/basic_concepts_of_flexbox/index.html delete mode 100644 files/uk/web/css/css_flexible_box_layout/index.html delete mode 100644 files/uk/web/css/css_grid_layout/basic_concepts_of_grid_layout/index.html delete mode 100644 files/uk/web/css/css_grid_layout/index.html delete mode 100644 files/uk/web/css/css_grid_layout/relationship_of_grid_layout/index.html delete mode 100644 files/uk/web/css/css_selectors/index.html delete mode 100644 files/uk/web/css/filter/index.html delete mode 100644 files/uk/web/css/flex-grow/index.html delete mode 100644 files/uk/web/css/flex/index.html delete mode 100644 files/uk/web/css/font-smooth/index.html delete mode 100644 files/uk/web/css/font-weight/index.html delete mode 100644 files/uk/web/css/grid-template-areas/index.html delete mode 100644 files/uk/web/css/index.html delete mode 100644 files/uk/web/css/layout_cookbook/index.html delete mode 100644 files/uk/web/css/layout_mode/index.html delete mode 100644 files/uk/web/css/linear-gradient()/index.html delete mode 100644 files/uk/web/css/mozilla_extensions/index.html delete mode 100644 files/uk/web/css/order/index.html delete mode 100644 files/uk/web/css/position/index.html delete mode 100644 files/uk/web/css/reference/index.html delete mode 100644 files/uk/web/css/resize/index.html delete mode 100644 files/uk/web/css/visual_formatting_model/index.html delete mode 100644 files/uk/web/css/z-index/index.html delete mode 100644 files/uk/web/events/index.html delete mode 100644 files/uk/web/guide/graphics/index.html delete mode 100644 files/uk/web/guide/html/content_categories/index.html delete mode 100644 files/uk/web/guide/html/html5/index.html delete mode 100644 files/uk/web/guide/html/using_html_sections_and_outlines/index.html delete mode 100644 files/uk/web/guide/index.html delete mode 100644 files/uk/web/houdini/index.html delete mode 100644 files/uk/web/html/attributes/index.html delete mode 100644 files/uk/web/html/block-level_elements/index.html delete mode 100644 files/uk/web/html/element/header/index.html delete mode 100644 files/uk/web/html/element/html/index.html delete mode 100644 files/uk/web/html/element/iframe/index.html delete mode 100644 files/uk/web/html/element/index.html delete mode 100644 files/uk/web/html/element/input/date/index.html delete mode 100644 files/uk/web/html/element/input/datetime-local/index.html delete mode 100644 files/uk/web/html/element/input/index.html delete mode 100644 files/uk/web/html/element/link/index.html delete mode 100644 files/uk/web/html/element/nav/index.html delete mode 100644 files/uk/web/html/element/script/index.html delete mode 100644 files/uk/web/html/element/section/index.html delete mode 100644 files/uk/web/html/element/style/index.html delete mode 100644 files/uk/web/html/element/table/index.html delete mode 100644 files/uk/web/html/element/video/index.html delete mode 100644 files/uk/web/html/global_attributes/hidden/index.html delete mode 100644 files/uk/web/html/global_attributes/index.html delete mode 100644 files/uk/web/html/global_attributes/itemscope/index.html delete mode 100644 files/uk/web/html/global_attributes/lang/index.html delete mode 100644 files/uk/web/html/global_attributes/tabindex/index.html delete mode 100644 files/uk/web/html/index.html delete mode 100644 files/uk/web/html/inline_elements/index.html delete mode 100644 files/uk/web/html/quirks_mode_and_standards_mode/index.html delete mode 100644 files/uk/web/html/reference/index.html delete mode 100644 files/uk/web/http/basics_of_http/index.html delete mode 100644 files/uk/web/http/basics_of_http/mime_types/index.html delete mode 100644 files/uk/web/http/cors/index.html delete mode 100644 files/uk/web/http/headers/accept-encoding/index.html delete mode 100644 files/uk/web/http/headers/accept-language/index.html delete mode 100644 files/uk/web/http/headers/connection/index.html delete mode 100644 files/uk/web/http/headers/content-length/index.html delete mode 100644 files/uk/web/http/headers/content-type/index.html delete mode 100644 files/uk/web/http/headers/etag/index.html delete mode 100644 files/uk/web/http/headers/if-match/index.html delete mode 100644 files/uk/web/http/headers/index.html delete mode 100644 files/uk/web/http/headers/location/index.html delete mode 100644 files/uk/web/http/headers/referer/index.html delete mode 100644 files/uk/web/http/headers/user-agent/index.html delete mode 100644 files/uk/web/http/headers/x-forwarded-proto/index.html delete mode 100644 files/uk/web/http/index.html delete mode 100644 files/uk/web/http/methods/get/index.html delete mode 100644 files/uk/web/http/methods/index.html delete mode 100644 files/uk/web/http/methods/post/index.html delete mode 100644 files/uk/web/http/methods/put/index.html delete mode 100644 files/uk/web/http/session/index.html delete mode 100644 files/uk/web/http/status/100/index.html delete mode 100644 files/uk/web/http/status/101/index.html delete mode 100644 files/uk/web/http/status/200/index.html delete mode 100644 files/uk/web/http/status/201/index.html delete mode 100644 files/uk/web/http/status/203/index.html delete mode 100644 files/uk/web/http/status/204/index.html delete mode 100644 files/uk/web/http/status/206/index.html delete mode 100644 files/uk/web/http/status/418/index.html delete mode 100644 files/uk/web/http/status/422/index.html delete mode 100644 files/uk/web/http/status/index.html delete mode 100644 files/uk/web/index.html delete mode 100644 files/uk/web/javascript/a_re-introduction_to_javascript/index.html delete mode 100644 files/uk/web/javascript/about_javascript/index.html delete mode 100644 files/uk/web/javascript/closures/index.html delete mode 100644 files/uk/web/javascript/data_structures/index.html delete mode 100644 files/uk/web/javascript/enumerability_and_ownership_of_properties/index.html delete mode 100644 files/uk/web/javascript/equality_comparisons_and_sameness/index.html delete mode 100644 files/uk/web/javascript/eventloop/index.html delete mode 100644 files/uk/web/javascript/guide/control_flow_and_error_handling/index.html delete mode 100644 files/uk/web/javascript/guide/details_of_the_object_model/index.html delete mode 100644 files/uk/web/javascript/guide/expressions_and_operators/index.html delete mode 100644 files/uk/web/javascript/guide/functions/index.html delete mode 100644 files/uk/web/javascript/guide/grammar_and_types/index.html delete mode 100644 files/uk/web/javascript/guide/index.html delete mode 100644 files/uk/web/javascript/guide/indexed_collections/index.html delete mode 100644 files/uk/web/javascript/guide/introduction/index.html delete mode 100644 files/uk/web/javascript/guide/iterators_and_generators/index.html delete mode 100644 files/uk/web/javascript/guide/loops_and_iteration/index.html delete mode 100644 files/uk/web/javascript/guide/numbers_and_dates/index.html delete mode 100644 files/uk/web/javascript/guide/regular_expressions/index.html delete mode 100644 files/uk/web/javascript/guide/using_promises/index.html delete mode 100644 files/uk/web/javascript/guide/working_with_objects/index.html delete mode 100644 files/uk/web/javascript/index.html delete mode 100644 files/uk/web/javascript/inheritance_and_the_prototype_chain/index.html delete mode 100644 files/uk/web/javascript/javascript_technologies_overview/index.html delete mode 100644 files/uk/web/javascript/memory_management/index.html delete mode 100644 files/uk/web/javascript/reference/classes/constructor/index.html delete mode 100644 files/uk/web/javascript/reference/classes/extends/index.html delete mode 100644 files/uk/web/javascript/reference/classes/index.html delete mode 100644 files/uk/web/javascript/reference/classes/static/index.html delete mode 100644 files/uk/web/javascript/reference/deprecated_and_obsolete_features/index.html delete mode 100644 files/uk/web/javascript/reference/deprecated_and_obsolete_features/the_legacy_iterator_protocol/index.html delete mode 100644 files/uk/web/javascript/reference/errors/cant_delete/index.html delete mode 100644 files/uk/web/javascript/reference/errors/deprecated_tolocaleformat/index.html delete mode 100644 files/uk/web/javascript/reference/errors/index.html delete mode 100644 files/uk/web/javascript/reference/errors/invalid_for-in_initializer/index.html delete mode 100644 files/uk/web/javascript/reference/errors/json_bad_parse/index.html delete mode 100644 files/uk/web/javascript/reference/errors/more_arguments_needed/index.html delete mode 100644 files/uk/web/javascript/reference/errors/negative_repetition_count/index.html delete mode 100644 files/uk/web/javascript/reference/errors/not_a_constructor/index.html delete mode 100644 files/uk/web/javascript/reference/errors/not_a_function/index.html delete mode 100644 files/uk/web/javascript/reference/errors/resulting_string_too_large/index.html delete mode 100644 files/uk/web/javascript/reference/functions/arguments/@@iterator/index.html delete mode 100644 files/uk/web/javascript/reference/functions/arguments/index.html delete mode 100644 files/uk/web/javascript/reference/functions/arguments/length/index.html delete mode 100644 files/uk/web/javascript/reference/functions/arrow_functions/index.html delete mode 100644 files/uk/web/javascript/reference/functions/get/index.html delete mode 100644 files/uk/web/javascript/reference/functions/index.html delete mode 100644 files/uk/web/javascript/reference/functions/method_definitions/index.html delete mode 100644 files/uk/web/javascript/reference/functions/rest_parameters/index.html delete mode 100644 files/uk/web/javascript/reference/functions/set/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/array/@@iterator/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/array/@@species/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/array/@@unscopables/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/array/array/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/array/concat/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/array/copywithin/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/array/entries/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/array/every/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/array/fill/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/array/filter/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/array/find/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/array/findindex/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/array/flat/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/array/flatmap/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/array/foreach/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/array/from/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/array/includes/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/array/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/array/indexof/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/array/isarray/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/array/join/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/array/keys/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/array/lastindexof/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/array/length/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/array/map/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/array/of/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/array/pop/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/array/push/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/array/reduce/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/array/reduceright/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/array/reverse/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/array/shift/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/array/slice/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/array/some/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/array/sort/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/array/splice/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/array/tolocalestring/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/array/tosource/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/array/tostring/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/array/unshift/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/array/values/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/asyncfunction/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/bigint/asintn/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/bigint/asuintn/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/bigint/bigint/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/bigint/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/bigint/tolocalestring/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/bigint/tostring/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/bigint/valueof/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/boolean/boolean/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/boolean/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/boolean/tosource/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/boolean/tostring/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/boolean/valueof/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/date/@@toprimitive/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/date/date/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/date/getdate/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/date/getday/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/date/getfullyear/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/date/gethours/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/date/getmilliseconds/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/date/getminutes/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/date/getmonth/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/date/getseconds/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/date/gettime/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/date/gettimezoneoffset/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/date/getutcdate/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/date/getutcday/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/date/getutcfullyear/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/date/getutchours/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/date/getutcmilliseconds/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/date/getutcminutes/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/date/getutcmonth/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/date/getutcseconds/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/date/getyear/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/date/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/date/now/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/date/parse/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/date/setdate/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/date/setfullyear/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/date/sethours/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/date/setmilliseconds/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/date/setminutes/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/date/setmonth/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/date/setseconds/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/date/settime/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/date/setutcdate/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/date/setutcfullyear/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/date/setutchours/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/date/setutcmilliseconds/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/date/setutcminutes/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/date/setutcmonth/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/date/setutcseconds/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/date/setyear/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/date/todatestring/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/date/togmtstring/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/date/toisostring/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/date/tojson/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/date/tolocaledatestring/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/date/tolocalestring/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/date/tolocaletimestring/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/date/tosource/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/date/tostring/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/date/totimestring/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/date/toutcstring/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/date/utc/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/date/valueof/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/error/columnnumber/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/error/error/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/error/filename/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/error/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/error/linenumber/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/error/message/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/error/name/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/error/stack/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/error/tosource/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/error/tostring/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/eval/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/evalerror/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/function/apply/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/function/arguments/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/function/bind/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/function/call/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/function/caller/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/function/displayname/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/function/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/function/length/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/function/name/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/function/tosource/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/function/tostring/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/generator/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/generator/next/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/generator/return/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/generator/throw/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/generatorfunction/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/globalthis/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/infinity/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/internalerror/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/isfinite/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/isnan/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/json/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/json/parse/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/json/stringify/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/map/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/math/abs/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/math/acos/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/math/acosh/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/math/asin/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/math/asinh/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/math/atan/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/math/atan2/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/math/atanh/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/math/cbrt/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/math/ceil/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/math/clz32/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/math/cos/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/math/cosh/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/math/e/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/math/exp/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/math/expm1/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/math/floor/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/math/fround/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/math/hypot/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/math/imul/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/math/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/math/ln10/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/math/ln2/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/math/log/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/math/log10/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/math/log10e/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/math/log1p/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/math/log2/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/math/log2e/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/math/max/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/math/min/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/math/pi/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/math/pow/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/math/random/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/math/round/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/math/sign/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/math/sin/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/math/sinh/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/math/sqrt/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/math/sqrt1_2/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/math/sqrt2/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/math/tan/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/math/tanh/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/math/trunc/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/nan/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/null/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/number/epsilon/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/number/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/number/isfinite/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/number/isinteger/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/number/isnan/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/number/issafeinteger/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/number/max_safe_integer/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/number/max_value/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/number/min_safe_integer/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/number/min_value/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/number/nan/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/number/negative_infinity/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/number/number/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/number/parsefloat/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/number/parseint/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/number/positive_infinity/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/number/toexponential/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/number/tofixed/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/number/tolocalestring/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/number/toprecision/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/number/tosource/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/number/tostring/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/number/valueof/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/object/__definegetter__/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/object/__definesetter__/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/object/__lookupgetter__/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/object/__lookupsetter__/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/object/assign/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/object/constructor/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/object/create/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/object/defineproperties/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/object/defineproperty/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/object/entries/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/object/freeze/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/object/fromentries/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/object/getownpropertydescriptor/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/object/getownpropertydescriptors/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/object/getownpropertynames/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/object/getownpropertysymbols/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/object/getprototypeof/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/object/hasownproperty/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/object/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/object/is/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/object/isextensible/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/object/isfrozen/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/object/isprototypeof/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/object/issealed/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/object/keys/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/object/object/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/object/preventextensions/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/object/propertyisenumerable/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/object/proto/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/object/seal/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/object/setprototypeof/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/object/tolocalestring/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/object/tosource/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/object/tostring/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/object/valueof/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/object/values/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/parsefloat/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/parseint/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/promise/all/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/promise/allsettled/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/promise/any/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/promise/catch/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/promise/finally/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/promise/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/promise/promise/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/promise/race/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/promise/reject/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/promise/resolve/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/promise/then/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/proxy/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/rangeerror/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/referenceerror/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/reflect/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/regexp/exec/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/regexp/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/regexp/source/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/regexp/test/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/set/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/string/@@iterator/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/string/anchor/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/string/big/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/string/blink/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/string/bold/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/string/charat/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/string/charcodeat/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/string/codepointat/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/string/concat/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/string/endswith/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/string/fixed/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/string/fontcolor/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/string/fontsize/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/string/fromcharcode/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/string/fromcodepoint/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/string/includes/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/string/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/string/indexof/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/string/italics/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/string/lastindexof/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/string/length/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/string/link/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/string/localecompare/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/string/match/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/string/matchall/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/string/normalize/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/string/padend/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/string/padstart/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/string/raw/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/string/repeat/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/string/replace/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/string/replaceall/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/string/search/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/string/slice/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/string/small/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/string/split/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/string/startswith/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/string/strike/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/string/string/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/string/sub/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/string/substr/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/string/substring/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/string/sup/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/string/tolocalelowercase/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/string/tolocaleuppercase/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/string/tolowercase/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/string/tosource/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/string/tostring/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/string/touppercase/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/string/trim/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/string/trimend/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/string/trimstart/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/string/valueof/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/symbol/@@toprimitive/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/symbol/asynciterator/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/symbol/description/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/symbol/for/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/symbol/hasinstance/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/symbol/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/symbol/isconcatspreadable/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/symbol/iterator/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/symbol/keyfor/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/symbol/match/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/symbol/matchall/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/symbol/replace/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/symbol/search/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/symbol/species/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/symbol/split/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/symbol/symbol/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/symbol/toprimitive/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/symbol/tosource/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/symbol/tostring/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/symbol/tostringtag/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/symbol/unscopables/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/symbol/valueof/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/syntaxerror/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/typeerror/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/undefined/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/uneval/index.html delete mode 100644 files/uk/web/javascript/reference/global_objects/urierror/index.html delete mode 100644 files/uk/web/javascript/reference/index.html delete mode 100644 files/uk/web/javascript/reference/iteration_protocols/index.html delete mode 100644 files/uk/web/javascript/reference/lexical_grammar/index.html delete mode 100644 files/uk/web/javascript/reference/operators/addition/index.html delete mode 100644 files/uk/web/javascript/reference/operators/addition_assignment/index.html delete mode 100644 files/uk/web/javascript/reference/operators/assignment/index.html delete mode 100644 files/uk/web/javascript/reference/operators/async_function/index.html delete mode 100644 files/uk/web/javascript/reference/operators/await/index.html delete mode 100644 files/uk/web/javascript/reference/operators/bitwise_and/index.html delete mode 100644 files/uk/web/javascript/reference/operators/bitwise_and_assignment/index.html delete mode 100644 files/uk/web/javascript/reference/operators/bitwise_not/index.html delete mode 100644 files/uk/web/javascript/reference/operators/bitwise_or/index.html delete mode 100644 files/uk/web/javascript/reference/operators/bitwise_or_assignment/index.html delete mode 100644 files/uk/web/javascript/reference/operators/bitwise_xor/index.html delete mode 100644 files/uk/web/javascript/reference/operators/bitwise_xor_assignment/index.html delete mode 100644 files/uk/web/javascript/reference/operators/class/index.html delete mode 100644 files/uk/web/javascript/reference/operators/comma_operator/index.html delete mode 100644 files/uk/web/javascript/reference/operators/conditional_operator/index.html delete mode 100644 files/uk/web/javascript/reference/operators/decrement/index.html delete mode 100644 files/uk/web/javascript/reference/operators/delete/index.html delete mode 100644 files/uk/web/javascript/reference/operators/destructuring_assignment/index.html delete mode 100644 files/uk/web/javascript/reference/operators/division/index.html delete mode 100644 files/uk/web/javascript/reference/operators/division_assignment/index.html delete mode 100644 files/uk/web/javascript/reference/operators/equality/index.html delete mode 100644 files/uk/web/javascript/reference/operators/exponentiation/index.html delete mode 100644 files/uk/web/javascript/reference/operators/exponentiation_assignment/index.html delete mode 100644 files/uk/web/javascript/reference/operators/function/index.html delete mode 100644 files/uk/web/javascript/reference/operators/function_star_/index.html delete mode 100644 files/uk/web/javascript/reference/operators/greater_than/index.html delete mode 100644 files/uk/web/javascript/reference/operators/greater_than_or_equal/index.html delete mode 100644 files/uk/web/javascript/reference/operators/grouping/index.html delete mode 100644 files/uk/web/javascript/reference/operators/in/index.html delete mode 100644 files/uk/web/javascript/reference/operators/increment/index.html delete mode 100644 files/uk/web/javascript/reference/operators/index.html delete mode 100644 files/uk/web/javascript/reference/operators/inequality/index.html delete mode 100644 files/uk/web/javascript/reference/operators/instanceof/index.html delete mode 100644 files/uk/web/javascript/reference/operators/left_shift/index.html delete mode 100644 files/uk/web/javascript/reference/operators/left_shift_assignment/index.html delete mode 100644 files/uk/web/javascript/reference/operators/less_than/index.html delete mode 100644 files/uk/web/javascript/reference/operators/less_than_or_equal/index.html delete mode 100644 files/uk/web/javascript/reference/operators/logical_and/index.html delete mode 100644 files/uk/web/javascript/reference/operators/logical_not/index.html delete mode 100644 files/uk/web/javascript/reference/operators/logical_or/index.html delete mode 100644 files/uk/web/javascript/reference/operators/multiplication/index.html delete mode 100644 files/uk/web/javascript/reference/operators/multiplication_assignment/index.html delete mode 100644 files/uk/web/javascript/reference/operators/new.target/index.html delete mode 100644 files/uk/web/javascript/reference/operators/new/index.html delete mode 100644 files/uk/web/javascript/reference/operators/nullish_coalescing_operator/index.html delete mode 100644 files/uk/web/javascript/reference/operators/object_initializer/index.html delete mode 100644 files/uk/web/javascript/reference/operators/operator_precedence/index.html delete mode 100644 files/uk/web/javascript/reference/operators/optional_chaining/index.html delete mode 100644 files/uk/web/javascript/reference/operators/pipeline_operator/index.html delete mode 100644 files/uk/web/javascript/reference/operators/property_accessors/index.html delete mode 100644 files/uk/web/javascript/reference/operators/remainder/index.html delete mode 100644 files/uk/web/javascript/reference/operators/remainder_assignment/index.html delete mode 100644 files/uk/web/javascript/reference/operators/right_shift/index.html delete mode 100644 files/uk/web/javascript/reference/operators/right_shift_assignment/index.html delete mode 100644 files/uk/web/javascript/reference/operators/spread_syntax/index.html delete mode 100644 files/uk/web/javascript/reference/operators/strict_equality/index.html delete mode 100644 files/uk/web/javascript/reference/operators/strict_inequality/index.html delete mode 100644 files/uk/web/javascript/reference/operators/subtraction/index.html delete mode 100644 files/uk/web/javascript/reference/operators/subtraction_assignment/index.html delete mode 100644 files/uk/web/javascript/reference/operators/super/index.html delete mode 100644 files/uk/web/javascript/reference/operators/this/index.html delete mode 100644 files/uk/web/javascript/reference/operators/typeof/index.html delete mode 100644 files/uk/web/javascript/reference/operators/unary_negation/index.html delete mode 100644 files/uk/web/javascript/reference/operators/unary_plus/index.html delete mode 100644 files/uk/web/javascript/reference/operators/unsigned_right_shift/index.html delete mode 100644 files/uk/web/javascript/reference/operators/unsigned_right_shift_assignment/index.html delete mode 100644 files/uk/web/javascript/reference/operators/void/index.html delete mode 100644 files/uk/web/javascript/reference/operators/yield/index.html delete mode 100644 files/uk/web/javascript/reference/operators/yield_star_/index.html delete mode 100644 files/uk/web/javascript/reference/statements/async_function/index.html delete mode 100644 files/uk/web/javascript/reference/statements/block/index.html delete mode 100644 files/uk/web/javascript/reference/statements/break/index.html delete mode 100644 files/uk/web/javascript/reference/statements/class/index.html delete mode 100644 files/uk/web/javascript/reference/statements/const/index.html delete mode 100644 files/uk/web/javascript/reference/statements/continue/index.html delete mode 100644 files/uk/web/javascript/reference/statements/debugger/index.html delete mode 100644 files/uk/web/javascript/reference/statements/do...while/index.html delete mode 100644 files/uk/web/javascript/reference/statements/empty/index.html delete mode 100644 files/uk/web/javascript/reference/statements/export/index.html delete mode 100644 files/uk/web/javascript/reference/statements/for-await...of/index.html delete mode 100644 files/uk/web/javascript/reference/statements/for...in/index.html delete mode 100644 files/uk/web/javascript/reference/statements/for...of/index.html delete mode 100644 files/uk/web/javascript/reference/statements/for/index.html delete mode 100644 files/uk/web/javascript/reference/statements/function/index.html delete mode 100644 files/uk/web/javascript/reference/statements/function_star_/index.html delete mode 100644 files/uk/web/javascript/reference/statements/if...else/index.html delete mode 100644 files/uk/web/javascript/reference/statements/index.html delete mode 100644 files/uk/web/javascript/reference/statements/label/index.html delete mode 100644 files/uk/web/javascript/reference/statements/let/index.html delete mode 100644 files/uk/web/javascript/reference/statements/return/index.html delete mode 100644 files/uk/web/javascript/reference/statements/switch/index.html delete mode 100644 files/uk/web/javascript/reference/statements/throw/index.html delete mode 100644 files/uk/web/javascript/reference/statements/try...catch/index.html delete mode 100644 files/uk/web/javascript/reference/statements/var/index.html delete mode 100644 files/uk/web/javascript/reference/statements/while/index.html delete mode 100644 files/uk/web/javascript/reference/statements/with/index.html delete mode 100644 files/uk/web/javascript/reference/strict_mode/index.html delete mode 100644 files/uk/web/javascript/reference/template_literals/index.html delete mode 100644 files/uk/web/javascript/reference/trailing_commas/index.html delete mode 100644 files/uk/web/progressive_web_apps/index.html delete mode 100644 files/uk/web/reference/index.html delete mode 100644 files/uk/web/tutorials/index.html delete mode 100644 files/uk/web/xml/index.html delete mode 100644 files/uk/web/xml/xml_introduction/index.html delete mode 100644 files/uk/web/xslt/index.html (limited to 'files/uk') diff --git a/files/uk/_redirects.txt b/files/uk/_redirects.txt deleted file mode 100644 index 5c4a912d26..0000000000 --- a/files/uk/_redirects.txt +++ /dev/null @@ -1,207 +0,0 @@ -# FROM-URL TO-URL -/uk/docs/Glossary/Block/Скриптинг /uk/docs/Glossary/Block/Scripting -/uk/docs/Glossary/DTD /uk/docs/conflicting/Glossary/Doctype -/uk/docs/Glossary/Інструкція /uk/docs/Glossary/Statement -/uk/docs/Glossary/Інтернет /uk/docs/Glossary/Internet -/uk/docs/Glossary/Абстракція /uk/docs/Glossary/Abstraction -/uk/docs/Glossary/Алгоритм /uk/docs/Glossary/Algorithm -/uk/docs/Glossary/Арґумент /uk/docs/Glossary/Argument -/uk/docs/Glossary/Буфер /uk/docs/Glossary/buffer -/uk/docs/Glossary/Веб_Доступність /uk/docs/Glossary/Accessibility -/uk/docs/Glossary/Вікно_перегляду /uk/docs/Glossary/Viewport -/uk/docs/Glossary/ДК /uk/docs/Glossary/UX -/uk/docs/Glossary/Дешифрування /uk/docs/Glossary/Decryption -/uk/docs/Glossary/Динамічна_мова_програмування /uk/docs/Glossary/Dynamic_programming_language -/uk/docs/Glossary/Замикання /uk/docs/Glossary/Closure -/uk/docs/Glossary/Змінна /uk/docs/Glossary/Variable -/uk/docs/Glossary/Значення /uk/docs/Glossary/Value -/uk/docs/Glossary/Компіляція /uk/docs/Glossary/Compile -/uk/docs/Glossary/Криптоаналіз /uk/docs/Glossary/Cryptanalysis -/uk/docs/Glossary/Криптографічна_геш-функція /uk/docs/Glossary/Cryptographic_hash_function -/uk/docs/Glossary/Криптографія /uk/docs/Glossary/Cryptography -/uk/docs/Glossary/Метод /uk/docs/Glossary/Method -/uk/docs/Glossary/ООП /uk/docs/Glossary/OOP -/uk/docs/Glossary/Обгортка /uk/docs/Glossary/Wrapper -/uk/docs/Glossary/Оператор /uk/docs/Glossary/Operator -/uk/docs/Glossary/Посилання /uk/docs/Glossary/Hyperlink -/uk/docs/Glossary/Рекурсія /uk/docs/Glossary/Recursion -/uk/docs/Glossary/Символ /uk/docs/Glossary/Symbol -/uk/docs/Glossary/Тенета /uk/docs/Glossary/World_Wide_Web -/uk/docs/Glossary/Тип /uk/docs/Glossary/Type -/uk/docs/Glossary/Функція /uk/docs/Glossary/Function -/uk/docs/Glossary/Шифр /uk/docs/Glossary/Cipher -/uk/docs/Glossary/Шифротекст /uk/docs/Glossary/Ciphertext -/uk/docs/Glossary/ідентифікатор /uk/docs/Glossary/Identifier -/uk/docs/Learn/CSS/CSS_розмітка /uk/docs/Learn/CSS/CSS_layout -/uk/docs/Learn/CSS/First_steps/Що_таке_CSS /uk/docs/Learn/CSS/First_steps/What_is_CSS -/uk/docs/Learn/CSS/Introduction_to_CSS /en-US/docs/Learn/CSS/First_steps -/uk/docs/Learn/CSS/Styling_text/Стилі_списків /uk/docs/Learn/CSS/Styling_text/Styling_lists -/uk/docs/Learn/Getting_started_with_the_web/Інтернет_та_веб-стандарти /uk/docs/Learn/Getting_started_with_the_web/The_web_and_web_standards -/uk/docs/Learn/HTML/Forms /uk/docs/Learn/Forms -/uk/docs/Learn/HTML/Forms/Your_first_form /uk/docs/Learn/Forms/Your_first_form -/uk/docs/Learn/HTML/Introduction_to_HTML/scho_v_head_metadani_v_HTML /uk/docs/Learn/HTML/Introduction_to_HTML/The_head_metadata_in_HTML -/uk/docs/Learn/How_to_contribute /uk/docs/orphaned/Learn/How_to_contribute -/uk/docs/Learn/JavaScript/Асинхронний /uk/docs/Learn/JavaScript/Asynchronous -/uk/docs/Learn/JavaScript/Будівельні_блоки /uk/docs/Learn/JavaScript/Building_blocks -/uk/docs/Learn/Tools_and_testing/Git_та_GitHub /uk/docs/Learn/Tools_and_testing/GitHub -/uk/docs/Learn/Tools_and_testing/Розуміння_JavaScript-фреймворків_на_стороні_клієнта /uk/docs/Learn/Tools_and_testing/Client-side_JavaScript_frameworks -/uk/docs/Learn/Tools_and_testing/Розуміння_JavaScript-фреймворків_на_стороні_клієнта/znayomymos_zi_svelte /uk/docs/Learn/Tools_and_testing/Client-side_JavaScript_frameworks/Svelte_getting_started -/uk/docs/Learn/Tools_and_testing/Розуміння_інструментів_веб-розробки_на_стороні_клієнта /uk/docs/Learn/Tools_and_testing/Understanding_client-side_tools -/uk/docs/Learn/Tools_and_testing/Тестування_кросбраузерності /uk/docs/Learn/Tools_and_testing/Cross_browser_testing -/uk/docs/Learn/Доступність /uk/docs/Learn/Accessibility -/uk/docs/Learn/Навчання_та_отримання_допомоги /uk/docs/Learn/Learning_and_getting_help -/uk/docs/Learn/Фронт-енд_веб-розробник /uk/docs/Learn/Front-end_web_developer -/uk/docs/MDN/Community /uk/docs/orphaned/MDN/Community -/uk/docs/MDN/Contribute/Guidelines /uk/docs/MDN/Guidelines -/uk/docs/MDN/Contribute/Guidelines/Настанови_зі_стилю /uk/docs/MDN/Guidelines/Writing_style_guide -/uk/docs/MDN/Contribute/Howto/Create_an_MDN_account /uk/docs/orphaned/MDN/Contribute/Howto/Create_an_MDN_account -/uk/docs/MDN/Contribute/Howto/Do_an_editorial_review /uk/docs/orphaned/MDN/Contribute/Howto/Do_an_editorial_review -/uk/docs/MDN/Contribute/Howto/Set_the_summary_for_a_page /uk/docs/orphaned/MDN/Contribute/Howto/Set_the_summary_for_a_page -/uk/docs/MDN/Contribute/Howto/Бета_тестування /uk/docs/orphaned/MDN/Contribute/Howto/Be_a_beta_tester -/uk/docs/MDN/Contribute/Howto/Як_створювати_й_редагувати_сторінки /uk/docs/MDN/Contribute/Howto/Create_and_edit_pages -/uk/docs/MDN/Contribute/Structures /uk/docs/MDN/Structures -/uk/docs/MDN/Contribute/Structures/Шаблони /uk/docs/MDN/Structures/Macros -/uk/docs/MDN/Contribute/Structures/Шаблони/Загальновживані_шаблони /uk/docs/MDN/Structures/Macros/Commonly-used_macros -/uk/docs/MDN/Contribute/Tools /uk/docs/MDN/Tools -/uk/docs/MDN/Contribute/Tools/KumaScript /uk/docs/MDN/Tools/KumaScript -/uk/docs/MDN/Contribute/Tools/KumaScript/Усунення_помилок_KumaScript /uk/docs/MDN/Tools/KumaScript/Troubleshooting -/uk/docs/MDN/Guidelines/Настанови_зі_стилю /uk/docs/MDN/Guidelines/Writing_style_guide -/uk/docs/MDN/Kuma /uk/docs/MDN/Yari -/uk/docs/MDN/Structures/Шаблони /uk/docs/MDN/Structures/Macros -/uk/docs/MDN/Structures/Шаблони/Загальновживані_шаблони /uk/docs/MDN/Structures/Macros/Commonly-used_macros -/uk/docs/MDN/Tools/KumaScript/Усунення_помилок_KumaScript /uk/docs/MDN/Tools/KumaScript/Troubleshooting -/uk/docs/MDN/Про /uk/docs/MDN/About -/uk/docs/MDN/з_чого_почати /uk/docs/MDN/Contribute/Getting_started -/uk/docs/Mozilla/Add-ons/WebExtensions/Що_таке_Web_Розширення /uk/docs/Mozilla/Add-ons/WebExtensions/What_are_WebExtensions -/uk/docs/Web/API/API_відображення_сторінки /uk/docs/Web/API/Page_Visibility_API -/uk/docs/Web/API/Canvas_API/Tutorial/Чутливі_ділянки_та_доступність /uk/docs/Web/API/Canvas_API/Tutorial/Hit_regions_and_accessibility -/uk/docs/Web/API/WindowTimers /uk/docs/conflicting/Web/API/WindowOrWorkerGlobalScope -/uk/docs/Web/API/WindowTimers/setTimeout /uk/docs/Web/API/WindowOrWorkerGlobalScope/setTimeout -/uk/docs/Web/API/Подія /uk/docs/Web/API/Event -/uk/docs/Web/API/Подія/target /uk/docs/Web/API/Event/target -/uk/docs/Web/CSS/CSS_Animations/Використання_CSS_анімацій /uk/docs/Web/CSS/CSS_Animations/Using_CSS_animations -/uk/docs/Web/CSS/CSS_Box_Model/Згортання_відступів /uk/docs/Web/CSS/CSS_Box_Model/Mastering_margin_collapsing -/uk/docs/Web/CSS/CSS_Flexible_Box_Layout/Using_CSS_flexible_boxes /uk/docs/Web/CSS/CSS_Flexible_Box_Layout/Basic_Concepts_of_Flexbox -/uk/docs/Web/CSS/attr /uk/docs/Web/CSS/attr() -/uk/docs/Web/CSS/linear-gradient /uk/docs/Web/CSS/linear-gradient() -/uk/docs/Web/CSS/Альтернативні_таблиці_стилів /uk/docs/Web/CSS/Alternative_style_sheets -/uk/docs/Web/CSS/Довідник /uk/docs/Web/CSS/Reference -/uk/docs/Web/CSS/Коробчаста_модель_CSS /uk/docs/Web/CSS/CSS_Box_Model -/uk/docs/Web/CSS/Модель_візуального_формування /uk/docs/Web/CSS/Visual_formatting_model -/uk/docs/Web/CSS/Розмітка_кулінарна-книга /uk/docs/Web/CSS/Layout_cookbook -/uk/docs/Web/CSS/Схема_компонування /uk/docs/Web/CSS/Layout_mode -/uk/docs/Web/Events/DOMContentLoaded /uk/docs/Web/API/Window/DOMContentLoaded_event -/uk/docs/Web/Events/abort /uk/docs/Web/API/HTMLMediaElement/abort_event -/uk/docs/Web/Guide/CSS /uk/docs/Learn/CSS -/uk/docs/Web/Guide/CSS/Getting_started /uk/docs/conflicting/Learn/CSS/First_steps -/uk/docs/Web/Guide/CSS/Getting_started/What_is_CSS /uk/docs/Learn/CSS/First_steps/How_CSS_works -/uk/docs/Web/Guide/HTML /uk/docs/Learn/HTML -/uk/docs/Web/Guide/HTML/Використання_HTML-секцій_та_структура_документу /uk/docs/Web/Guide/HTML/Using_HTML_sections_and_outlines -/uk/docs/Web/Guide/HTML/Вступ /uk/docs/Learn/HTML/Introduction_to_HTML -/uk/docs/Web/Guide/Графіка /uk/docs/Web/Guide/Graphics -/uk/docs/Web/HTML/Довідник /uk/docs/Web/HTML/Reference -/uk/docs/Web/HTML/Елемент /uk/docs/Web/HTML/Element -/uk/docs/Web/HTML/Елемент/html /uk/docs/Web/HTML/Element/html -/uk/docs/Web/HTML/Елемент/iframe /uk/docs/Web/HTML/Element/iframe -/uk/docs/Web/HTML/Елемент/link /uk/docs/Web/HTML/Element/link -/uk/docs/Web/HTML/Елемент/nav /uk/docs/Web/HTML/Element/nav -/uk/docs/Web/HTML/Елемент/script /uk/docs/Web/HTML/Element/script -/uk/docs/Web/HTML/Елемент/section /uk/docs/Web/HTML/Element/section -/uk/docs/Web/HTML/Елемент/style /uk/docs/Web/HTML/Element/style -/uk/docs/Web/HTML/Елемент/table /uk/docs/Web/HTML/Element/table -/uk/docs/Web/HTML/Елемент/video /uk/docs/Web/HTML/Element/video -/uk/docs/Web/HTML/Елемент/Заголовок /uk/docs/Web/HTML/Element/header -/uk/docs/Web/HTML/Загальні_атрибути /uk/docs/Web/HTML/Global_attributes -/uk/docs/Web/HTML/Загальні_атрибути/hidden /uk/docs/Web/HTML/Global_attributes/hidden -/uk/docs/Web/HTML/Загальні_атрибути/itemscope /uk/docs/Web/HTML/Global_attributes/itemscope -/uk/docs/Web/HTML/Загальні_атрибути/lang /uk/docs/Web/HTML/Global_attributes/lang -/uk/docs/Web/HTML/Загальні_атрибути/tabindex /uk/docs/Web/HTML/Global_attributes/tabindex -/uk/docs/Web/HTML/Режим_сумісності_й_стандартний_режим /uk/docs/Web/HTML/Quirks_Mode_and_Standards_Mode -/uk/docs/Web/HTTP/Заголовки /uk/docs/Web/HTTP/Headers -/uk/docs/Web/HTTP/Заголовки/Accept-Encoding /uk/docs/Web/HTTP/Headers/Accept-Encoding -/uk/docs/Web/HTTP/Заголовки/Accept-Language /uk/docs/Web/HTTP/Headers/Accept-Language -/uk/docs/Web/HTTP/Заголовки/Connection /uk/docs/Web/HTTP/Headers/Connection -/uk/docs/Web/HTTP/Заголовки/Content-Length /uk/docs/Web/HTTP/Headers/Content-Length -/uk/docs/Web/HTTP/Заголовки/Content-Type /uk/docs/Web/HTTP/Headers/Content-Type -/uk/docs/Web/HTTP/Заголовки/ETag /uk/docs/Web/HTTP/Headers/ETag -/uk/docs/Web/HTTP/Заголовки/If-Match /uk/docs/Web/HTTP/Headers/If-Match -/uk/docs/Web/HTTP/Заголовки/Location /uk/docs/Web/HTTP/Headers/Location -/uk/docs/Web/HTTP/Заголовки/Referer /uk/docs/Web/HTTP/Headers/Referer -/uk/docs/Web/HTTP/Заголовки/User-Agent /uk/docs/Web/HTTP/Headers/User-Agent -/uk/docs/Web/HTTP/Заголовки/X-Forwarded-Proto /uk/docs/Web/HTTP/Headers/X-Forwarded-Proto -/uk/docs/Web/JavaScript/Guide/Dokladno_pro_Objectnu_Model /uk/docs/Web/JavaScript/Guide/Details_of_the_Object_Model -/uk/docs/Web/JavaScript/Guide/Вирази_та_оператори /uk/docs/Web/JavaScript/Guide/Expressions_and_Operators -/uk/docs/Web/JavaScript/Reference/Functions/Стрілкові_функції /uk/docs/Web/JavaScript/Reference/Functions/Arrow_functions -/uk/docs/Web/JavaScript/Reference/Functions/решта_параметрів /uk/docs/Web/JavaScript/Reference/Functions/rest_parameters -/uk/docs/Web/JavaScript/Reference/Global_Objects/Array/prototype /uk/docs/orphaned/Web/JavaScript/Reference/Global_Objects/Array/prototype -/uk/docs/Web/JavaScript/Reference/Global_Objects/AsyncFunction/prototype /uk/docs/orphaned/Web/JavaScript/Reference/Global_Objects/AsyncFunction/prototype -/uk/docs/Web/JavaScript/Reference/Global_Objects/Boolean/prototype /uk/docs/conflicting/Web/JavaScript/Reference/Global_Objects/Boolean -/uk/docs/Web/JavaScript/Reference/Global_Objects/Date/prototype /uk/docs/Web/JavaScript/Reference/Global_Objects/Date -/uk/docs/Web/JavaScript/Reference/Global_Objects/Error/prototype /uk/docs/conflicting/Web/JavaScript/Reference/Global_Objects/Error -/uk/docs/Web/JavaScript/Reference/Global_Objects/EvalError/prototype /uk/docs/conflicting/Web/JavaScript/Reference/Global_Objects/EvalError -/uk/docs/Web/JavaScript/Reference/Global_Objects/Function/prototype /uk/docs/conflicting/Web/JavaScript/Reference/Global_Objects/Function -/uk/docs/Web/JavaScript/Reference/Global_Objects/GeneratorFunction/prototype /uk/docs/conflicting/Web/JavaScript/Reference/Global_Objects/GeneratorFunction -/uk/docs/Web/JavaScript/Reference/Global_Objects/InternalError/prototype /uk/docs/conflicting/Web/JavaScript/Reference/Global_Objects/InternalError -/uk/docs/Web/JavaScript/Reference/Global_Objects/Math/заокругелння /uk/docs/Web/JavaScript/Reference/Global_Objects/Math/round -/uk/docs/Web/JavaScript/Reference/Global_Objects/Object/prototype /uk/docs/Web/JavaScript/Reference/Global_Objects/Object -/uk/docs/Web/JavaScript/Reference/Global_Objects/Promise/prototype /uk/docs/conflicting/Web/JavaScript/Reference/Global_Objects/Promise -/uk/docs/Web/JavaScript/Reference/Global_Objects/Promise/відхилено /uk/docs/Web/JavaScript/Reference/Global_Objects/Promise/reject -/uk/docs/Web/JavaScript/Reference/Global_Objects/RangeError/prototype /uk/docs/conflicting/Web/JavaScript/Reference/Global_Objects/RangeError -/uk/docs/Web/JavaScript/Reference/Global_Objects/ReferenceError/prototype /uk/docs/conflicting/Web/JavaScript/Reference/Global_Objects/ReferenceError -/uk/docs/Web/JavaScript/Reference/Global_Objects/SyntaxError/prototype /uk/docs/conflicting/Web/JavaScript/Reference/Global_Objects/SyntaxError -/uk/docs/Web/JavaScript/Reference/Global_Objects/TypeError/prototype /uk/docs/conflicting/Web/JavaScript/Reference/Global_Objects/TypeError -/uk/docs/Web/JavaScript/Reference/Global_Objects/URIError/prototype /uk/docs/conflicting/Web/JavaScript/Reference/Global_Objects/URIError -/uk/docs/Web/JavaScript/Reference/Global_Objects/Число /uk/docs/Web/JavaScript/Reference/Global_Objects/Number -/uk/docs/Web/JavaScript/Reference/Global_Objects/Число/EPSILON /uk/docs/Web/JavaScript/Reference/Global_Objects/Number/EPSILON -/uk/docs/Web/JavaScript/Reference/Global_Objects/Число/MAX_SAFE_INTEGER /uk/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER -/uk/docs/Web/JavaScript/Reference/Global_Objects/Число/MAX_VALUE /uk/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_VALUE -/uk/docs/Web/JavaScript/Reference/Global_Objects/Число/MIN_SAFE_INTEGER /uk/docs/Web/JavaScript/Reference/Global_Objects/Number/MIN_SAFE_INTEGER -/uk/docs/Web/JavaScript/Reference/Global_Objects/Число/MIN_VALUE /uk/docs/Web/JavaScript/Reference/Global_Objects/Number/MIN_VALUE -/uk/docs/Web/JavaScript/Reference/Global_Objects/Число/NEGATIVE_INFINITY /uk/docs/Web/JavaScript/Reference/Global_Objects/Number/NEGATIVE_INFINITY -/uk/docs/Web/JavaScript/Reference/Global_Objects/Число/NaN /uk/docs/Web/JavaScript/Reference/Global_Objects/Number/NaN -/uk/docs/Web/JavaScript/Reference/Global_Objects/Число/Number /uk/docs/Web/JavaScript/Reference/Global_Objects/Number/Number -/uk/docs/Web/JavaScript/Reference/Global_Objects/Число/POSITIVE_INFINITY /uk/docs/Web/JavaScript/Reference/Global_Objects/Number/POSITIVE_INFINITY -/uk/docs/Web/JavaScript/Reference/Global_Objects/Число/isFinite /uk/docs/Web/JavaScript/Reference/Global_Objects/Number/isFinite -/uk/docs/Web/JavaScript/Reference/Global_Objects/Число/isInteger /uk/docs/Web/JavaScript/Reference/Global_Objects/Number/isInteger -/uk/docs/Web/JavaScript/Reference/Global_Objects/Число/isNaN /uk/docs/Web/JavaScript/Reference/Global_Objects/Number/isNaN -/uk/docs/Web/JavaScript/Reference/Global_Objects/Число/isSafeInteger /uk/docs/Web/JavaScript/Reference/Global_Objects/Number/isSafeInteger -/uk/docs/Web/JavaScript/Reference/Global_Objects/Число/parseFloat /uk/docs/Web/JavaScript/Reference/Global_Objects/Number/parseFloat -/uk/docs/Web/JavaScript/Reference/Global_Objects/Число/parseInt /uk/docs/Web/JavaScript/Reference/Global_Objects/Number/parseInt -/uk/docs/Web/JavaScript/Reference/Global_Objects/Число/prototype /uk/docs/conflicting/Web/JavaScript/Reference/Global_Objects/Number -/uk/docs/Web/JavaScript/Reference/Global_Objects/Число/toExponential /uk/docs/Web/JavaScript/Reference/Global_Objects/Number/toExponential -/uk/docs/Web/JavaScript/Reference/Global_Objects/Число/toFixed /uk/docs/Web/JavaScript/Reference/Global_Objects/Number/toFixed -/uk/docs/Web/JavaScript/Reference/Global_Objects/Число/toLocaleString /uk/docs/Web/JavaScript/Reference/Global_Objects/Number/toLocaleString -/uk/docs/Web/JavaScript/Reference/Global_Objects/Число/toPrecision /uk/docs/Web/JavaScript/Reference/Global_Objects/Number/toPrecision -/uk/docs/Web/JavaScript/Reference/Global_Objects/Число/toSource /uk/docs/Web/JavaScript/Reference/Global_Objects/Number/toSource -/uk/docs/Web/JavaScript/Reference/Global_Objects/Число/toString /uk/docs/Web/JavaScript/Reference/Global_Objects/Number/toString -/uk/docs/Web/JavaScript/Reference/Global_Objects/Число/valueOf /uk/docs/Web/JavaScript/Reference/Global_Objects/Number/valueOf -/uk/docs/Web/JavaScript/Reference/Operators/Arithmetic_Operators /uk/docs/conflicting/Web/JavaScript/Reference/Operators -/uk/docs/Web/JavaScript/Reference/Operators/Bitwise_Operators /uk/docs/conflicting/Web/JavaScript/Reference/Operators_7c8eb9475d97a4a734c5991857698560 -/uk/docs/Web/JavaScript/Reference/Operators/Logical_Operators /uk/docs/conflicting/Web/JavaScript/Reference/Operators_f71733c8e7001a29c3ec40d8522a4aca -/uk/docs/Web/JavaScript/Reference/Operators/Ініціалізація_об’єктів /uk/docs/Web/JavaScript/Reference/Operators/Object_initializer -/uk/docs/Web/JavaScript/Reference/Operators/Деструктуризація /uk/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment -/uk/docs/Web/JavaScript/Reference/Operators/Оператор_поширення /uk/docs/conflicting/Web/JavaScript/Reference/Operators/Spread_syntax -/uk/docs/Web/JavaScript/Reference/Operators/Оператор_розпакування /uk/docs/conflicting/Web/JavaScript/Reference/Operators/Spread_syntax -/uk/docs/Web/JavaScript/Reference/Operators/Оператори_порівняння /uk/docs/conflicting/Web/JavaScript/Reference/Operators_a8aa9ce42ce1749862961c61113d120b -/uk/docs/Web/JavaScript/Reference/Operators/Оператори_присвоєння /uk/docs/conflicting/Web/JavaScript/Reference/Operators_1cd48548c16282df3883f99267726c3e -/uk/docs/Web/JavaScript/Reference/Statements/default /uk/docs/conflicting/Web/JavaScript/Reference/Statements/switch -/uk/docs/Web/JavaScript/Reference/Протоколи_перебору /uk/docs/Web/JavaScript/Reference/Iteration_protocols -/uk/docs/Web/JavaScript/Reference/Список_методів /uk/docs/Web/JavaScript/Reference -/uk/docs/Web/JavaScript/oglyad_tehnologiy_JavaScript /uk/docs/Web/JavaScript/JavaScript_technologies_overview -/uk/docs/Web/JavaScript/Перевірка_на_рівність_та_однаковість /uk/docs/Web/JavaScript/Equality_comparisons_and_sameness -/uk/docs/Web/Гудіні /uk/docs/Web/Houdini -/uk/docs/Web/Застосунки/Новітні /uk/docs/Web/Progressive_web_apps -/uk/docs/Web/Посібники /uk/docs/Web/Tutorials -/uk/docs/Інструменти /uk/docs/Tools -/uk/docs/Інструменти/Network_Monitor /uk/docs/Tools/Network_Monitor -/uk/docs/Інструменти/Network_Monitor/Performance_Analysis /uk/docs/Tools/Network_Monitor/Performance_Analysis -/uk/docs/Інструменти/Network_Monitor/Throttling /uk/docs/Tools/Network_Monitor/Throttling -/uk/docs/Інструменти/Network_Monitor/recording /uk/docs/Tools/Network_Monitor/recording -/uk/docs/Інструменти/Network_Monitor/request_details /uk/docs/Tools/Network_Monitor/request_details -/uk/docs/Інструменти/Network_Monitor/request_list /uk/docs/Tools/Network_Monitor/request_list -/uk/docs/Інструменти/Network_Monitor/toolbar /uk/docs/Tools/Network_Monitor/toolbar -/uk/docs/Інструменти/Web_Console /uk/docs/Tools/Web_Console -/uk/docs/Інструменти/Web_Console/Console_messages /uk/docs/Tools/Web_Console/Console_messages -/uk/docs/Інструменти/Web_Console/Opening_the_Web_Console /uk/docs/Tools/Web_Console/UI_Tour -/uk/docs/Інструменти/Web_Console/Split_console /uk/docs/Tools/Web_Console/Split_console -/uk/docs/Оператор_розпакування /uk/docs/conflicting/Web/JavaScript/Reference/Operators/Spread_syntax diff --git a/files/uk/_wikihistory.json b/files/uk/_wikihistory.json deleted file mode 100644 index ccca22f234..0000000000 --- a/files/uk/_wikihistory.json +++ /dev/null @@ -1,6298 +0,0 @@ -{ - "Glossary": { - "modified": "2020-10-07T11:14:53.420Z", - "contributors": [ - "peterbe", - "SphinxKnight", - "wbamberg", - "asmforce", - "yuraantonov", - "andygol" - ] - }, - "Glossary/404": { - "modified": "2019-03-23T22:34:56.546Z", - "contributors": [ - "andygol" - ] - }, - "Glossary/AJAX": { - "modified": "2019-05-04T18:30:01.652Z", - "contributors": [ - "ArtemLashmanov", - "Ahineya", - "Kamilius", - "topvova" - ] - }, - "Glossary/API": { - "modified": "2019-05-16T17:34:18.261Z", - "contributors": [ - "ArtemLashmanov", - "asmforce", - "Kamilius" - ] - }, - "Glossary/ASCII": { - "modified": "2019-11-21T10:02:53.164Z", - "contributors": [ - "DariaManko", - "Abalmazik" - ] - }, - "Glossary/Adobe_Flash": { - "modified": "2019-03-23T22:30:35.338Z", - "contributors": [ - "bogdanBrizh", - "Kamilius" - ] - }, - "Glossary/Alignment_Container": { - "modified": "2019-05-16T17:34:56.193Z", - "contributors": [ - "ArtemLashmanov", - "IllyaOhorodnyk" - ] - }, - "Glossary/Alignment_Subject": { - "modified": "2019-05-16T17:33:30.645Z", - "contributors": [ - "ArtemLashmanov" - ] - }, - "Glossary/Apple_Safari": { - "modified": "2019-03-23T22:16:44.865Z", - "contributors": [ - "Ahineya" - ] - }, - "Glossary/Asynchronous": { - "modified": "2019-12-04T08:26:44.705Z", - "contributors": [ - "DariaManko" - ] - }, - "Glossary/Block": { - "modified": "2020-02-14T13:15:21.105Z", - "contributors": [ - "ivanprytula", - "Sheppy" - ] - }, - "Glossary/Block/CSS": { - "modified": "2020-02-17T05:03:42.939Z", - "contributors": [ - "ivanprytula" - ] - }, - "Glossary/Boolean": { - "modified": "2019-05-04T17:39:14.904Z", - "contributors": [ - "ArtemLashmanov" - ] - }, - "Glossary/Browser": { - "modified": "2019-03-23T22:34:45.503Z", - "contributors": [ - "SKaznadei", - "asmforce", - "Kamilius", - "andygol" - ] - }, - "Glossary/CSS": { - "modified": "2019-03-23T22:16:47.141Z", - "contributors": [ - "Ahineya" - ] - }, - "Glossary/Cache": { - "modified": "2019-05-01T17:34:02.427Z", - "contributors": [ - "ArtemLashmanov" - ] - }, - "Glossary/Callback_function": { - "modified": "2019-12-04T08:45:13.038Z", - "contributors": [ - "DariaManko" - ] - }, - "Glossary/Canvas": { - "modified": "2019-03-23T22:19:27.022Z", - "contributors": [ - "Yaroslav_Yachmenov" - ] - }, - "Glossary/Character": { - "modified": "2019-11-21T10:36:14.321Z", - "contributors": [ - "DariaManko" - ] - }, - "Glossary/Computer_Programming": { - "modified": "2019-11-20T11:10:50.052Z", - "contributors": [ - "DariaManko" - ] - }, - "Glossary/Conditional": { - "modified": "2019-11-06T13:19:10.090Z", - "contributors": [ - "DariaManko" - ] - }, - "Glossary/Constant": { - "modified": "2019-11-06T11:29:17.070Z", - "contributors": [ - "DariaManko" - ] - }, - "Glossary/Control_flow": { - "modified": "2020-05-27T10:14:20.999Z", - "contributors": [ - "DariaManko" - ] - }, - "Glossary/DOM": { - "modified": "2019-10-25T05:58:21.854Z", - "contributors": [ - "DariaManko", - "ArtemLashmanov" - ] - }, - "Glossary/Data_structure": { - "modified": "2019-09-18T10:46:08.363Z", - "contributors": [ - "DollarPo8" - ] - }, - "Glossary/Doctype": { - "modified": "2019-03-23T22:10:46.624Z", - "contributors": [ - "asmforce" - ] - }, - "Glossary/ECMAScript": { - "modified": "2019-07-18T07:42:46.577Z", - "contributors": [ - "DariaManko" - ] - }, - "Glossary/Element": { - "modified": "2019-05-04T18:24:30.901Z", - "contributors": [ - "ArtemLashmanov" - ] - }, - "Glossary/Encryption": { - "modified": "2019-09-16T13:33:02.180Z", - "contributors": [ - "DollarPo8" - ] - }, - "Glossary/Engine": { - "modified": "2019-03-23T22:01:07.842Z", - "contributors": [ - "AdriandeCita", - "v.h.f.u" - ] - }, - "Glossary/Falsy": { - "modified": "2020-07-02T06:47:45.513Z", - "contributors": [ - "DariaManko" - ] - }, - "Glossary/GPU": { - "modified": "2019-05-16T17:29:46.577Z", - "contributors": [ - "ArtemLashmanov", - "AdriandeCita", - "v.h.f.u" - ] - }, - "Glossary/General_header": { - "modified": "2020-03-07T13:21:33.559Z", - "contributors": [ - "andrewtk", - "CODER591" - ] - }, - "Glossary/Global_object": { - "modified": "2019-03-18T21:38:16.358Z", - "contributors": [ - "asmforce" - ] - }, - "Glossary/HTML": { - "modified": "2019-03-23T22:16:40.518Z", - "contributors": [ - "asmforce", - "Ahineya" - ] - }, - "Glossary/HTML5": { - "modified": "2019-03-18T21:27:09.266Z", - "contributors": [ - "Pavlechko" - ] - }, - "Glossary/HTTP": { - "modified": "2019-05-30T04:52:12.452Z", - "contributors": [ - "DariaManko", - "SKaznadei", - "asmforce", - "Ahineya", - "andygol" - ] - }, - "Glossary/HTTP_2": { - "modified": "2019-09-11T01:13:04.211Z", - "contributors": [ - "DollarPo8" - ] - }, - "Glossary/HTTP_header": { - "modified": "2020-03-07T13:00:15.443Z", - "contributors": [ - "andrewtk" - ] - }, - "Glossary/Hoisting": { - "modified": "2019-12-10T09:36:19.930Z", - "contributors": [ - "DariaManko" - ] - }, - "Glossary/Hypertext": { - "modified": "2019-03-18T21:35:05.184Z", - "contributors": [ - "SKaznadei" - ] - }, - "Glossary/IDE": { - "modified": "2019-05-01T19:02:03.018Z", - "contributors": [ - "ArtemLashmanov" - ] - }, - "Glossary/IIFE": { - "modified": "2019-11-19T06:28:36.778Z", - "contributors": [ - "DariaManko", - "asmforce", - "matrixb0ss" - ] - }, - "Glossary/JSON": { - "modified": "2019-03-23T22:16:23.137Z", - "contributors": [ - "asmforce", - "Ahineya" - ] - }, - "Glossary/Java": { - "modified": "2019-03-23T22:05:33.959Z", - "contributors": [ - "asmforce" - ] - }, - "Glossary/JavaScript": { - "modified": "2019-03-23T22:34:42.464Z", - "contributors": [ - "asmforce", - "Ahineya", - "andygol" - ] - }, - "Glossary/Ligature": { - "modified": "2020-04-02T04:36:48.731Z", - "contributors": [ - "DariaManko" - ] - }, - "Glossary/Mozilla_Firefox": { - "modified": "2019-03-18T21:14:54.414Z", - "contributors": [ - "Pavlechko" - ] - }, - "Glossary/NaN": { - "modified": "2019-03-23T22:09:19.287Z", - "contributors": [ - "asmforce" - ] - }, - "Glossary/Node.js": { - "modified": "2019-03-23T22:34:53.261Z", - "contributors": [ - "asmforce", - "andygol" - ] - }, - "Glossary/Null": { - "modified": "2019-06-24T09:18:44.247Z", - "contributors": [ - "DariaManko" - ] - }, - "Glossary/Number": { - "modified": "2019-11-18T12:47:58.668Z", - "contributors": [ - "DariaManko" - ] - }, - "Glossary/Object": { - "modified": "2019-03-23T22:09:20.640Z", - "contributors": [ - "bdvorianov", - "asmforce" - ] - }, - "Glossary/Object_reference": { - "modified": "2019-03-23T22:04:21.513Z", - "contributors": [ - "asmforce" - ] - }, - "Glossary/Polyfill": { - "modified": "2019-03-23T22:20:57.226Z", - "contributors": [ - "asmforce", - "volodymyrlut" - ] - }, - "Glossary/Primitive": { - "modified": "2019-03-23T22:08:18.870Z", - "contributors": [ - "asmforce" - ] - }, - "Glossary/Protocol": { - "modified": "2019-03-18T21:15:48.444Z", - "contributors": [ - "asmforce", - "andygol" - ] - }, - "Glossary/Prototype-based_programming": { - "modified": "2019-03-23T22:05:22.196Z", - "contributors": [ - "ivaskonyan" - ] - }, - "Glossary/Proxy_server": { - "modified": "2020-08-04T14:44:39.195Z", - "contributors": [ - "HA3IK" - ] - }, - "Glossary/REST": { - "modified": "2019-05-30T06:11:30.348Z", - "contributors": [ - "DariaManko" - ] - }, - "Glossary/RSS": { - "modified": "2019-03-23T22:10:09.352Z", - "contributors": [ - "asmforce" - ] - }, - "Glossary/Regular_expression": { - "modified": "2019-03-23T22:34:55.297Z", - "contributors": [ - "asmforce", - "andygol" - ] - }, - "Glossary/SVG": { - "modified": "2019-03-23T22:16:21.554Z", - "contributors": [ - "Ahineya" - ] - }, - "Glossary/Scope": { - "modified": "2019-03-23T22:04:26.429Z", - "contributors": [ - "asmforce" - ] - }, - "Glossary/Self-Executing_Anonymous_Function": { - "modified": "2019-11-18T13:35:32.463Z", - "contributors": [ - "DariaManko" - ] - }, - "Glossary/Server": { - "modified": "2019-03-23T22:33:38.300Z", - "contributors": [ - "andygol" - ] - }, - "Glossary/Shim": { - "modified": "2019-07-17T11:56:57.795Z", - "contributors": [ - "DariaManko" - ] - }, - "Glossary/Static_method": { - "modified": "2019-07-23T09:08:00.422Z", - "contributors": [ - "DariaManko" - ] - }, - "Glossary/String": { - "modified": "2019-07-23T09:05:07.539Z", - "contributors": [ - "DariaManko" - ] - }, - "Glossary/Synchronous": { - "modified": "2019-12-04T06:46:23.272Z", - "contributors": [ - "DariaManko" - ] - }, - "Glossary/Truthy": { - "modified": "2020-07-02T06:50:51.421Z", - "contributors": [ - "DariaManko" - ] - }, - "Glossary/Type_Conversion": { - "modified": "2019-06-05T11:05:39.376Z", - "contributors": [ - "DariaManko" - ] - }, - "Glossary/Type_coercion": { - "modified": "2019-11-18T09:56:50.946Z", - "contributors": [ - "DariaManko" - ] - }, - "Glossary/URI": { - "modified": "2019-05-16T16:46:33.594Z", - "contributors": [ - "ArtemLashmanov" - ] - }, - "Glossary/URL": { - "modified": "2019-03-23T22:16:32.060Z", - "contributors": [ - "asmforce", - "Ahineya" - ] - }, - "Glossary/URN": { - "modified": "2019-05-16T17:23:44.498Z", - "contributors": [ - "ArtemLashmanov" - ] - }, - "Glossary/UTF-8": { - "modified": "2019-11-21T10:03:19.479Z", - "contributors": [ - "DariaManko" - ] - }, - "Glossary/W3C": { - "modified": "2019-03-23T22:04:52.228Z", - "contributors": [ - "websunsey" - ] - }, - "Glossary/WebGL": { - "modified": "2019-03-23T22:30:09.114Z", - "contributors": [ - "Seprum" - ] - }, - "Glossary/WebSockets": { - "modified": "2019-03-18T21:34:30.974Z", - "contributors": [ - "asmforce" - ] - }, - "Glossary/Whitespace": { - "modified": "2020-05-28T11:54:54.898Z", - "contributors": [ - "DariaManko" - ] - }, - "Glossary/XML": { - "modified": "2019-03-26T03:14:24.244Z", - "contributors": [ - "boxa6", - "asmforce", - "Ahineya" - ] - }, - "Glossary/array": { - "modified": "2019-07-01T08:49:00.284Z", - "contributors": [ - "DariaManko", - "Antyneskul", - "topvova" - ] - }, - "Glossary/character_encoding": { - "modified": "2019-11-21T08:23:50.859Z", - "contributors": [ - "DariaManko" - ] - }, - "Glossary/hash": { - "modified": "2019-03-18T20:41:54.293Z", - "contributors": [ - "IllyaOhorodnyk" - ] - }, - "Glossary/loop": { - "modified": "2019-11-07T06:27:14.402Z", - "contributors": [ - "DariaManko" - ] - }, - "Glossary/property": { - "modified": "2019-07-18T11:23:43.506Z", - "contributors": [ - "DariaManko" - ] - }, - "Glossary/property/CSS": { - "modified": "2019-07-18T10:59:05.940Z", - "contributors": [ - "DariaManko" - ] - }, - "Glossary/property/JavaScript": { - "modified": "2019-07-18T12:25:13.399Z", - "contributors": [ - "DariaManko" - ] - }, - "Glossary/undefined": { - "modified": "2019-03-23T22:04:17.494Z", - "contributors": [ - "asmforce" - ] - }, - "Learn": { - "modified": "2020-07-16T22:43:48.924Z", - "contributors": [ - "FidykDmytro", - "Juliya13uk", - "SphinxKnight", - "svarlamov", - "SKaznadei", - "asmforce", - "yuraantonov", - "andrewnovsky" - ] - }, - "Learn/CSS": { - "modified": "2020-07-16T22:25:38.014Z", - "contributors": [ - "SergiyLuckys", - "josh-wong" - ] - }, - "Learn/CSS/Building_blocks": { - "modified": "2020-07-25T19:21:51.677Z", - "contributors": [ - "nepiravno", - "chrisdavidmills" - ] - }, - "Learn/CSS/Building_blocks/Cascade_and_inheritance": { - "modified": "2020-07-16T22:28:32.944Z", - "contributors": [ - "sonia-ko" - ] - }, - "Learn/CSS/First_steps": { - "modified": "2020-07-25T19:19:07.223Z", - "contributors": [ - "nepiravno", - "SergiyLuckys" - ] - }, - "Learn/CSS/Styling_text": { - "modified": "2020-07-25T19:23:28.097Z", - "contributors": [ - "nepiravno", - "wilton-cruz" - ] - }, - "Learn/Common_questions": { - "modified": "2020-07-16T22:35:27.609Z", - "contributors": [ - "SKaznadei", - "chrisdavidmills" - ] - }, - "Learn/Common_questions/set_up_a_local_testing_server": { - "modified": "2020-07-16T22:35:53.739Z", - "contributors": [ - "fvl955", - "SKaznadei" - ] - }, - "Learn/Getting_started_with_the_web": { - "modified": "2020-09-04T18:06:46.776Z", - "contributors": [ - "borysl", - "SergiyLuckys", - "ArtemLashmanov", - "SKaznadei", - "asmforce", - "Ahineya", - "yuraantonov" - ] - }, - "Learn/Getting_started_with_the_web/CSS_basics": { - "modified": "2020-07-16T22:35:04.570Z", - "contributors": [ - "igor.matzyshyn", - "websunsey", - "Ahineya" - ] - }, - "Learn/Getting_started_with_the_web/Dealing_with_files": { - "modified": "2020-07-16T22:34:38.829Z", - "contributors": [ - "mdymytrova", - "feel13good" - ] - }, - "Learn/Getting_started_with_the_web/HTML_basics": { - "modified": "2020-10-14T08:48:06.055Z", - "contributors": [ - "azvilys", - "serartmar", - "websunsey", - "mdymytrova", - "feel13good" - ] - }, - "Learn/Getting_started_with_the_web/How_the_Web_works": { - "modified": "2020-07-16T22:34:03.150Z", - "contributors": [ - "steinbergmann", - "SKaznadei", - "mdymytrova" - ] - }, - "Learn/Getting_started_with_the_web/Installing_basic_software": { - "modified": "2020-07-26T07:39:08.088Z", - "contributors": [ - "nepiravno", - "archVasyl", - "w3schoolsrus", - "gregory-js", - "SKaznadei", - "mdymytrova", - "feel13good" - ] - }, - "Learn/Getting_started_with_the_web/JavaScript_basics": { - "modified": "2020-07-16T22:35:17.273Z", - "contributors": [ - "OlexandrIlchenko", - "bdvorianov", - "AlexandraIM", - "ivovchak", - "mirkinoid" - ] - }, - "Learn/Getting_started_with_the_web/Publishing_your_website": { - "modified": "2020-07-16T22:34:29.145Z", - "contributors": [ - "OlexandrIlchenko", - "mdymytrova" - ] - }, - "Learn/Getting_started_with_the_web/What_will_your_website_look_like": { - "modified": "2020-07-16T22:34:20.265Z", - "contributors": [ - "SKaznadei", - "mdymytrova" - ] - }, - "Learn/HTML": { - "modified": "2020-07-16T22:22:24.960Z", - "contributors": [ - "rage2k2", - "feel13good", - "hadleyel" - ] - }, - "Learn/HTML/Introduction_to_HTML": { - "modified": "2020-07-16T22:22:53.922Z", - "contributors": [ - "ArtemLashmanov", - "websunsey", - "mdymytrova", - "feel13good" - ] - }, - "Learn/HTML/Introduction_to_HTML/Creating_hyperlinks": { - "modified": "2020-07-16T22:23:48.045Z", - "contributors": [ - "taras-d" - ] - }, - "Learn/HTML/Introduction_to_HTML/Debugging_HTML": { - "modified": "2020-07-16T22:24:16.560Z", - "contributors": [ - "websunsey" - ] - }, - "Learn/HTML/Introduction_to_HTML/Getting_started": { - "modified": "2020-07-16T22:23:08.794Z", - "contributors": [ - "Juliya13uk", - "OlehMrB", - "Orlann", - "websunsey", - "mdymytrova" - ] - }, - "Learn/HTML/Introduction_to_HTML/HTML_text_fundamentals": { - "modified": "2020-07-16T22:23:39.702Z", - "contributors": [ - "yasyk20", - "Sergiy_Luckys", - "websunsey" - ] - }, - "Learn/HTML/Multimedia_and_embedding": { - "modified": "2020-07-16T22:24:29.703Z", - "contributors": [ - "Onimi", - "IshIdzy2001", - "feel13good" - ] - }, - "Learn/HTML/Tables": { - "modified": "2020-07-25T20:30:18.903Z", - "contributors": [ - "nepiravno", - "Oleksandr09", - "AlexOcheretnyi", - "feel13good" - ] - }, - "Learn/JavaScript": { - "modified": "2020-07-16T22:29:45.640Z", - "contributors": [ - "FidykDmytro", - "OlexandrIlchenko", - "asmforce", - "chrisdavidmills" - ] - }, - "Learn/JavaScript/Client-side_web_APIs": { - "modified": "2020-07-25T20:51:00.301Z", - "contributors": [ - "nepiravno", - "Oleksandr09" - ] - }, - "Learn/JavaScript/First_steps": { - "modified": "2020-07-25T19:45:01.889Z", - "contributors": [ - "nepiravno", - "FidykDmytro", - "OlexandrIlchenko" - ] - }, - "Learn/JavaScript/First_steps/What_is_JavaScript": { - "modified": "2020-07-16T22:30:13.029Z", - "contributors": [ - "cypper" - ] - }, - "Learn/JavaScript/Objects": { - "modified": "2020-07-16T22:31:53.825Z", - "contributors": [ - "asmforce", - "HelgeUa" - ] - }, - "Learn/JavaScript/Objects/Basics": { - "modified": "2020-07-16T22:32:02.509Z", - "contributors": [ - "HelgeUa" - ] - }, - "Learn/JavaScript/Objects/Object-oriented_JS": { - "modified": "2020-07-16T22:32:08.919Z", - "contributors": [ - "HelgeUa" - ] - }, - "Learn/Server-side": { - "modified": "2020-07-16T22:36:02.652Z", - "contributors": [ - "chrisdavidmills" - ] - }, - "Learn/Server-side/Django": { - "modified": "2020-07-16T22:36:36.018Z", - "contributors": [ - "ostafiychukv", - "rudarav" - ] - }, - "Learn/Server-side/Django/Introduction": { - "modified": "2020-07-16T22:36:42.110Z", - "contributors": [ - "ostafiychukv" - ] - }, - "Learn/Server-side/Express_Nodejs": { - "modified": "2020-07-16T22:37:55.702Z", - "contributors": [ - "lol-russo" - ] - }, - "Learn/Server-side/Express_Nodejs/routes": { - "modified": "2020-07-16T22:38:28.176Z", - "contributors": [ - "Zooman090" - ] - }, - "Learn/Tools_and_testing": { - "modified": "2020-07-25T20:16:04.168Z", - "contributors": [ - "chrisdavidmills" - ] - }, - "MDN": { - "modified": "2020-02-19T18:40:00.793Z", - "contributors": [ - "jswisher", - "SphinxKnight", - "wbamberg", - "asmforce", - "trofima", - "yuraantonov", - "imrock", - "Jeremie" - ] - }, - "MDN/Contribute": { - "modified": "2019-03-23T22:38:54.409Z", - "contributors": [ - "wbamberg", - "asmforce", - "websunsey", - "chrisdavidmills" - ] - }, - "MDN/Contribute/Getting_started": { - "modified": "2020-09-30T17:16:41.938Z", - "contributors": [ - "chrisdavidmills", - "wbamberg", - "asmforce", - "hanna-bublyk", - "Fgeniy", - "websunsey", - "trofima" - ] - }, - "MDN/Contribute/Howto": { - "modified": "2019-01-17T01:00:56.499Z", - "contributors": [ - "wbamberg", - "asmforce", - "jswisher" - ] - }, - "MDN/Guidelines": { - "modified": "2020-09-30T15:32:09.261Z", - "contributors": [ - "chrisdavidmills", - "wbamberg", - "asmforce", - "jswisher" - ] - }, - "MDN/Structures": { - "modified": "2020-09-30T12:57:34.758Z", - "contributors": [ - "chrisdavidmills", - "wbamberg", - "asmforce", - "jswisher" - ] - }, - "MDN/Tools": { - "modified": "2020-09-30T16:54:47.325Z", - "contributors": [ - "chrisdavidmills", - "wbamberg", - "jswisher" - ] - }, - "MDN/Tools/KumaScript": { - "modified": "2020-09-30T16:54:47.735Z", - "contributors": [ - "chrisdavidmills", - "wbamberg", - "asmforce", - "jwhitlock" - ] - }, - "Mozilla": { - "modified": "2019-03-23T22:16:17.031Z", - "contributors": [ - "asmforce", - "dkocho4" - ] - }, - "Mozilla/Add-ons": { - "modified": "2019-09-09T12:16:17.078Z", - "contributors": [ - "SphinxKnight", - "asmforce", - "hanstalker", - "KipiShKing" - ] - }, - "Mozilla/Add-ons/WebExtensions": { - "modified": "2019-05-29T06:22:58.610Z", - "contributors": [ - "s5t8e9r1n", - "asmforce", - "dvincent" - ] - }, - "Mozilla/Add-ons/WebExtensions/API": { - "modified": "2019-05-28T03:25:19.273Z" - }, - "Mozilla/Add-ons/WebExtensions/API/sessions": { - "modified": "2020-10-15T22:19:17.157Z" - }, - "Mozilla/Add-ons/WebExtensions/API/sessions/restore": { - "modified": "2020-10-15T22:19:11.730Z", - "contributors": [ - "asmforce", - "cloudgnome" - ] - }, - "Mozilla/Add-ons/WebExtensions/Interact_with_the_clipboard": { - "modified": "2019-05-25T08:49:03.914Z", - "contributors": [ - "cloudgnome" - ] - }, - "Mozilla/Firefox": { - "modified": "2019-09-10T14:53:23.406Z", - "contributors": [ - "SphinxKnight", - "wbamberg", - "yuraantonov", - "teoli" - ] - }, - "Mozilla/Firefox/Experimental_features": { - "modified": "2019-01-17T00:32:08.565Z", - "contributors": [ - "wbamberg", - "yuraantonov" - ] - }, - "Mozilla/Firefox/Releases": { - "modified": "2019-01-17T00:28:32.216Z", - "contributors": [ - "wbamberg", - "yuraantonov", - "Sheppy" - ] - }, - "Mozilla/Firefox/Releases/53": { - "modified": "2019-03-23T22:20:20.209Z", - "contributors": [ - "wbamberg", - "arcade", - "yuraantonov" - ] - }, - "Mozilla/Firefox/Releases/54": { - "modified": "2019-03-23T22:19:31.210Z", - "contributors": [ - "wbamberg", - "AdriandeCita", - "yuraantonov" - ] - }, - "Mozilla/Firefox/Releases/56": { - "modified": "2019-03-23T22:07:50.027Z", - "contributors": [ - "wbamberg", - "AndriiZ" - ] - }, - "Tools/Page_Inspector": { - "modified": "2020-07-16T22:34:29.737Z", - "contributors": [ - "chrisdavidmills" - ] - }, - "Tools/Page_Inspector/How_to": { - "modified": "2020-07-16T22:34:32.207Z", - "contributors": [ - "sidgan" - ] - }, - "Web": { - "modified": "2020-01-20T18:42:58.122Z", - "contributors": [ - "curtdp", - "VitaliiBilan", - "ASeegull", - "yuraantonov", - "andrewnovsky", - "th65" - ] - }, - "Web/API": { - "modified": "2020-10-27T05:49:30.485Z", - "contributors": [ - "dmytro.davydenko", - "teoli", - "yuraantonov" - ] - }, - "Web/API/ANGLE_instanced_arrays": { - "modified": "2020-10-15T22:20:52.655Z", - "contributors": [ - "Sergiy_Luckys" - ] - }, - "Web/API/Ambient_Light_Events": { - "modified": "2020-10-27T06:20:23.810Z", - "contributors": [ - "dmytro.davydenko" - ] - }, - "Web/API/Blob": { - "modified": "2020-01-08T09:45:47.984Z", - "contributors": [ - "switchUA", - "angry-grandma", - "curdwithraisins" - ] - }, - "Web/API/Canvas_API": { - "modified": "2019-03-23T22:08:43.126Z", - "contributors": [ - "DmytroMyhal", - "pa7" - ] - }, - "Web/API/Canvas_API/Tutorial": { - "modified": "2019-03-23T22:08:45.561Z", - "contributors": [ - "dustinpaluch" - ] - }, - "Web/API/Canvas_API/Tutorial/Basic_usage": { - "modified": "2020-07-10T12:46:01.798Z", - "contributors": [ - "alexeeva.iryna" - ] - }, - "Web/API/Console": { - "modified": "2019-03-23T22:08:16.158Z", - "contributors": [ - "benjamingr" - ] - }, - "Web/API/Console/dir": { - "modified": "2020-01-20T18:31:16.722Z", - "contributors": [ - "curtdp", - "ASeegull" - ] - }, - "Web/API/Console/log": { - "modified": "2019-03-18T20:38:21.322Z", - "contributors": [ - "Quadracopter", - "YukihiroSM", - "muhus" - ] - }, - "Web/API/CustomEvent": { - "modified": "2020-10-15T21:58:35.424Z", - "contributors": [ - "fscholz", - "SilentStorm", - "mfluehr" - ] - }, - "Web/API/CustomEvent/initCustomEvent": { - "modified": "2019-03-23T22:03:44.967Z", - "contributors": [ - "FlyingLeave" - ] - }, - "Web/API/DOMString": { - "modified": "2020-12-03T12:45:52.192Z", - "contributors": [ - "Kyrylo-77" - ] - }, - "Web/API/Document": { - "modified": "2019-03-18T21:27:25.119Z", - "contributors": [ - "topvova" - ] - }, - "Web/API/Document/visibilitychange_event": { - "modified": "2020-10-15T22:29:35.772Z", - "contributors": [ - "memodim.di" - ] - }, - "Web/API/Element": { - "modified": "2020-10-15T22:23:49.564Z", - "contributors": [ - "archVasyl", - "Whhymee" - ] - }, - "Web/API/Element/getClientRects": { - "modified": "2020-10-15T22:23:41.070Z", - "contributors": [ - "topvova" - ] - }, - "Web/API/GlobalEventHandlers": { - "modified": "2020-10-15T22:29:29.087Z", - "contributors": [ - "mfuji09" - ] - }, - "Web/API/GlobalEventHandlers/onkeydown": { - "modified": "2020-10-15T22:29:21.321Z", - "contributors": [ - "memodim.di" - ] - }, - "Web/API/GlobalEventHandlers/onkeyup": { - "modified": "2020-10-15T22:29:27.974Z", - "contributors": [ - "memodim.di" - ] - }, - "Web/API/GlobalEventHandlers/onmouseover": { - "modified": "2020-10-15T22:29:40.177Z", - "contributors": [ - "memodim.di" - ] - }, - "Web/API/HTMLCanvasElement": { - "modified": "2019-03-23T22:11:16.811Z", - "contributors": [ - "trusktr" - ] - }, - "Web/API/HTMLElement": { - "modified": "2019-03-23T22:02:17.514Z", - "contributors": [ - "jpmedley" - ] - }, - "Web/API/HTMLElement/offsetTop": { - "modified": "2020-10-15T21:59:06.214Z", - "contributors": [ - "SphinxKnight", - "braggae" - ] - }, - "Web/API/HTMLFormElement": { - "modified": "2020-10-15T22:27:30.315Z", - "contributors": [ - "alattalatta" - ] - }, - "Web/API/HTMLFormElement/reset": { - "modified": "2020-10-15T22:27:29.495Z", - "contributors": [ - "Halochkin" - ] - }, - "Web/API/HTMLImageElement": { - "modified": "2019-03-23T22:20:56.281Z", - "contributors": [ - "erikadoyle" - ] - }, - "Web/API/HTMLImageElement/Image": { - "modified": "2019-03-23T22:20:56.448Z", - "contributors": [ - "asmforce" - ] - }, - "Web/API/HTML_DOM_API": { - "modified": "2020-10-15T22:27:41.061Z", - "contributors": [ - "Zearin_Galaurum" - ] - }, - "Web/API/HTML_DOM_API/Microtask_guide": { - "modified": "2020-03-11T12:39:43.051Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/API/Headers": { - "modified": "2020-10-15T22:15:58.027Z", - "contributors": [ - "khomyakdi" - ] - }, - "Web/API/History_API": { - "modified": "2020-10-28T04:18:03.775Z", - "contributors": [ - "dmytro.davydenko" - ] - }, - "Web/API/Intersection_Observer_API": { - "modified": "2020-10-15T22:31:06.546Z", - "contributors": [ - "vtlk", - "VolodymyrZaplatynskii" - ] - }, - "Web/API/MediaQueryList": { - "modified": "2020-10-15T22:17:20.803Z" - }, - "Web/API/MediaQueryList/addListener": { - "modified": "2020-10-15T22:17:19.815Z", - "contributors": [ - "asmforce" - ] - }, - "Web/API/NetworkInformation": { - "modified": "2020-10-27T08:34:51.250Z", - "contributors": [ - "dmytro.davydenko" - ] - }, - "Web/API/Network_Information_API": { - "modified": "2020-10-27T08:08:31.980Z", - "contributors": [ - "dmytro.davydenko" - ] - }, - "Web/API/Node": { - "modified": "2019-03-23T22:18:31.556Z", - "contributors": [ - "abbycar" - ] - }, - "Web/API/Node/contains": { - "modified": "2019-03-23T22:18:27.726Z", - "contributors": [ - "piton13" - ] - }, - "Web/API/PromiseRejectionEvent": { - "modified": "2020-10-15T22:27:09.025Z", - "contributors": [ - "DariaManko", - "Sheppy" - ] - }, - "Web/API/PromiseRejectionEvent/PromiseRejectionEvent": { - "modified": "2020-10-15T22:27:08.856Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/API/PromiseRejectionEvent/promise": { - "modified": "2020-10-15T22:27:09.252Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/API/PromiseRejectionEvent/reason": { - "modified": "2020-10-15T22:27:10.645Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/API/SVGAnimatedString": { - "modified": "2020-10-15T22:11:42.638Z", - "contributors": [ - "fscholz" - ] - }, - "Web/API/SVGAnimatedString/animVal": { - "modified": "2020-10-15T22:11:41.186Z", - "contributors": [ - "Halochkin" - ] - }, - "Web/API/URLSearchParams": { - "modified": "2020-10-04T20:10:53.785Z", - "contributors": [ - "i.yalovecky", - "akmil" - ] - }, - "Web/API/WebGL_API": { - "modified": "2019-03-23T22:30:04.010Z", - "contributors": [ - "Seprum" - ] - }, - "Web/API/WebSocket": { - "modified": "2019-03-23T22:10:43.303Z", - "contributors": [ - "bsurai" - ] - }, - "Web/API/Web_Workers_API": { - "modified": "2019-03-23T22:24:27.381Z", - "contributors": [ - "Nazichok", - "curdwithraisins" - ] - }, - "Web/API/Window": { - "modified": "2019-03-23T22:14:11.634Z", - "contributors": [ - "jpmedley" - ] - }, - "Web/API/Window/confirm": { - "modified": "2019-03-18T21:44:10.491Z", - "contributors": [ - "AndriiZ" - ] - }, - "Web/API/Window/console": { - "modified": "2019-03-18T21:43:46.635Z", - "contributors": [ - "AndriiZ" - ] - }, - "Web/API/Window/history": { - "modified": "2020-10-15T22:15:01.374Z", - "contributors": [ - "FolknR" - ] - }, - "Web/API/Window/localStorage": { - "modified": "2020-10-15T21:53:14.235Z", - "contributors": [ - "asmforce", - "igor-budzin", - "a1b0r", - "AndriiZ", - "yuraantonov" - ] - }, - "Web/API/Window/rejectionhandled_event": { - "modified": "2020-10-15T22:27:09.512Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/API/Window/self": { - "modified": "2020-10-15T22:17:13.466Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/API/Window/unhandledrejection_event": { - "modified": "2020-10-15T22:27:10.665Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/API/WindowEventHandlers": { - "modified": "2020-10-15T22:27:07.947Z", - "contributors": [ - "Wind1808" - ] - }, - "Web/API/WindowEventHandlers/onrejectionhandled": { - "modified": "2020-10-15T22:27:07.716Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/API/WindowEventHandlers/onunhandledrejection": { - "modified": "2020-10-15T22:27:10.711Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/API/WindowOrWorkerGlobalScope": { - "modified": "2019-03-23T22:11:46.691Z", - "contributors": [ - "Bzbarsky" - ] - }, - "Web/API/XMLHttpRequest": { - "modified": "2020-10-15T21:59:05.751Z", - "contributors": [ - "shkiper.d1000", - "fscholz", - "rshul", - "Jedipedia" - ] - }, - "Web/Accessibility": { - "modified": "2019-09-11T08:24:19.079Z", - "contributors": [ - "SphinxKnight", - "Decoy9697" - ] - }, - "Web/Accessibility/Understanding_WCAG": { - "modified": "2020-04-15T12:30:30.236Z" - }, - "Web/Accessibility/Understanding_WCAG/Keyboard": { - "modified": "2020-04-26T19:26:49.638Z", - "contributors": [ - "memodim.di" - ] - }, - "Web/CSS": { - "modified": "2019-11-24T18:07:10.819Z", - "contributors": [ - "SphinxKnight", - "websunsey", - "piton13", - "yuraantonov", - "andygol", - "nazariy_mokriy", - "Tigt" - ] - }, - "Web/CSS/-moz-orient": { - "modified": "2019-03-23T22:19:30.916Z", - "contributors": [ - "teoli", - "Yaroslav_Yachmenov" - ] - }, - "Web/CSS/::before": { - "modified": "2020-10-15T22:16:01.601Z", - "contributors": [ - "khomyakdi" - ] - }, - "Web/CSS/::slotted": { - "modified": "2020-10-15T22:15:26.658Z", - "contributors": [ - "Halochkin" - ] - }, - "Web/CSS/:active": { - "modified": "2020-10-15T22:06:39.492Z", - "contributors": [ - "AdriandeCita" - ] - }, - "Web/CSS/:root": { - "modified": "2019-03-23T22:26:36.649Z", - "contributors": [ - "Kamilius" - ] - }, - "Web/CSS/@font-face": { - "modified": "2020-10-15T22:15:28.137Z", - "contributors": [ - "khomyakdi" - ] - }, - "Web/CSS/@font-face/font-display": { - "modified": "2020-10-15T22:18:51.245Z", - "contributors": [ - "cloudgnome" - ] - }, - "Web/CSS/@page": { - "modified": "2020-10-15T22:33:30.409Z", - "contributors": [ - "wbamberg" - ] - }, - "Web/CSS/@page/bleed": { - "modified": "2020-10-15T22:33:30.588Z", - "contributors": [ - "pavlcc242" - ] - }, - "Web/CSS/CSS_Animations": { - "modified": "2019-03-23T22:07:59.311Z", - "contributors": [ - "AdriandeCita", - "GiorgioLviv" - ] - }, - "Web/CSS/CSS_Flexible_Box_Layout": { - "modified": "2019-03-23T22:35:53.862Z", - "contributors": [ - "jenja-pa", - "chrisdavidmills" - ] - }, - "Web/CSS/CSS_Grid_Layout": { - "modified": "2020-11-15T20:09:00.015Z", - "contributors": [ - "IgorDmytrenko", - "siroha", - "mfluehr" - ] - }, - "Web/CSS/CSS_Grid_Layout/Basic_Concepts_of_Grid_Layout": { - "modified": "2019-07-02T15:55:03.869Z", - "contributors": [ - "Physicist13", - "PanOrange", - "SphinxKnight", - "siroha", - "TeeZ0NE", - "AndriiLevchenko", - "Tenebries", - "ivaskonyan" - ] - }, - "Web/CSS/CSS_Grid_Layout/Relationship_of_Grid_Layout": { - "modified": "2019-03-18T21:22:54.589Z", - "contributors": [ - "siroha" - ] - }, - "Web/CSS/CSS_Selectors": { - "modified": "2020-08-09T11:04:08.558Z", - "contributors": [ - "i.yalovecky", - "str1k6rJP", - "pupenasan" - ] - }, - "Web/CSS/Mozilla_Extensions": { - "modified": "2020-04-22T11:02:03.644Z", - "contributors": [ - "memodim.di" - ] - }, - "Web/CSS/animation-name": { - "modified": "2019-03-23T22:07:18.729Z", - "contributors": [ - "bsurai" - ] - }, - "Web/CSS/attr()": { - "modified": "2020-11-04T08:52:05.341Z", - "contributors": [ - "chrisdavidmills", - "deltverden", - "PretorDH" - ] - }, - "Web/CSS/backdrop-filter": { - "modified": "2020-10-15T22:07:03.435Z", - "contributors": [ - "rodzyk" - ] - }, - "Web/CSS/filter": { - "modified": "2019-03-23T22:33:18.716Z", - "contributors": [ - "Sebastianz", - "AlinaKuzmenko" - ] - }, - "Web/CSS/flex": { - "modified": "2019-03-23T22:29:11.887Z", - "contributors": [ - "piton13", - "Kamilius" - ] - }, - "Web/CSS/flex-grow": { - "modified": "2019-03-23T22:16:02.487Z", - "contributors": [ - "Ingvarr" - ] - }, - "Web/CSS/font-smooth": { - "modified": "2020-10-15T22:28:25.797Z", - "contributors": [ - "halfdead30" - ] - }, - "Web/CSS/font-weight": { - "modified": "2020-10-15T22:00:40.932Z", - "contributors": [ - "krasnovskyy", - "yuraantonov" - ] - }, - "Web/CSS/grid-template-areas": { - "modified": "2020-10-15T22:14:16.934Z", - "contributors": [ - "yulyasystem" - ] - }, - "Web/CSS/linear-gradient()": { - "modified": "2020-11-16T08:58:02.369Z", - "contributors": [ - "chrisdavidmills", - "halfdead30" - ] - }, - "Web/CSS/order": { - "modified": "2019-03-23T22:18:44.470Z", - "contributors": [ - "piton13" - ] - }, - "Web/CSS/position": { - "modified": "2019-03-23T22:08:24.528Z", - "contributors": [ - "asmforce" - ] - }, - "Web/CSS/resize": { - "modified": "2019-03-23T22:21:56.329Z", - "contributors": [ - "yuraantonov" - ] - }, - "Web/CSS/z-index": { - "modified": "2020-10-15T22:18:44.612Z", - "contributors": [ - "mr-vikster" - ] - }, - "Web/Events": { - "modified": "2019-04-30T14:15:07.936Z", - "contributors": [ - "wbamberg", - "teoli" - ] - }, - "Web/Guide": { - "modified": "2019-03-23T22:38:59.502Z", - "contributors": [ - "andrewnovsky", - "yakubiv", - "ASeegull", - "jsx" - ] - }, - "Web/Guide/HTML/Content_categories": { - "modified": "2019-03-23T22:33:28.403Z", - "contributors": [ - "ivaskonyan", - "asmforce", - "Kamilius" - ] - }, - "Web/Guide/HTML/HTML5": { - "modified": "2020-09-12T13:23:57.191Z", - "contributors": [ - "stilio", - "oleksdiam", - "andrewnovsky", - "yakubiv", - "assanovstan" - ] - }, - "Web/HTML": { - "modified": "2020-11-03T15:06:00.529Z", - "contributors": [ - "Misha7776", - "borysl", - "SphinxKnight", - "ArturWer", - "websunsey", - "asmforce", - "mdymytrova", - "Syarol", - "yuraantonov", - "v.h.f.u" - ] - }, - "Web/HTML/Attributes": { - "modified": "2019-03-23T22:13:12.700Z", - "contributors": [ - "ASeegull" - ] - }, - "Web/HTML/Block-level_elements": { - "modified": "2019-03-23T22:08:39.521Z", - "contributors": [ - "TSpell90", - "svasyanovych", - "mdymytrova" - ] - }, - "Web/HTML/Element/input": { - "modified": "2020-10-15T22:07:49.908Z", - "contributors": [ - "Sheppy" - ] - }, - "Web/HTML/Element/input/date": { - "modified": "2020-10-15T22:20:22.392Z", - "contributors": [ - "cloudgnome" - ] - }, - "Web/HTML/Element/input/datetime-local": { - "modified": "2020-10-15T22:07:47.957Z", - "contributors": [ - "serge3ling" - ] - }, - "Web/HTML/Inline_elements": { - "modified": "2020-06-17T07:00:18.779Z", - "contributors": [ - "skravche", - "mdymytrova" - ] - }, - "Web/HTTP": { - "modified": "2019-10-07T17:34:30.130Z", - "contributors": [ - "vitaliyviznyuk", - "chrisdavidmills" - ] - }, - "Web/HTTP/Basics_of_HTTP": { - "modified": "2019-03-18T21:18:28.142Z", - "contributors": [ - "ExE-Boss" - ] - }, - "Web/HTTP/Basics_of_HTTP/MIME_types": { - "modified": "2019-03-18T21:18:31.030Z", - "contributors": [ - "pupenasan" - ] - }, - "Web/HTTP/CORS": { - "modified": "2020-11-18T11:19:20.368Z", - "contributors": [ - "Standman", - "aleks-maz2", - "tpostolyuk", - "asmforce", - "ihor", - "NightLancerX", - "cloudgnome" - ] - }, - "Web/HTTP/Methods": { - "modified": "2020-10-15T21:56:25.415Z", - "contributors": [ - "pupenasan", - "tbunyk", - "vmudrij", - "fscholz" - ] - }, - "Web/HTTP/Methods/GET": { - "modified": "2020-10-15T22:13:22.650Z", - "contributors": [ - "pupenasan" - ] - }, - "Web/HTTP/Methods/POST": { - "modified": "2020-10-15T22:13:34.113Z", - "contributors": [ - "pupenasan" - ] - }, - "Web/HTTP/Methods/PUT": { - "modified": "2020-10-15T21:56:25.081Z", - "contributors": [ - "maxpolski" - ] - }, - "Web/HTTP/Session": { - "modified": "2020-02-23T16:48:23.584Z", - "contributors": [ - "Soleksandr", - "CODER591" - ] - }, - "Web/HTTP/Status": { - "modified": "2019-03-23T22:02:50.749Z", - "contributors": [ - "mgold" - ] - }, - "Web/HTTP/Status/100": { - "modified": "2020-10-15T21:58:47.443Z", - "contributors": [ - "bogdanBrizh" - ] - }, - "Web/HTTP/Status/101": { - "modified": "2019-03-23T22:02:50.381Z", - "contributors": [ - "bogdanBrizh" - ] - }, - "Web/HTTP/Status/200": { - "modified": "2020-10-15T21:59:01.236Z", - "contributors": [ - "bogdanBrizh" - ] - }, - "Web/HTTP/Status/201": { - "modified": "2020-10-15T21:59:00.706Z", - "contributors": [ - "bogdanBrizh" - ] - }, - "Web/HTTP/Status/203": { - "modified": "2020-08-04T15:18:22.666Z", - "contributors": [ - "HA3IK" - ] - }, - "Web/HTTP/Status/204": { - "modified": "2020-10-15T21:59:02.176Z", - "contributors": [ - "bogdanBrizh" - ] - }, - "Web/HTTP/Status/206": { - "modified": "2020-10-15T21:58:53.096Z", - "contributors": [ - "bogdanBrizh" - ] - }, - "Web/HTTP/Status/418": { - "modified": "2020-10-15T22:05:27.847Z", - "contributors": [ - "if-alice", - "dzamlo", - "AdriandeCita" - ] - }, - "Web/HTTP/Status/422": { - "modified": "2019-03-18T21:31:19.628Z", - "contributors": [ - "AdriandeCita" - ] - }, - "Web/HTTP/Заголовки/Accept": { - "modified": "2019-03-18T21:11:57.961Z", - "contributors": [ - "liwc0329" - ] - }, - "Web/JavaScript": { - "modified": "2020-06-03T04:55:28.354Z", - "contributors": [ - "ort", - "SphinxKnight", - "Yarko", - "ViktorGopanchuk", - "AdriandeCita", - "juliyvchirkov", - "asmforce", - "kdex", - "ivovchak", - "PavloEleva", - "yuraantonov", - "Sviat", - "braggae", - "Moweinik", - "Chadwick", - "bagrinovsky", - "illia-v", - "CosmicBoris" - ] - }, - "Web/JavaScript/A_re-introduction_to_JavaScript": { - "modified": "2020-11-11T16:05:50.263Z", - "contributors": [ - "mariia.soloviova", - "maksym.danylchak", - "ukhan", - "rapackivi", - "Andriy477", - "DariaManko", - "igordu4enko", - "yuraantonov" - ] - }, - "Web/JavaScript/About_JavaScript": { - "modified": "2020-04-29T16:50:28.524Z", - "contributors": [ - "smartitgang" - ] - }, - "Web/JavaScript/Closures": { - "modified": "2020-09-02T15:55:18.130Z", - "contributors": [ - "warsambin", - "AndriiLevchenko", - "HelgeUa", - "AlexKutkanych", - "jen9", - "litashg", - "koshandor", - "piton13" - ] - }, - "Web/JavaScript/Data_structures": { - "modified": "2020-03-12T19:46:40.226Z", - "contributors": [ - "NewRoman", - "asmforce", - "ASeegull" - ] - }, - "Web/JavaScript/Enumerability_and_ownership_of_properties": { - "modified": "2020-06-25T13:14:10.679Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/EventLoop": { - "modified": "2020-04-16T07:06:13.099Z", - "contributors": [ - "yarsky-tgz", - "DariaManko", - "StepanNaryshkov", - "Kelebor", - "YevheniiGurinets", - "piton13" - ] - }, - "Web/JavaScript/Guide": { - "modified": "2020-04-15T09:42:21.965Z", - "contributors": [ - "pupenasan", - "AdriandeCita", - "PavloEleva", - "OlexandrIlchenko", - "asmforce", - "p-boiko", - "imrock", - "x2357" - ] - }, - "Web/JavaScript/Guide/Control_flow_and_error_handling": { - "modified": "2020-09-07T22:14:00.956Z", - "contributors": [ - "pryshlyak", - "AdriandeCita", - "pupenasan", - "calisto", - "DariaManko" - ] - }, - "Web/JavaScript/Guide/Functions": { - "modified": "2020-03-12T19:47:17.480Z", - "contributors": [ - "DariaManko", - "vofkalviv", - "asmforce", - "AlexViki" - ] - }, - "Web/JavaScript/Guide/Grammar_and_types": { - "modified": "2020-09-05T21:14:16.620Z", - "contributors": [ - "pryshlyak", - "DariaManko", - "vera-design", - "yarsky-tgz", - "pupenasan", - "PavloEleva", - "olegsava", - "s5t8e9r1n", - "oleksii-lyzun", - "OlexandrIlchenko", - "ivaskonyan", - "OlkaA", - "yuraantonov", - "Andriy-K" - ] - }, - "Web/JavaScript/Guide/Indexed_collections": { - "modified": "2020-04-14T07:35:35.424Z", - "contributors": [ - "pupenasan" - ] - }, - "Web/JavaScript/Guide/Introduction": { - "modified": "2020-03-12T19:43:11.836Z", - "contributors": [ - "PavloEleva", - "asmforce", - "OlexandrIlchenko", - "OlkaA", - "yuraantonov" - ] - }, - "Web/JavaScript/Guide/Iterators_and_Generators": { - "modified": "2020-03-12T19:49:49.889Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Guide/Loops_and_iteration": { - "modified": "2020-11-07T08:30:16.850Z", - "contributors": [ - "AlexShcherbak", - "pryshlyak", - "HA3IK", - "khomyakdi" - ] - }, - "Web/JavaScript/Guide/Numbers_and_dates": { - "modified": "2020-10-02T11:06:25.527Z", - "contributors": [ - "DariaManko", - "sergey-donchenko" - ] - }, - "Web/JavaScript/Guide/Regular_Expressions": { - "modified": "2020-09-02T03:49:53.019Z", - "contributors": [ - "kyselberg", - "cloudgnome", - "OlkaA", - "oldhermit", - "matrixb0ss", - "andygol" - ] - }, - "Web/JavaScript/Guide/Using_promises": { - "modified": "2020-06-26T11:23:29.489Z", - "contributors": [ - "DariaManko", - "AVorona" - ] - }, - "Web/JavaScript/Guide/Working_with_Objects": { - "modified": "2020-06-23T13:21:35.238Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Inheritance_and_the_prototype_chain": { - "modified": "2020-03-12T19:46:05.953Z", - "contributors": [ - "baronkoko", - "ihor91", - "IgorRusso", - "gumanista", - "Syarol", - "AndriySand", - "vlisivka" - ] - }, - "Web/JavaScript/Memory_Management": { - "modified": "2020-03-12T19:49:23.133Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference": { - "modified": "2020-03-12T19:43:18.294Z", - "contributors": [ - "Zim", - "PavloEleva", - "fscholz" - ] - }, - "Web/JavaScript/Reference/Classes": { - "modified": "2020-10-15T21:46:20.161Z", - "contributors": [ - "DariaManko", - "codermeister", - "semivori", - "Drastic", - "onestep_ua", - "cloudgnome", - "Artem2011", - "vorooll", - "tjs", - "bsurai", - "georgelviv", - "rv170" - ] - }, - "Web/JavaScript/Reference/Classes/constructor": { - "modified": "2020-10-15T21:48:44.453Z", - "contributors": [ - "asmforce", - "xduocore" - ] - }, - "Web/JavaScript/Reference/Classes/extends": { - "modified": "2020-10-15T22:23:38.731Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Classes/static": { - "modified": "2020-10-15T22:06:38.111Z", - "contributors": [ - "DariaManko", - "AdriandeCita" - ] - }, - "Web/JavaScript/Reference/Deprecated_and_obsolete_features": { - "modified": "2020-03-12T19:49:45.108Z", - "contributors": [ - "sanjula40" - ] - }, - "Web/JavaScript/Reference/Deprecated_and_obsolete_features/The_legacy_Iterator_protocol": { - "modified": "2020-03-12T19:49:51.031Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Errors": { - "modified": "2020-03-12T19:46:41.956Z", - "contributors": [ - "Sheppy" - ] - }, - "Web/JavaScript/Reference/Errors/Cant_delete": { - "modified": "2020-03-12T19:49:33.402Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Errors/Deprecated_toLocaleFormat": { - "modified": "2020-09-17T11:40:19.684Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Errors/Invalid_for-in_initializer": { - "modified": "2020-06-05T10:46:57.459Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Errors/JSON_bad_parse": { - "modified": "2020-03-12T19:46:40.002Z", - "contributors": [ - "asmforce" - ] - }, - "Web/JavaScript/Reference/Errors/More_arguments_needed": { - "modified": "2020-03-12T19:46:49.569Z", - "contributors": [ - "cloudgnome" - ] - }, - "Web/JavaScript/Reference/Errors/Negative_repetition_count": { - "modified": "2020-04-07T06:26:25.252Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Errors/Not_a_constructor": { - "modified": "2020-03-12T19:46:49.449Z", - "contributors": [ - "cloudgnome" - ] - }, - "Web/JavaScript/Reference/Errors/Not_a_function": { - "modified": "2020-03-12T19:46:47.015Z", - "contributors": [ - "DariaManko", - "ivaskonyan" - ] - }, - "Web/JavaScript/Reference/Errors/Resulting_string_too_large": { - "modified": "2020-04-07T06:32:35.169Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Functions": { - "modified": "2020-03-12T19:43:16.654Z", - "contributors": [ - "heyiamvika", - "piton13", - "yuraantonov" - ] - }, - "Web/JavaScript/Reference/Functions/Method_definitions": { - "modified": "2020-10-15T22:22:59.471Z", - "contributors": [ - "bohdan009", - "cypper" - ] - }, - "Web/JavaScript/Reference/Functions/arguments": { - "modified": "2020-03-12T19:45:21.408Z", - "contributors": [ - "asmforce", - "piton13" - ] - }, - "Web/JavaScript/Reference/Functions/arguments/@@iterator": { - "modified": "2020-10-15T22:22:13.058Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Functions/arguments/length": { - "modified": "2020-10-15T22:21:42.153Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Functions/get": { - "modified": "2020-10-15T22:30:50.335Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Functions/set": { - "modified": "2020-10-15T21:55:44.676Z", - "contributors": [ - "DariaManko", - "codermeister", - "trofima" - ] - }, - "Web/JavaScript/Reference/Global_Objects": { - "modified": "2020-03-12T19:43:13.900Z", - "contributors": [ - "DariaManko", - "asmforce", - "piton13", - "fscholz" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Array": { - "modified": "2020-10-15T21:44:07.663Z", - "contributors": [ - "DariaManko", - "cloudgnome", - "SergTanchenko", - "oleksii-lyzun", - "vitaliy-patsay", - "justlp", - "Mycolaos", - "VFedyk", - "sassha96", - "fscholz" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Array/@@iterator": { - "modified": "2020-10-15T22:21:28.799Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Array/@@species": { - "modified": "2020-11-06T12:10:55.577Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Array/@@unscopables": { - "modified": "2020-11-06T13:24:33.198Z", - "contributors": [ - "DariaManko", - "valentinotm" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Array/Array": { - "modified": "2020-10-15T22:24:25.182Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Array/Reduce": { - "modified": "2020-10-15T22:11:52.266Z", - "contributors": [ - "kyselberg", - "dzyubin", - "roman-lemko", - "mdresvyankin" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Array/ReduceRight": { - "modified": "2020-10-15T22:21:06.293Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Array/concat": { - "modified": "2020-10-15T21:49:32.206Z", - "contributors": [ - "DariaManko", - "OlexandrIlchenko", - "piton13", - "Sviat" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Array/copyWithin": { - "modified": "2020-10-15T22:20:41.269Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Array/entries": { - "modified": "2020-10-15T22:20:45.075Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Array/every": { - "modified": "2020-10-15T21:55:26.738Z", - "contributors": [ - "DariaManko", - "asmforce", - "znata" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Array/fill": { - "modified": "2020-10-15T22:20:43.957Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Array/filter": { - "modified": "2020-10-15T21:51:40.421Z", - "contributors": [ - "DariaManko", - "asmforce", - "osevastianovych", - "piton13" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Array/find": { - "modified": "2020-10-15T21:51:43.532Z", - "contributors": [ - "Alikont", - "DariaManko", - "asmforce", - "Careless_angel", - "RuslanaGRA", - "braggae" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Array/findIndex": { - "modified": "2020-10-15T22:20:44.686Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Array/flat": { - "modified": "2020-10-15T22:07:16.823Z", - "contributors": [ - "DariaManko", - "vitaliy-patsay" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Array/flatMap": { - "modified": "2020-10-15T22:20:49.502Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Array/forEach": { - "modified": "2020-10-15T21:57:15.409Z", - "contributors": [ - "Booreviy", - "DariaManko", - "asmforce", - "f0rza", - "topvova" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Array/from": { - "modified": "2020-10-15T22:18:04.600Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Array/includes": { - "modified": "2020-10-15T21:47:41.782Z", - "contributors": [ - "DariaManko", - "asmforce", - "Kamilius" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Array/indexOf": { - "modified": "2020-10-15T22:00:18.552Z", - "contributors": [ - "DariaManko", - "Halochkin", - "AlexKutkanych" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Array/isArray": { - "modified": "2020-10-15T21:51:45.816Z", - "contributors": [ - "DariaManko", - "asmforce", - "piton13" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Array/join": { - "modified": "2020-10-15T22:04:40.402Z", - "contributors": [ - "DariaManko", - "Ketler13" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Array/keys": { - "modified": "2020-10-15T21:59:29.757Z", - "contributors": [ - "DariaManko", - "asmforce", - "lpovhan" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Array/lastIndexOf": { - "modified": "2020-10-15T22:21:04.677Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Array/length": { - "modified": "2020-10-15T21:48:44.451Z", - "contributors": [ - "DariaManko", - "vitaliy-patsay", - "piton13", - "VFedyk" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Array/map": { - "modified": "2020-10-15T21:44:04.937Z", - "contributors": [ - "DariaManko", - "jenja-pa", - "no-riders", - "artemyavorskyi", - "AlinaDigtyar", - "piton13", - "probil", - "trofima", - "Kiwka" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Array/of": { - "modified": "2020-10-15T22:18:07.148Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Array/pop": { - "modified": "2020-10-15T21:46:49.395Z", - "contributors": [ - "DariaManko", - "vitaliy-patsay", - "nesteant", - "makk" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Array/push": { - "modified": "2020-10-15T22:20:55.331Z", - "contributors": [ - "Dariaki" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Array/reverse": { - "modified": "2020-10-15T21:59:56.203Z", - "contributors": [ - "DariaManko", - "asmforce", - "AlexKutkanych" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Array/shift": { - "modified": "2019-07-19T09:10:36.597Z", - "contributors": [ - "CODER591", - "corecode1", - "NataliiaBidak", - "jwhitlock" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Array/slice": { - "modified": "2020-10-15T22:21:10.798Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Array/some": { - "modified": "2020-10-15T22:21:02.917Z", - "contributors": [ - "Makrosss", - "asmforce" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Array/sort": { - "modified": "2020-10-15T22:20:53.972Z", - "contributors": [ - "zarichniuk", - "AndriySikora", - "Dariaki" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Array/splice": { - "modified": "2020-10-15T21:46:48.950Z", - "contributors": [ - "DariaManko", - "MegOBonus", - "vtytar" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Array/toLocaleString": { - "modified": "2020-10-15T22:21:26.674Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Array/toSource": { - "modified": "2020-10-15T21:52:38.278Z", - "contributors": [ - "DariaManko", - "teoli", - "ilya_zinkevych" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Array/toString": { - "modified": "2020-10-15T22:21:27.437Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Array/unshift": { - "modified": "2020-10-15T21:46:28.308Z", - "contributors": [ - "DariaManko", - "Kamilius", - "ValkoVolodya" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Array/values": { - "modified": "2020-10-15T22:21:28.809Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/AsyncFunction": { - "modified": "2020-10-15T22:26:04.988Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/BigInt": { - "modified": "2020-10-15T22:32:52.326Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/BigInt/BigInt": { - "modified": "2020-10-15T22:32:56.837Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/BigInt/asIntN": { - "modified": "2020-10-15T22:32:50.861Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/BigInt/asUintN": { - "modified": "2020-10-15T22:32:48.866Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/BigInt/toLocaleString": { - "modified": "2020-10-15T22:32:53.412Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/BigInt/toString": { - "modified": "2020-10-15T22:33:00.537Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/BigInt/valueOf": { - "modified": "2020-10-15T22:33:00.448Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Boolean": { - "modified": "2020-10-15T22:00:35.597Z", - "contributors": [ - "DariaManko", - "AdriandeCita", - "voleger" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Boolean/Boolean": { - "modified": "2020-10-15T22:31:11.369Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Boolean/toSource": { - "modified": "2020-10-15T22:06:15.795Z", - "contributors": [ - "AdriandeCita" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Boolean/toString": { - "modified": "2020-10-15T22:06:14.339Z", - "contributors": [ - "asmforce", - "AdriandeCita" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Boolean/valueOf": { - "modified": "2020-10-15T22:06:15.623Z", - "contributors": [ - "asmforce", - "AdriandeCita" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Date": { - "modified": "2020-10-15T21:54:17.005Z", - "contributors": [ - "DariaManko", - "asmforce", - "bsurai" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Date/@@toPrimitive": { - "modified": "2020-10-15T22:34:16.846Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Date/Date": { - "modified": "2020-10-15T22:33:09.659Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Date/UTC": { - "modified": "2020-10-15T21:55:32.389Z", - "contributors": [ - "vtlk", - "asmforce" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Date/getDate": { - "modified": "2020-10-15T22:33:32.244Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Date/getDay": { - "modified": "2020-10-15T22:33:30.885Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Date/getFullYear": { - "modified": "2020-10-15T22:33:32.970Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Date/getHours": { - "modified": "2020-10-15T22:33:33.939Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Date/getMilliseconds": { - "modified": "2020-10-15T22:33:34.391Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Date/getMinutes": { - "modified": "2020-10-15T22:33:30.118Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Date/getMonth": { - "modified": "2020-10-15T22:33:32.493Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Date/getSeconds": { - "modified": "2020-10-15T22:33:32.834Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Date/getTime": { - "modified": "2020-10-15T22:33:06.066Z", - "contributors": [ - "DariaManko", - "wmir1" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Date/getTimezoneOffset": { - "modified": "2020-10-15T22:33:36.543Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Date/getUTCDate": { - "modified": "2020-10-15T22:33:36.430Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Date/getUTCDay": { - "modified": "2020-10-15T22:33:46.597Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Date/getUTCFullYear": { - "modified": "2020-10-15T22:33:46.740Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Date/getUTCHours": { - "modified": "2020-10-15T22:33:46.458Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Date/getUTCMilliseconds": { - "modified": "2020-10-15T21:58:14.206Z", - "contributors": [ - "DariaManko", - "asmforce", - "vlisivka" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Date/getUTCMinutes": { - "modified": "2020-10-15T22:33:46.632Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Date/getUTCMonth": { - "modified": "2020-10-15T22:33:51.002Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Date/getUTCSeconds": { - "modified": "2020-10-15T21:58:15.459Z", - "contributors": [ - "DariaManko", - "asmforce", - "vlisivka" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Date/getYear": { - "modified": "2020-10-15T22:33:51.203Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Date/now": { - "modified": "2020-10-15T21:59:10.202Z", - "contributors": [ - "DariaManko", - "asmforce" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Date/parse": { - "modified": "2020-10-15T22:33:26.613Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Date/setDate": { - "modified": "2020-10-15T22:33:51.277Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Date/setFullYear": { - "modified": "2020-10-15T22:33:52.358Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Date/setHours": { - "modified": "2020-10-15T22:33:55.337Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Date/setMilliseconds": { - "modified": "2020-10-15T22:33:55.964Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Date/setMinutes": { - "modified": "2020-10-15T22:33:53.485Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Date/setMonth": { - "modified": "2020-10-15T22:33:55.824Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Date/setSeconds": { - "modified": "2020-10-15T22:33:54.159Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Date/setTime": { - "modified": "2020-10-15T22:02:19.023Z", - "contributors": [ - "DariaManko", - "venoel" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Date/setUTCDate": { - "modified": "2020-10-15T22:33:57.022Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Date/setUTCFullYear": { - "modified": "2020-10-15T22:33:54.452Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Date/setUTCHours": { - "modified": "2020-10-15T22:33:55.683Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Date/setUTCMilliseconds": { - "modified": "2020-10-15T22:33:54.746Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Date/setUTCMinutes": { - "modified": "2020-10-15T22:34:08.861Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Date/setUTCMonth": { - "modified": "2020-10-15T22:34:08.751Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Date/setUTCSeconds": { - "modified": "2020-10-15T22:34:08.803Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Date/setYear": { - "modified": "2020-10-15T22:34:08.715Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Date/toDateString": { - "modified": "2020-10-15T22:34:09.938Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Date/toGMTString": { - "modified": "2020-10-15T22:34:11.176Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Date/toISOString": { - "modified": "2020-10-15T22:34:12.473Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Date/toJSON": { - "modified": "2020-10-15T21:59:03.905Z", - "contributors": [ - "DariaManko", - "asmforce" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Date/toLocaleDateString": { - "modified": "2020-10-15T22:34:16.411Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Date/toLocaleString": { - "modified": "2020-10-15T22:34:15.625Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Date/toLocaleTimeString": { - "modified": "2020-10-15T22:34:18.542Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Date/toSource": { - "modified": "2020-10-15T22:34:17.093Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Date/toString": { - "modified": "2020-10-15T22:34:16.430Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Date/toTimeString": { - "modified": "2020-10-15T22:34:17.339Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Date/toUTCString": { - "modified": "2020-10-15T22:34:18.309Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Date/valueOf": { - "modified": "2020-10-15T22:34:17.554Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Error": { - "modified": "2020-10-15T22:18:17.492Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Error/Error": { - "modified": "2020-10-15T22:26:54.007Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Error/Stack": { - "modified": "2020-10-15T22:18:38.036Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Error/columnNumber": { - "modified": "2020-10-15T22:18:26.665Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Error/fileName": { - "modified": "2020-10-15T22:18:27.302Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Error/lineNumber": { - "modified": "2020-10-15T22:18:34.627Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Error/message": { - "modified": "2020-10-15T22:18:28.003Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Error/name": { - "modified": "2020-10-15T22:18:30.331Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Error/toSource": { - "modified": "2020-10-15T22:18:40.791Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Error/toString": { - "modified": "2020-10-15T22:18:40.852Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/EvalError": { - "modified": "2020-10-15T22:18:17.805Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Function": { - "modified": "2020-10-15T21:45:49.819Z", - "contributors": [ - "DariaManko", - "yulyasystem", - "IgorRusso", - "fscholz" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Function/apply": { - "modified": "2020-10-15T21:51:58.384Z", - "contributors": [ - "DariaManko", - "Wsewlad", - "piton13" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Function/arguments": { - "modified": "2020-10-15T22:21:36.643Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Function/bind": { - "modified": "2020-10-15T21:51:58.237Z", - "contributors": [ - "DariaManko", - "piton13" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Function/call": { - "modified": "2020-10-15T21:51:57.522Z", - "contributors": [ - "Halochkin", - "asmforce", - "piton13" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Function/caller": { - "modified": "2020-10-15T22:21:36.014Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Function/displayName": { - "modified": "2020-10-15T22:21:37.728Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Function/length": { - "modified": "2020-10-15T22:21:35.840Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Function/name": { - "modified": "2020-10-15T21:45:43.885Z", - "contributors": [ - "DariaManko", - "MyrosiaPabyrivska", - "Kelebor" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Function/toSource": { - "modified": "2020-10-15T22:21:38.211Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Function/toString": { - "modified": "2020-10-15T22:21:40.341Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Generator": { - "modified": "2020-10-15T22:25:29.601Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Generator/next": { - "modified": "2020-10-15T22:25:35.087Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Generator/return": { - "modified": "2020-10-15T22:25:34.711Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Generator/throw": { - "modified": "2020-10-15T22:25:32.571Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/GeneratorFunction": { - "modified": "2020-10-15T22:25:29.479Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Infinity": { - "modified": "2020-10-15T22:21:06.954Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/InternalError": { - "modified": "2020-10-15T22:18:24.342Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/JSON": { - "modified": "2020-10-15T21:49:10.555Z", - "contributors": [ - "AdriandeCita", - "Ende93" - ] - }, - "Web/JavaScript/Reference/Global_Objects/JSON/parse": { - "modified": "2020-10-15T21:58:38.006Z", - "contributors": [ - "asmforce", - "AdriandeCita" - ] - }, - "Web/JavaScript/Reference/Global_Objects/JSON/stringify": { - "modified": "2020-10-15T21:49:11.837Z", - "contributors": [ - "AdriandeCita", - "asmforce", - "olehsrh", - "linevich", - "tbunyk" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Map": { - "modified": "2020-10-15T22:00:35.312Z", - "contributors": [ - "DariaManko", - "AlinaKuzmenko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Math": { - "modified": "2020-10-15T21:47:19.666Z", - "contributors": [ - "AdriandeCita", - "fscholz" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Math/E": { - "modified": "2020-10-15T22:04:53.161Z", - "contributors": [ - "AdriandeCita" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Math/LN10": { - "modified": "2020-10-15T22:04:52.017Z", - "contributors": [ - "AdriandeCita" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Math/LN2": { - "modified": "2020-10-15T22:04:59.522Z", - "contributors": [ - "AdriandeCita" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Math/LOG10E": { - "modified": "2020-10-15T22:05:01.502Z", - "contributors": [ - "AdriandeCita" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Math/LOG2E": { - "modified": "2020-10-15T22:05:03.872Z", - "contributors": [ - "AdriandeCita" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Math/PI": { - "modified": "2020-10-15T22:05:01.546Z", - "contributors": [ - "AdriandeCita" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Math/SQRT1_2": { - "modified": "2020-10-15T22:05:03.531Z", - "contributors": [ - "AdriandeCita" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Math/SQRT2": { - "modified": "2020-10-15T22:05:03.380Z", - "contributors": [ - "AdriandeCita" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Math/abs": { - "modified": "2020-10-15T21:57:51.340Z", - "contributors": [ - "AdriandeCita", - "artemyavorskyi" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Math/acos": { - "modified": "2020-10-15T21:47:15.506Z", - "contributors": [ - "AdriandeCita", - "artemyavorskyi", - "6pm" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Math/acosh": { - "modified": "2020-10-15T22:05:05.445Z", - "contributors": [ - "AdriandeCita" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Math/asin": { - "modified": "2020-10-15T22:05:17.868Z", - "contributors": [ - "AdriandeCita" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Math/asinh": { - "modified": "2020-10-15T22:05:17.657Z", - "contributors": [ - "AdriandeCita" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Math/atan": { - "modified": "2020-10-15T22:05:20.800Z", - "contributors": [ - "AdriandeCita" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Math/atan2": { - "modified": "2020-10-15T22:05:23.030Z", - "contributors": [ - "AdriandeCita" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Math/atanh": { - "modified": "2020-10-15T22:05:23.444Z", - "contributors": [ - "AdriandeCita" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Math/cbrt": { - "modified": "2020-10-15T22:05:21.844Z", - "contributors": [ - "AdriandeCita" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Math/ceil": { - "modified": "2020-10-15T21:57:51.171Z", - "contributors": [ - "AdriandeCita", - "Marx64", - "artemyavorskyi" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Math/clz32": { - "modified": "2020-10-15T22:05:23.478Z", - "contributors": [ - "AdriandeCita" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Math/cos": { - "modified": "2020-10-15T22:05:36.192Z", - "contributors": [ - "AdriandeCita" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Math/cosh": { - "modified": "2020-10-15T22:05:25.493Z", - "contributors": [ - "AdriandeCita" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Math/exp": { - "modified": "2020-10-15T22:05:26.831Z", - "contributors": [ - "AdriandeCita" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Math/expm1": { - "modified": "2020-10-15T22:05:26.324Z", - "contributors": [ - "AdriandeCita" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Math/floor": { - "modified": "2020-10-15T21:57:51.357Z", - "contributors": [ - "AdriandeCita", - "Ingvarr", - "artemyavorskyi" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Math/fround": { - "modified": "2020-10-15T22:05:36.249Z", - "contributors": [ - "AdriandeCita" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Math/hypot": { - "modified": "2020-10-15T22:05:57.378Z", - "contributors": [ - "AdriandeCita" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Math/imul": { - "modified": "2020-10-15T22:05:57.398Z", - "contributors": [ - "AdriandeCita" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Math/log": { - "modified": "2020-10-15T22:05:57.298Z", - "contributors": [ - "AdriandeCita" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Math/log10": { - "modified": "2020-10-15T22:05:57.187Z", - "contributors": [ - "AdriandeCita" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Math/log1p": { - "modified": "2020-10-15T22:05:58.645Z", - "contributors": [ - "AdriandeCita" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Math/log2": { - "modified": "2020-10-15T22:05:58.319Z", - "contributors": [ - "AdriandeCita" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Math/max": { - "modified": "2020-10-15T22:06:01.536Z", - "contributors": [ - "AdriandeCita" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Math/min": { - "modified": "2020-10-15T22:06:03.284Z", - "contributors": [ - "AdriandeCita" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Math/pow": { - "modified": "2020-10-15T21:51:33.173Z", - "contributors": [ - "AdriandeCita", - "mirkinoid" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Math/random": { - "modified": "2020-10-15T22:06:02.891Z", - "contributors": [ - "AdriandeCita" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Math/sign": { - "modified": "2020-10-15T22:06:04.785Z", - "contributors": [ - "AdriandeCita" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Math/sin": { - "modified": "2020-10-15T22:06:04.350Z", - "contributors": [ - "AdriandeCita" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Math/sinh": { - "modified": "2020-10-15T22:06:08.969Z", - "contributors": [ - "AdriandeCita" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Math/sqrt": { - "modified": "2020-10-15T22:06:06.700Z", - "contributors": [ - "AdriandeCita" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Math/tan": { - "modified": "2020-10-15T22:06:08.496Z", - "contributors": [ - "AdriandeCita" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Math/tanh": { - "modified": "2020-10-15T22:06:11.441Z", - "contributors": [ - "AdriandeCita" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Math/trunc": { - "modified": "2020-10-15T22:06:13.191Z", - "contributors": [ - "AdriandeCita" - ] - }, - "Web/JavaScript/Reference/Global_Objects/NaN": { - "modified": "2020-10-15T22:06:16.467Z", - "contributors": [ - "DariaManko", - "AdriandeCita" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Object": { - "modified": "2020-10-15T21:49:58.857Z", - "contributors": [ - "DariaManko", - "Sestri4kina", - "Natalya_Surikova" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Object/Object": { - "modified": "2020-10-15T22:31:07.059Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Object/__defineGetter__": { - "modified": "2020-10-15T22:23:37.198Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Object/__defineSetter__": { - "modified": "2020-10-15T22:23:51.595Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Object/__lookupGetter__": { - "modified": "2020-10-15T22:23:53.366Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Object/__lookupSetter__": { - "modified": "2020-10-15T22:23:52.620Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Object/assign": { - "modified": "2020-11-06T12:08:17.626Z", - "contributors": [ - "DariaManko", - "D4ST1N", - "asmforce", - "GeekEdem", - "romkor" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Object/constructor": { - "modified": "2020-10-15T21:50:15.789Z", - "contributors": [ - "DariaManko", - "pushnov-i" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Object/create": { - "modified": "2020-10-15T22:21:52.499Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Object/defineProperties": { - "modified": "2020-10-15T22:22:04.382Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Object/defineProperty": { - "modified": "2020-10-15T21:51:10.162Z", - "contributors": [ - "DariaManko", - "hrds", - "MontyFelix", - "bodya17", - "romkor" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Object/entries": { - "modified": "2020-10-15T22:23:06.638Z", - "contributors": [ - "DariaManko", - "cypper" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Object/freeze": { - "modified": "2020-10-15T22:23:14.398Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Object/fromEntries": { - "modified": "2020-10-15T22:23:15.128Z", - "contributors": [ - "DariaManko", - "cypper" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Object/getOwnPropertyDescriptor": { - "modified": "2020-10-15T22:23:28.909Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Object/getOwnPropertyDescriptors": { - "modified": "2020-10-15T22:23:28.921Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Object/getOwnPropertyNames": { - "modified": "2020-10-15T22:23:41.081Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Object/getOwnPropertySymbols": { - "modified": "2020-12-14T07:36:53.380Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Object/getPrototypeOf": { - "modified": "2020-10-15T22:23:37.098Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Object/hasOwnProperty": { - "modified": "2020-10-15T22:22:51.411Z", - "contributors": [ - "DariaManko", - "raikune" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Object/is": { - "modified": "2020-10-15T21:49:57.117Z", - "contributors": [ - "DariaManko", - "asmforce", - "Sestri4kina" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Object/isExtensible": { - "modified": "2020-10-15T22:11:37.219Z", - "contributors": [ - "DariaManko", - "OksanaH" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Object/isFrozen": { - "modified": "2020-10-15T22:23:09.097Z", - "contributors": [ - "DariaManko", - "cypper" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Object/isPrototypeOf": { - "modified": "2020-10-15T22:23:54.536Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Object/isSealed": { - "modified": "2020-10-15T22:23:38.776Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Object/keys": { - "modified": "2020-10-15T21:54:19.509Z", - "contributors": [ - "DariaManko", - "asmforce", - "sblano4ka", - "bsurai" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Object/preventExtensions": { - "modified": "2020-10-15T22:11:39.127Z", - "contributors": [ - "DariaManko", - "OksanaH" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Object/propertyIsEnumerable": { - "modified": "2020-10-15T22:24:06.184Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Object/proto": { - "modified": "2020-11-06T10:35:54.418Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Object/seal": { - "modified": "2020-10-15T22:23:07.912Z", - "contributors": [ - "DariaManko", - "cypper" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Object/setPrototypeOf": { - "modified": "2020-10-15T22:24:05.481Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Object/toLocaleString": { - "modified": "2020-10-15T22:23:54.914Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Object/toSource": { - "modified": "2020-10-15T22:23:07.718Z", - "contributors": [ - "DariaManko", - "cypper" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Object/toString": { - "modified": "2020-10-15T22:23:06.682Z", - "contributors": [ - "DariaManko", - "cypper" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Object/valueOf": { - "modified": "2020-10-15T22:22:51.902Z", - "contributors": [ - "DariaManko", - "cypper" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Object/values": { - "modified": "2020-10-15T21:57:15.215Z", - "contributors": [ - "DariaManko", - "webgrandmo", - "vityas-off", - "asmforce" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Promise": { - "modified": "2020-10-15T21:51:58.522Z", - "contributors": [ - "DariaManko", - "ihor", - "matrixb0ss", - "nemishkor", - "riwnodennyk", - "tickoner", - "oldhermit", - "AlinaKuzmenko", - "bsurai", - "kdex" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Promise/Promise": { - "modified": "2020-10-15T22:26:57.715Z", - "contributors": [ - "michael_v92", - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Promise/all": { - "modified": "2020-10-15T22:26:21.523Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Promise/allSettled": { - "modified": "2020-10-15T22:26:24.738Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Promise/any": { - "modified": "2020-10-15T22:26:27.043Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Promise/catch": { - "modified": "2020-10-15T22:26:27.465Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Promise/finally": { - "modified": "2020-10-15T22:26:32.438Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Promise/race": { - "modified": "2020-10-15T22:03:35.608Z", - "contributors": [ - "DariaManko", - "77bo" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Promise/resolve": { - "modified": "2020-10-15T21:52:00.237Z", - "contributors": [ - "DariaManko", - "piton13" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Promise/then": { - "modified": "2020-10-15T22:26:45.798Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Proxy": { - "modified": "2020-10-15T21:59:11.773Z", - "contributors": [ - "outOFFspace", - "yuraantonov" - ] - }, - "Web/JavaScript/Reference/Global_Objects/RangeError": { - "modified": "2020-10-15T22:18:00.589Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/ReferenceError": { - "modified": "2020-10-15T22:18:21.096Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Reflect": { - "modified": "2020-10-15T22:24:05.788Z", - "contributors": [ - "sergey-donchenko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/RegExp": { - "modified": "2020-11-28T10:34:14.430Z", - "contributors": [ - "Сaсtus", - "dzyubin", - "dude78GH", - "GeekEdem", - "arai" - ] - }, - "Web/JavaScript/Reference/Global_Objects/RegExp/exec": { - "modified": "2019-03-23T22:33:14.953Z", - "contributors": [ - "muhus", - "bodya17" - ] - }, - "Web/JavaScript/Reference/Global_Objects/RegExp/source": { - "modified": "2019-03-23T22:12:09.132Z", - "contributors": [ - "asmforce", - "Stand1k" - ] - }, - "Web/JavaScript/Reference/Global_Objects/RegExp/test": { - "modified": "2019-03-23T22:19:27.486Z", - "contributors": [ - "VKorotynskyy", - "Asfades" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Set": { - "modified": "2020-10-15T22:00:32.970Z", - "contributors": [ - "AlinaKuzmenko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/String": { - "modified": "2020-10-15T21:56:07.475Z", - "contributors": [ - "DariaManko", - "fscholz" - ] - }, - "Web/JavaScript/Reference/Global_Objects/String/@@iterator": { - "modified": "2020-10-15T22:25:28.702Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/String/String": { - "modified": "2020-10-15T22:29:44.605Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/String/Trim": { - "modified": "2020-10-15T22:29:38.186Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/String/anchor": { - "modified": "2020-10-15T22:04:54.630Z", - "contributors": [ - "DariaManko", - "RomanGorbatko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/String/big": { - "modified": "2020-10-15T22:28:11.786Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/String/blink": { - "modified": "2020-10-15T22:28:13.942Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/String/bold": { - "modified": "2020-10-15T22:28:12.393Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/String/charAt": { - "modified": "2020-10-15T22:01:04.977Z", - "contributors": [ - "asmforce" - ] - }, - "Web/JavaScript/Reference/Global_Objects/String/charCodeAt": { - "modified": "2020-10-15T22:28:16.125Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/String/codePointAt": { - "modified": "2020-10-15T22:28:18.063Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/String/concat": { - "modified": "2020-12-10T06:08:16.543Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/String/endsWith": { - "modified": "2020-10-15T22:28:23.429Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/String/fixed": { - "modified": "2020-10-15T22:28:22.062Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/String/fontcolor": { - "modified": "2020-10-15T22:28:22.218Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/String/fontsize": { - "modified": "2020-10-15T22:28:23.001Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/String/fromCharCode": { - "modified": "2020-10-15T21:56:05.220Z", - "contributors": [ - "asmforce" - ] - }, - "Web/JavaScript/Reference/Global_Objects/String/fromCodePoint": { - "modified": "2020-10-15T21:56:12.223Z", - "contributors": [ - "asmforce" - ] - }, - "Web/JavaScript/Reference/Global_Objects/String/includes": { - "modified": "2020-10-15T22:01:56.179Z", - "contributors": [ - "DariaManko", - "ihor", - "ValeriiBoiko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/String/indexOf": { - "modified": "2020-10-15T21:56:02.222Z", - "contributors": [ - "DariaManko", - "Halochkin", - "asmforce" - ] - }, - "Web/JavaScript/Reference/Global_Objects/String/italics": { - "modified": "2020-10-15T22:28:26.713Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/String/lastIndexOf": { - "modified": "2020-10-15T21:56:07.102Z", - "contributors": [ - "DariaManko", - "asmforce" - ] - }, - "Web/JavaScript/Reference/Global_Objects/String/length": { - "modified": "2020-10-15T21:56:01.809Z", - "contributors": [ - "DariaManko", - "asmforce" - ] - }, - "Web/JavaScript/Reference/Global_Objects/String/link": { - "modified": "2020-10-15T22:28:29.381Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/String/localeCompare": { - "modified": "2020-10-15T21:56:20.503Z", - "contributors": [ - "DariaManko", - "wolfter12", - "asmforce" - ] - }, - "Web/JavaScript/Reference/Global_Objects/String/match": { - "modified": "2020-10-15T22:00:25.876Z", - "contributors": [ - "DariaManko", - "asmforce", - "AlexViki" - ] - }, - "Web/JavaScript/Reference/Global_Objects/String/matchAll": { - "modified": "2020-11-05T08:04:26.515Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/String/normalize": { - "modified": "2020-10-15T22:28:40.761Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/String/padEnd": { - "modified": "2020-10-15T22:28:57.018Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/String/padStart": { - "modified": "2020-10-15T22:28:57.062Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/String/raw": { - "modified": "2020-10-15T22:29:43.457Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/String/repeat": { - "modified": "2020-10-15T22:28:59.311Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/String/replace": { - "modified": "2020-10-15T22:28:58.669Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/String/replaceAll": { - "modified": "2020-10-15T22:30:27.525Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/String/search": { - "modified": "2020-10-15T21:56:06.199Z", - "contributors": [ - "asmforce", - "GeekEdem" - ] - }, - "Web/JavaScript/Reference/Global_Objects/String/slice": { - "modified": "2020-10-15T22:29:04.397Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/String/small": { - "modified": "2020-10-15T22:29:06.041Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/String/split": { - "modified": "2020-10-15T22:29:12.669Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/String/startsWith": { - "modified": "2020-10-15T22:29:16.419Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/String/strike": { - "modified": "2020-10-15T22:29:16.714Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/String/sub": { - "modified": "2020-10-15T22:29:18.653Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/String/substr": { - "modified": "2020-10-15T22:29:17.310Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/String/substring": { - "modified": "2020-10-15T22:29:17.717Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/String/sup": { - "modified": "2020-10-15T22:29:18.346Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/String/toLocaleLowerCase": { - "modified": "2020-10-15T21:56:18.245Z", - "contributors": [ - "DariaManko", - "asmforce" - ] - }, - "Web/JavaScript/Reference/Global_Objects/String/toLocaleUpperCase": { - "modified": "2020-10-15T21:56:17.147Z", - "contributors": [ - "DariaManko", - "asmforce" - ] - }, - "Web/JavaScript/Reference/Global_Objects/String/toLowerCase": { - "modified": "2020-10-15T21:56:07.213Z", - "contributors": [ - "DariaManko", - "asmforce" - ] - }, - "Web/JavaScript/Reference/Global_Objects/String/toSource": { - "modified": "2020-10-15T22:29:39.458Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/String/toString": { - "modified": "2020-10-15T21:56:12.218Z", - "contributors": [ - "DariaManko", - "asmforce" - ] - }, - "Web/JavaScript/Reference/Global_Objects/String/toUpperCase": { - "modified": "2020-10-15T21:56:06.893Z", - "contributors": [ - "DariaManko", - "asmforce" - ] - }, - "Web/JavaScript/Reference/Global_Objects/String/trimEnd": { - "modified": "2020-10-15T22:29:38.073Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/String/trimStart": { - "modified": "2020-10-15T22:29:39.593Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/String/valueOf": { - "modified": "2020-10-15T21:56:02.146Z", - "contributors": [ - "DariaManko", - "asmforce" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Symbol": { - "modified": "2019-12-10T11:06:17.296Z", - "contributors": [ - "DariaManko", - "SphinxKnight" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Symbol/@@toPrimitive": { - "modified": "2020-12-10T06:25:13.907Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Symbol/Symbol": { - "modified": "2020-10-15T22:34:58.607Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Symbol/asyncIterator": { - "modified": "2020-11-04T12:49:38.598Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Symbol/description": { - "modified": "2020-11-05T08:18:28.051Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Symbol/for": { - "modified": "2020-12-10T05:07:08.237Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Symbol/hasInstance": { - "modified": "2020-11-05T05:31:05.308Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Symbol/isConcatSpreadable": { - "modified": "2020-11-05T06:43:29.775Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Symbol/iterator": { - "modified": "2020-11-05T06:45:25.397Z", - "contributors": [ - "DariaManko", - "trofima" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Symbol/keyFor": { - "modified": "2020-12-10T05:15:20.527Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Symbol/match": { - "modified": "2020-11-05T07:44:56.491Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Symbol/matchAll": { - "modified": "2020-11-05T08:02:26.392Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Symbol/replace": { - "modified": "2020-11-05T08:27:00.186Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Symbol/search": { - "modified": "2020-11-05T08:31:56.138Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Symbol/species": { - "modified": "2020-11-05T12:22:32.364Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Symbol/split": { - "modified": "2020-11-05T13:49:56.234Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Symbol/toPrimitive": { - "modified": "2020-11-06T06:06:07.669Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Symbol/toSource": { - "modified": "2020-12-10T05:20:28.551Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Symbol/toString": { - "modified": "2020-12-10T06:14:46.283Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Symbol/toStringTag": { - "modified": "2020-11-06T10:48:12.862Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Symbol/unscopables": { - "modified": "2020-11-06T13:19:22.773Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Symbol/valueOf": { - "modified": "2020-12-10T06:20:38.213Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/SyntaxError": { - "modified": "2020-10-15T21:58:40.674Z", - "contributors": [ - "DariaManko", - "asmforce" - ] - }, - "Web/JavaScript/Reference/Global_Objects/TypeError": { - "modified": "2020-10-15T22:18:20.714Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/URIError": { - "modified": "2020-10-15T22:18:21.321Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/eval": { - "modified": "2020-10-15T22:23:55.707Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/globalThis": { - "modified": "2020-10-15T22:25:43.168Z", - "contributors": [ - "sergey-donchenko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/isFinite": { - "modified": "2020-10-15T22:32:19.379Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/isNaN": { - "modified": "2020-10-15T22:01:27.765Z", - "contributors": [ - "MykolaCompany", - "mrbloom" - ] - }, - "Web/JavaScript/Reference/Global_Objects/null": { - "modified": "2020-10-15T21:57:19.315Z", - "contributors": [ - "asmforce" - ] - }, - "Web/JavaScript/Reference/Global_Objects/parseFloat": { - "modified": "2020-10-15T22:32:23.918Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/parseInt": { - "modified": "2020-10-15T22:25:16.463Z", - "contributors": [ - "DariaManko", - "bandvov" - ] - }, - "Web/JavaScript/Reference/Global_Objects/undefined": { - "modified": "2020-10-15T21:58:17.542Z", - "contributors": [ - "cybalex", - "DariaManko", - "asmforce" - ] - }, - "Web/JavaScript/Reference/Global_Objects/uneval": { - "modified": "2020-10-15T22:23:55.765Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Lexical_grammar": { - "modified": "2020-10-15T22:30:14.109Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Operators": { - "modified": "2020-06-12T11:53:00.624Z", - "contributors": [ - "DariaManko", - "Arous" - ] - }, - "Web/JavaScript/Reference/Operators/Addition": { - "modified": "2020-10-15T22:30:35.486Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Operators/Addition_assignment": { - "modified": "2020-10-15T22:31:12.087Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Operators/Assignment": { - "modified": "2020-10-15T22:31:11.201Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Operators/Bitwise_AND": { - "modified": "2020-10-15T22:31:11.617Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Operators/Bitwise_AND_assignment": { - "modified": "2020-10-15T22:31:12.449Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Operators/Bitwise_NOT": { - "modified": "2020-10-15T22:31:11.334Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Operators/Bitwise_OR": { - "modified": "2020-10-15T22:31:16.176Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Operators/Bitwise_OR_assignment": { - "modified": "2020-10-15T22:31:18.458Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Operators/Bitwise_XOR": { - "modified": "2020-10-15T22:31:14.931Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Operators/Bitwise_XOR_assignment": { - "modified": "2020-10-15T22:31:16.446Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Operators/Comma_Operator": { - "modified": "2020-10-15T22:25:09.905Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Operators/Conditional_Operator": { - "modified": "2020-10-15T22:21:39.670Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Operators/Decrement": { - "modified": "2020-10-15T22:30:53.701Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Operators/Division": { - "modified": "2020-10-15T22:30:45.220Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Operators/Division_assignment": { - "modified": "2020-10-15T22:31:15.460Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Operators/Equality": { - "modified": "2020-10-15T22:30:56.047Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Operators/Exponentiation": { - "modified": "2020-10-15T22:30:44.774Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Operators/Exponentiation_assignment": { - "modified": "2020-10-15T22:31:17.221Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Operators/Greater_than": { - "modified": "2020-10-15T22:31:08.469Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Operators/Greater_than_or_equal": { - "modified": "2020-10-15T22:31:08.843Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Operators/Grouping": { - "modified": "2020-10-15T22:24:50.764Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Operators/Increment": { - "modified": "2020-10-15T22:30:43.753Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Operators/Inequality": { - "modified": "2020-10-15T22:31:01.817Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Operators/Left_shift": { - "modified": "2020-10-15T22:31:53.975Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Operators/Left_shift_assignment": { - "modified": "2020-10-15T22:31:18.033Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Operators/Less_than": { - "modified": "2020-10-15T22:31:08.640Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Operators/Less_than_or_equal": { - "modified": "2020-10-15T22:31:09.975Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Operators/Logical_AND": { - "modified": "2020-10-15T22:31:17.185Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Operators/Logical_NOT": { - "modified": "2020-10-15T22:31:22.627Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Operators/Logical_OR": { - "modified": "2020-10-15T22:31:23.119Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Operators/Multiplication": { - "modified": "2020-10-15T22:30:49.518Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Operators/Multiplication_assignment": { - "modified": "2020-10-15T22:31:19.932Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Operators/Nullish_coalescing_operator": { - "modified": "2020-10-15T22:25:09.777Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Operators/Operator_Precedence": { - "modified": "2020-03-12T19:49:40.789Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Operators/Optional_chaining": { - "modified": "2020-10-15T22:23:41.986Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Operators/Pipeline_operator": { - "modified": "2020-10-15T22:25:08.992Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Operators/Property_Accessors": { - "modified": "2020-10-15T22:24:55.859Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Operators/Remainder": { - "modified": "2020-10-15T22:30:44.446Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Operators/Remainder_assignment": { - "modified": "2020-10-15T22:31:21.443Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Operators/Right_shift": { - "modified": "2020-10-15T22:31:53.028Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Operators/Right_shift_assignment": { - "modified": "2020-10-15T22:31:52.891Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Operators/Spread_syntax": { - "modified": "2020-10-15T22:25:14.735Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Operators/Strict_equality": { - "modified": "2020-10-15T22:31:00.404Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Operators/Strict_inequality": { - "modified": "2020-10-15T22:30:56.621Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Operators/Subtraction": { - "modified": "2020-10-15T22:30:44.115Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Operators/Subtraction_assignment": { - "modified": "2020-10-15T22:31:19.037Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Operators/Unary_negation": { - "modified": "2020-10-15T22:30:46.482Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Operators/Unary_plus": { - "modified": "2020-10-15T22:30:52.268Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Operators/Unsigned_right_shift": { - "modified": "2020-10-15T22:31:54.556Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Operators/Unsigned_right_shift_assignment": { - "modified": "2020-10-15T22:32:00.422Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Operators/async_function": { - "modified": "2020-10-15T22:26:04.754Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Operators/await": { - "modified": "2020-10-15T22:05:00.462Z", - "contributors": [ - "DariaManko", - "baronkoko" - ] - }, - "Web/JavaScript/Reference/Operators/class": { - "modified": "2020-10-15T22:23:32.805Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Operators/delete": { - "modified": "2020-10-15T22:24:36.785Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Operators/function": { - "modified": "2020-10-15T22:25:14.130Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Operators/function*": { - "modified": "2020-10-15T22:25:34.849Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Operators/in": { - "modified": "2020-10-15T21:54:02.648Z", - "contributors": [ - "DariaManko", - "RuslanaGRA" - ] - }, - "Web/JavaScript/Reference/Operators/instanceof": { - "modified": "2020-10-15T22:25:04.957Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Operators/new": { - "modified": "2020-10-15T22:23:19.737Z", - "contributors": [ - "DariaManko", - "heyiamvika" - ] - }, - "Web/JavaScript/Reference/Operators/new.target": { - "modified": "2020-10-15T22:25:44.226Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Operators/super": { - "modified": "2020-10-15T22:25:37.949Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Operators/this": { - "modified": "2020-10-15T22:24:51.132Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Operators/typeof": { - "modified": "2020-10-15T22:21:46.964Z", - "contributors": [ - "DariaManko", - "MargaritaKotsik" - ] - }, - "Web/JavaScript/Reference/Operators/void": { - "modified": "2020-10-15T22:24:58.425Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Operators/yield": { - "modified": "2020-10-15T22:25:34.911Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Operators/yield*": { - "modified": "2020-10-15T22:25:33.565Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Statements": { - "modified": "2020-10-15T21:49:08.697Z", - "contributors": [ - "DariaManko", - "fscholz" - ] - }, - "Web/JavaScript/Reference/Statements/Empty": { - "modified": "2020-10-15T22:22:15.796Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Statements/async_function": { - "modified": "2020-10-15T22:26:08.242Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Statements/block": { - "modified": "2020-10-15T22:22:16.357Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Statements/break": { - "modified": "2020-10-15T22:22:15.768Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Statements/class": { - "modified": "2020-10-15T22:22:33.648Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Statements/const": { - "modified": "2020-03-12T19:44:32.913Z", - "contributors": [ - "vmdrot" - ] - }, - "Web/JavaScript/Reference/Statements/continue": { - "modified": "2020-10-15T22:22:16.363Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Statements/debugger": { - "modified": "2020-10-15T22:22:36.514Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Statements/do...while": { - "modified": "2020-10-15T22:22:14.530Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Statements/export": { - "modified": "2020-10-15T22:23:12.547Z", - "contributors": [ - "raikune" - ] - }, - "Web/JavaScript/Reference/Statements/for": { - "modified": "2020-10-15T22:21:39.294Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Statements/for-await...of": { - "modified": "2020-10-15T22:30:28.358Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Statements/for...in": { - "modified": "2020-10-15T22:22:07.167Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Statements/for...of": { - "modified": "2020-10-15T22:22:16.358Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Statements/function": { - "modified": "2020-10-15T22:24:06.831Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Statements/function*": { - "modified": "2020-10-15T22:25:35.364Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Statements/if...else": { - "modified": "2020-10-15T22:20:34.938Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Statements/label": { - "modified": "2020-10-15T22:22:14.825Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Statements/let": { - "modified": "2020-10-15T22:22:16.396Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Statements/return": { - "modified": "2020-10-15T22:22:31.214Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Statements/switch": { - "modified": "2020-10-15T22:30:28.292Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Statements/throw": { - "modified": "2020-10-15T22:18:55.607Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Statements/try...catch": { - "modified": "2020-10-15T22:18:59.211Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Statements/var": { - "modified": "2020-10-15T22:03:49.456Z", - "contributors": [ - "DariaManko", - "asmforce", - "OlexandrIlchenko" - ] - }, - "Web/JavaScript/Reference/Statements/while": { - "modified": "2020-10-15T22:22:13.961Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Statements/with": { - "modified": "2020-11-06T12:49:39.750Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Strict_mode": { - "modified": "2020-03-12T19:45:32.269Z", - "contributors": [ - "DariaManko", - "Drastic", - "asmforce" - ] - }, - "Web/JavaScript/Reference/Template_literals": { - "modified": "2020-10-15T22:30:04.000Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Trailing_commas": { - "modified": "2020-10-15T22:30:59.419Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/Progressive_web_apps": { - "modified": "2019-03-23T22:00:18.455Z", - "contributors": [ - "chrisdavidmills", - "asmforce" - ] - }, - "Web/Reference": { - "modified": "2019-03-23T22:25:53.790Z", - "contributors": [ - "andrealeone" - ] - }, - "Web/XML": { - "modified": "2019-03-25T03:50:12.335Z" - }, - "Web/XML/XML_introduction": { - "modified": "2020-05-14T13:15:54.898Z", - "contributors": [ - "CODER591", - "boxa6" - ] - }, - "Web/XSLT": { - "modified": "2019-03-23T22:01:40.519Z", - "contributors": [ - "chrisdavidmills" - ] - }, - "Glossary/Block/Scripting": { - "modified": "2019-10-07T11:02:21.315Z", - "contributors": [ - "Pavlechko" - ] - }, - "Glossary/Abstraction": { - "modified": "2019-03-23T22:30:29.962Z", - "contributors": [ - "asmforce", - "Kamilius" - ] - }, - "Glossary/Algorithm": { - "modified": "2019-03-23T22:30:35.419Z", - "contributors": [ - "asmforce", - "Kamilius" - ] - }, - "Glossary/Argument": { - "modified": "2019-03-23T22:04:22.695Z", - "contributors": [ - "asmforce" - ] - }, - "Glossary/buffer": { - "modified": "2019-03-23T22:07:54.933Z", - "contributors": [ - "asmforce" - ] - }, - "Glossary/Accessibility": { - "modified": "2019-05-04T18:59:21.286Z", - "contributors": [ - "ArtemLashmanov", - "Kamilius" - ] - }, - "Glossary/Viewport": { - "modified": "2019-03-23T22:08:34.368Z", - "contributors": [ - "asmforce" - ] - }, - "Glossary/Decryption": { - "modified": "2019-09-16T13:32:33.238Z", - "contributors": [ - "DollarPo8" - ] - }, - "Glossary/Dynamic_programming_language": { - "modified": "2019-03-18T21:43:52.488Z", - "contributors": [ - "bdvorianov" - ] - }, - "Glossary/UX": { - "modified": "2019-03-18T21:34:51.796Z", - "contributors": [ - "SKaznadei" - ] - }, - "Glossary/Closure": { - "modified": "2019-03-23T22:04:17.938Z", - "contributors": [ - "asmforce" - ] - }, - "Glossary/Variable": { - "modified": "2019-03-23T22:09:07.757Z", - "contributors": [ - "asmforce" - ] - }, - "Glossary/Value": { - "modified": "2019-03-23T22:09:28.718Z", - "contributors": [ - "asmforce" - ] - }, - "Glossary/Identifier": { - "modified": "2019-03-23T22:11:07.008Z", - "contributors": [ - "asmforce", - "yuraantonov" - ] - }, - "Glossary/Statement": { - "modified": "2019-10-08T03:15:04.893Z", - "contributors": [ - "Pavlechko" - ] - }, - "Glossary/Internet": { - "modified": "2019-03-23T22:08:20.008Z", - "contributors": [ - "SKaznadei", - "asmforce" - ] - }, - "Glossary/Compile": { - "modified": "2019-03-18T21:35:41.310Z", - "contributors": [ - "Abalmazik" - ] - }, - "Glossary/Cryptanalysis": { - "modified": "2019-09-10T14:27:53.120Z", - "contributors": [ - "DollarPo8" - ] - }, - "Glossary/Cryptographic_hash_function": { - "modified": "2019-09-18T10:42:51.504Z", - "contributors": [ - "DollarPo8" - ] - }, - "Glossary/Cryptography": { - "modified": "2019-09-10T13:13:46.945Z", - "contributors": [ - "DollarPo8" - ] - }, - "Glossary/Method": { - "modified": "2019-07-18T12:27:02.669Z", - "contributors": [ - "DariaManko", - "asmforce", - "Kamilius" - ] - }, - "Glossary/Wrapper": { - "modified": "2019-03-23T22:08:15.564Z", - "contributors": [ - "asmforce" - ] - }, - "Glossary/OOP": { - "modified": "2019-05-16T18:01:52.440Z", - "contributors": [ - "ArtemLashmanov", - "asmforce" - ] - }, - "Glossary/Operator": { - "modified": "2019-03-18T21:44:09.880Z", - "contributors": [ - "bdvorianov" - ] - }, - "Glossary/Hyperlink": { - "modified": "2019-03-18T21:34:47.720Z", - "contributors": [ - "SKaznadei" - ] - }, - "Glossary/Recursion": { - "modified": "2019-03-18T21:44:04.217Z", - "contributors": [ - "asmforce", - "bdvorianov" - ] - }, - "Glossary/Symbol": { - "modified": "2020-12-14T08:56:37.459Z", - "contributors": [ - "DariaManko", - "raikune" - ] - }, - "Glossary/World_Wide_Web": { - "modified": "2019-03-18T20:37:36.381Z", - "contributors": [ - "romanstor", - "SKaznadei", - "asmforce" - ] - }, - "Glossary/Type": { - "modified": "2019-03-23T22:09:27.817Z", - "contributors": [ - "asmforce" - ] - }, - "Glossary/Function": { - "modified": "2019-07-01T07:43:55.787Z", - "contributors": [ - "DariaManko", - "bdvorianov" - ] - }, - "Glossary/Cipher": { - "modified": "2019-09-10T14:28:27.783Z", - "contributors": [ - "DollarPo8" - ] - }, - "Glossary/Ciphertext": { - "modified": "2019-09-12T14:19:30.255Z", - "contributors": [ - "DollarPo8" - ] - }, - "Learn/CSS/CSS_layout": { - "modified": "2020-07-25T19:25:57.955Z", - "contributors": [ - "nepiravno" - ] - }, - "Learn/CSS/First_steps/What_is_CSS": { - "modified": "2020-10-15T22:22:31.879Z", - "contributors": [ - "SergiyLuckys" - ] - }, - "Learn/CSS/Styling_text/Styling_lists": { - "modified": "2020-07-16T22:26:15.367Z", - "contributors": [ - "MykolaCompany" - ] - }, - "Learn/Getting_started_with_the_web/The_web_and_web_standards": { - "modified": "2020-07-25T20:32:44.440Z", - "contributors": [ - "nepiravno" - ] - }, - "orphaned/Learn/How_to_contribute": { - "modified": "2020-07-16T22:33:46.744Z", - "contributors": [ - "bohdan009" - ] - }, - "Learn/Forms": { - "modified": "2020-07-25T20:03:44.978Z", - "contributors": [ - "nepiravno", - "Yurii_Horbach", - "feel13good" - ] - }, - "Learn/Forms/Your_first_form": { - "modified": "2020-07-16T22:21:07.366Z", - "contributors": [ - "pelyp47" - ] - }, - "Learn/HTML/Introduction_to_HTML/The_head_metadata_in_HTML": { - "modified": "2020-07-16T22:23:25.057Z", - "contributors": [ - "ArtemLashmanov", - "websunsey" - ] - }, - "Learn/JavaScript/Asynchronous": { - "modified": "2020-07-25T19:53:57.083Z", - "contributors": [ - "nepiravno" - ] - }, - "Learn/JavaScript/Building_blocks": { - "modified": "2020-07-25T19:43:30.011Z", - "contributors": [ - "nepiravno" - ] - }, - "Learn/Tools_and_testing/GitHub": { - "modified": "2020-07-25T20:26:40.197Z", - "contributors": [ - "nepiravno" - ] - }, - "Learn/Tools_and_testing/Client-side_JavaScript_frameworks": { - "modified": "2020-07-25T20:53:33.045Z", - "contributors": [ - "nepiravno" - ] - }, - "Learn/Tools_and_testing/Client-side_JavaScript_frameworks/Svelte_getting_started": { - "modified": "2020-08-22T19:18:21.080Z", - "contributors": [ - "thedenoff" - ] - }, - "Learn/Tools_and_testing/Understanding_client-side_tools": { - "modified": "2020-07-25T20:47:10.306Z", - "contributors": [ - "nepiravno" - ] - }, - "Learn/Tools_and_testing/Cross_browser_testing": { - "modified": "2020-07-25T20:16:06.008Z", - "contributors": [ - "nepiravno" - ] - }, - "Learn/Accessibility": { - "modified": "2020-07-25T20:18:04.756Z", - "contributors": [ - "nepiravno" - ] - }, - "Learn/Learning_and_getting_help": { - "modified": "2020-07-25T20:34:14.558Z", - "contributors": [ - "nepiravno" - ] - }, - "Learn/Front-end_web_developer": { - "modified": "2020-07-26T07:04:16.114Z", - "contributors": [ - "nepiravno" - ] - }, - "orphaned/MDN/Community": { - "modified": "2019-09-11T08:00:43.055Z", - "contributors": [ - "SphinxKnight", - "wbamberg", - "asmforce", - "yuraantonov" - ] - }, - "orphaned/MDN/Contribute/Howto/Create_an_MDN_account": { - "modified": "2019-01-17T02:06:23.808Z", - "contributors": [ - "wbamberg", - "yuraantonov" - ] - }, - "orphaned/MDN/Contribute/Howto/Do_an_editorial_review": { - "modified": "2020-09-04T18:11:30.511Z", - "contributors": [ - "borysl", - "wbamberg", - "asmforce", - "kuki" - ] - }, - "orphaned/MDN/Contribute/Howto/Set_the_summary_for_a_page": { - "modified": "2019-03-23T22:05:10.058Z", - "contributors": [ - "wbamberg", - "ivaskonyan" - ] - }, - "orphaned/MDN/Contribute/Howto/Be_a_beta_tester": { - "modified": "2019-03-18T21:45:25.216Z", - "contributors": [ - "wbamberg", - "asmforce" - ] - }, - "MDN/Contribute/Howto/Create_and_edit_pages": { - "modified": "2019-08-06T16:49:19.554Z", - "contributors": [ - "html5beginner", - "wbamberg", - "asmforce" - ] - }, - "MDN/Guidelines/Writing_style_guide": { - "modified": "2020-09-30T15:32:10.012Z", - "contributors": [ - "chrisdavidmills", - "jswisher", - "Pavlechko", - "wbamberg", - "BezZaboT", - "asmforce" - ] - }, - "MDN/Yari": { - "modified": "2019-09-09T15:54:27.754Z", - "contributors": [ - "SphinxKnight", - "wbamberg", - "asmforce" - ] - }, - "MDN/Structures/Macros": { - "modified": "2020-09-30T12:57:34.918Z", - "contributors": [ - "chrisdavidmills", - "wbamberg", - "asmforce" - ] - }, - "MDN/Structures/Macros/Commonly-used_macros": { - "modified": "2020-09-30T12:57:35.379Z", - "contributors": [ - "chrisdavidmills", - "memodim.di", - "wbamberg", - "teoli", - "fscholz", - "asmforce" - ] - }, - "MDN/Tools/KumaScript/Troubleshooting": { - "modified": "2020-09-30T16:54:47.555Z", - "contributors": [ - "chrisdavidmills", - "wbamberg", - "asmforce" - ] - }, - "MDN/About": { - "modified": "2019-09-09T15:23:18.385Z", - "contributors": [ - "SphinxKnight", - "wbamberg", - "asmforce", - "OlexandrIlchenko" - ] - }, - "Mozilla/Add-ons/WebExtensions/What_are_WebExtensions": { - "modified": "2019-03-18T21:05:11.899Z", - "contributors": [ - "leofun01" - ] - }, - "Web/API/Page_Visibility_API": { - "modified": "2020-10-15T22:29:33.453Z", - "contributors": [ - "memodim.di" - ] - }, - "Web/API/Canvas_API/Tutorial/Hit_regions_and_accessibility": { - "modified": "2019-03-23T22:08:43.488Z", - "contributors": [ - "asmforce" - ] - }, - "Web/API/WindowOrWorkerGlobalScope/setTimeout": { - "modified": "2019-03-23T22:25:41.478Z", - "contributors": [ - "jurkobanzaj", - "Rozelin", - "Kamilius" - ] - }, - "Web/API/Event": { - "modified": "2020-04-15T04:26:09.031Z", - "contributors": [ - "vera-design", - "yuraantonov" - ] - }, - "Web/API/Event/target": { - "modified": "2020-08-08T10:32:59.036Z", - "contributors": [ - "Vandeko1", - "curtdp", - "yuraantonov" - ] - }, - "Web/CSS/CSS_Animations/Using_CSS_animations": { - "modified": "2019-03-23T22:07:52.924Z", - "contributors": [ - "GiorgioLviv" - ] - }, - "Web/CSS/CSS_Box_Model/Mastering_margin_collapsing": { - "modified": "2019-03-23T22:08:26.711Z", - "contributors": [ - "asmforce" - ] - }, - "Web/CSS/Alternative_style_sheets": { - "modified": "2019-03-23T22:20:16.657Z", - "contributors": [ - "asmforce" - ] - }, - "Web/CSS/Reference": { - "modified": "2019-11-24T18:02:08.214Z", - "contributors": [ - "yuraantonov" - ] - }, - "Web/CSS/CSS_Box_Model": { - "modified": "2019-03-23T22:08:28.621Z", - "contributors": [ - "asmforce", - "mfluehr" - ] - }, - "Web/CSS/Visual_formatting_model": { - "modified": "2020-04-17T11:33:03.035Z", - "contributors": [ - "ablackrain", - "olegsava", - "asmforce" - ] - }, - "Web/CSS/Layout_cookbook": { - "modified": "2020-07-25T19:29:27.695Z", - "contributors": [ - "nepiravno" - ] - }, - "Web/CSS/Layout_mode": { - "modified": "2019-03-23T22:08:35.177Z", - "contributors": [ - "asmforce" - ] - }, - "Web/API/Window/DOMContentLoaded_event": { - "modified": "2019-04-30T14:16:03.506Z", - "contributors": [ - "wbamberg", - "AndriiZ", - "fscholz", - "alekseichuk", - "AlinaKuzmenko" - ] - }, - "Web/Guide/HTML/Using_HTML_sections_and_outlines": { - "modified": "2019-03-18T20:54:41.113Z", - "contributors": [ - "litashg", - "Efimenko", - "yakubiv" - ] - }, - "Web/Guide/Graphics": { - "modified": "2019-03-23T22:38:59.184Z", - "contributors": [ - "v.h.f.u" - ] - }, - "Web/HTML/Reference": { - "modified": "2019-09-09T07:23:26.420Z", - "contributors": [ - "SphinxKnight", - "wbamberg", - "asmforce", - "v.h.f.u" - ] - }, - "Web/HTML/Element/html": { - "modified": "2019-03-23T22:36:12.142Z", - "contributors": [ - "asmforce", - "yuraantonov" - ] - }, - "Web/HTML/Element/iframe": { - "modified": "2020-11-06T03:47:28.747Z", - "contributors": [ - "SphinxKnight", - "melnykvlados" - ] - }, - "Web/HTML/Element": { - "modified": "2020-04-04T20:48:11.630Z", - "contributors": [ - "Neonas", - "yuraantonov" - ] - }, - "Web/HTML/Element/link": { - "modified": "2020-10-15T22:15:13.454Z", - "contributors": [ - "AndriyDarmits" - ] - }, - "Web/HTML/Element/nav": { - "modified": "2020-10-15T21:46:13.795Z", - "contributors": [ - "bulvvkoxide", - "asmforce", - "Kamilius" - ] - }, - "Web/HTML/Element/script": { - "modified": "2020-10-15T22:25:25.196Z", - "contributors": [ - "DANICHMOMO" - ] - }, - "Web/HTML/Element/section": { - "modified": "2019-03-23T22:21:37.735Z", - "contributors": [ - "bulvvkoxide", - "yuraantonov" - ] - }, - "Web/HTML/Element/style": { - "modified": "2019-03-23T22:20:18.231Z", - "contributors": [ - "asmforce" - ] - }, - "Web/HTML/Element/table": { - "modified": "2020-10-15T22:34:06.777Z", - "contributors": [ - "borysl" - ] - }, - "Web/HTML/Element/video": { - "modified": "2020-10-15T22:22:00.012Z", - "contributors": [ - "AndriiZ" - ] - }, - "Web/HTML/Element/header": { - "modified": "2019-03-23T22:10:15.473Z", - "contributors": [ - "yuraantonov" - ] - }, - "Web/HTML/Global_attributes/hidden": { - "modified": "2020-10-15T22:16:02.593Z", - "contributors": [ - "khomyakdi" - ] - }, - "Web/HTML/Global_attributes": { - "modified": "2019-05-03T05:34:55.602Z", - "contributors": [ - "asmforce" - ] - }, - "Web/HTML/Global_attributes/itemscope": { - "modified": "2020-02-27T17:18:48.824Z", - "contributors": [ - "pelyp47", - "AlinaKuzmenko", - "nemishkor" - ] - }, - "Web/HTML/Global_attributes/lang": { - "modified": "2020-10-15T22:17:22.681Z", - "contributors": [ - "asmforce", - "HA3IK" - ] - }, - "Web/HTML/Global_attributes/tabindex": { - "modified": "2020-10-15T22:29:23.358Z", - "contributors": [ - "memodim.di" - ] - }, - "Web/HTML/Quirks_Mode_and_Standards_Mode": { - "modified": "2019-03-18T21:46:42.475Z", - "contributors": [ - "asmforce" - ] - }, - "Web/HTTP/Headers/Accept-Encoding": { - "modified": "2020-10-15T22:13:34.607Z", - "contributors": [ - "pupenasan" - ] - }, - "Web/HTTP/Headers/Accept-Language": { - "modified": "2020-10-15T22:13:27.393Z", - "contributors": [ - "pupenasan" - ] - }, - "Web/HTTP/Headers/Connection": { - "modified": "2020-10-15T22:13:31.957Z", - "contributors": [ - "pupenasan" - ] - }, - "Web/HTTP/Headers/Content-Length": { - "modified": "2020-10-15T22:13:38.034Z", - "contributors": [ - "pupenasan" - ] - }, - "Web/HTTP/Headers/Content-Type": { - "modified": "2020-10-15T22:13:30.716Z", - "contributors": [ - "pupenasan" - ] - }, - "Web/HTTP/Headers/ETag": { - "modified": "2020-10-15T22:03:56.430Z", - "contributors": [ - "cloudgnome" - ] - }, - "Web/HTTP/Headers/If-Match": { - "modified": "2020-10-15T22:04:01.753Z", - "contributors": [ - "cloudgnome" - ] - }, - "Web/HTTP/Headers": { - "modified": "2019-07-09T04:41:30.590Z", - "contributors": [ - "WildeMax", - "savbace", - "pupenasan", - "curdwithraisins" - ] - }, - "Web/HTTP/Headers/Location": { - "modified": "2020-10-15T22:13:34.509Z", - "contributors": [ - "pupenasan" - ] - }, - "Web/HTTP/Headers/Referer": { - "modified": "2020-10-15T21:57:21.223Z", - "contributors": [ - "websunsey" - ] - }, - "Web/HTTP/Headers/User-Agent": { - "modified": "2020-10-15T22:04:15.494Z", - "contributors": [ - "Sestowner" - ] - }, - "Web/HTTP/Headers/X-Forwarded-Proto": { - "modified": "2020-10-15T22:22:50.826Z", - "contributors": [ - "nakhodkiin" - ] - }, - "Web/JavaScript/Guide/Details_of_the_Object_Model": { - "modified": "2020-03-12T19:45:23.579Z", - "contributors": [ - "AdriandeCita", - "wbamberg", - "PavloEleva" - ] - }, - "Web/JavaScript/Guide/Expressions_and_Operators": { - "modified": "2020-03-12T19:46:18.944Z", - "contributors": [ - "DariaManko", - "kwitochka", - "Onimi", - "OleksandrPelepey" - ] - }, - "Web/JavaScript/JavaScript_technologies_overview": { - "modified": "2020-03-12T19:45:24.334Z", - "contributors": [ - "PavloEleva" - ] - }, - "Web/JavaScript/Reference/Functions/rest_parameters": { - "modified": "2020-10-15T21:55:37.826Z", - "contributors": [ - "DariaManko", - "fscholz", - "trofima" - ] - }, - "Web/JavaScript/Reference/Functions/Arrow_functions": { - "modified": "2020-10-15T21:59:14.617Z", - "contributors": [ - "maisteRR", - "asmforce", - "vberestovskyi", - "krizik", - "ahavianiri" - ] - }, - "orphaned/Web/JavaScript/Reference/Global_Objects/Array/prototype": { - "modified": "2020-10-15T21:46:48.879Z", - "contributors": [ - "DariaManko", - "piton13", - "nesteant" - ] - }, - "orphaned/Web/JavaScript/Reference/Global_Objects/AsyncFunction/prototype": { - "modified": "2020-10-15T22:26:05.753Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Math/round": { - "modified": "2020-10-15T21:54:59.380Z", - "contributors": [ - "AdriandeCita", - "yurii-kozak", - "yuraantonov" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Promise/reject": { - "modified": "2020-10-15T21:53:08.281Z", - "contributors": [ - "DariaManko", - "piton13" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Number/EPSILON": { - "modified": "2020-10-15T22:06:24.197Z", - "contributors": [ - "DariaManko", - "AdriandeCita" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Number": { - "modified": "2020-10-15T21:55:15.973Z", - "contributors": [ - "DariaManko", - "asmforce", - "justlp", - "yuri_spivak" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Number/isFinite": { - "modified": "2020-10-15T22:32:15.212Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Number/isInteger": { - "modified": "2020-10-15T22:19:10.892Z", - "contributors": [ - "DariaManko", - "abmd" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Number/isNaN": { - "modified": "2020-10-15T22:32:17.922Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Number/isSafeInteger": { - "modified": "2020-10-15T22:32:15.124Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER": { - "modified": "2020-10-15T22:06:24.055Z", - "contributors": [ - "DariaManko", - "AdriandeCita" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Number/MAX_VALUE": { - "modified": "2020-10-15T22:31:47.123Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Number/MIN_SAFE_INTEGER": { - "modified": "2020-10-15T22:31:49.130Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Number/MIN_VALUE": { - "modified": "2020-10-15T22:32:00.610Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Number/NaN": { - "modified": "2020-10-15T22:31:57.609Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Number/NEGATIVE_INFINITY": { - "modified": "2020-10-15T22:31:57.386Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Number/Number": { - "modified": "2020-10-15T22:31:48.346Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Number/parseFloat": { - "modified": "2020-10-15T22:32:15.375Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Number/parseInt": { - "modified": "2020-10-15T22:32:20.201Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Number/POSITIVE_INFINITY": { - "modified": "2020-10-15T22:32:15.213Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Number/toExponential": { - "modified": "2020-10-15T22:29:41.228Z", - "contributors": [ - "DariaManko", - "taraskundyk" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Number/toFixed": { - "modified": "2020-10-15T22:32:23.109Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Number/toLocaleString": { - "modified": "2020-10-15T22:32:24.740Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Number/toPrecision": { - "modified": "2020-10-15T22:32:25.165Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Number/toSource": { - "modified": "2020-10-15T22:32:25.603Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Number/toString": { - "modified": "2020-10-15T22:32:26.957Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Global_Objects/Number/valueOf": { - "modified": "2020-10-15T22:32:27.402Z", - "contributors": [ - "DariaManko" - ] - }, - "Web/JavaScript/Reference/Operators/Destructuring_assignment": { - "modified": "2020-03-12T19:45:50.341Z", - "contributors": [ - "savbace", - "trofima" - ] - }, - "Web/JavaScript/Reference/Operators/Object_initializer": { - "modified": "2020-10-15T21:53:09.316Z", - "contributors": [ - "DariaManko", - "trofima" - ] - }, - "Web/JavaScript/Reference/Iteration_protocols": { - "modified": "2020-03-12T19:47:16.437Z", - "contributors": [ - "DariaManko", - "asmforce" - ] - }, - "Web/JavaScript/Equality_comparisons_and_sameness": { - "modified": "2020-03-12T19:47:10.878Z", - "contributors": [ - "DariaManko", - "gshadura", - "asmforce" - ] - }, - "Web/Houdini": { - "modified": "2020-01-12T13:13:12.436Z", - "contributors": [ - "AndriyTykhan" - ] - }, - "Web/Tutorials": { - "modified": "2020-03-16T20:18:27.566Z", - "contributors": [ - "w3schoolsrus", - "html5beginner", - "MilaYoga", - "assanovstan" - ] - }, - "Tools": { - "modified": "2020-07-16T22:44:19.040Z", - "contributors": [ - "w3schoolsrus", - "SphinxKnight", - "Sergiy_Luckys", - "pupenasan", - "yuraantonov" - ] - }, - "Tools/Network_Monitor": { - "modified": "2020-07-16T22:35:32.001Z", - "contributors": [ - "pupenasan" - ] - }, - "Tools/Network_Monitor/Performance_Analysis": { - "modified": "2020-07-16T22:35:35.883Z", - "contributors": [ - "pupenasan" - ] - }, - "Tools/Network_Monitor/recording": { - "modified": "2020-07-16T22:35:35.497Z", - "contributors": [ - "pupenasan" - ] - }, - "Tools/Network_Monitor/request_details": { - "modified": "2020-07-16T22:35:34.973Z", - "contributors": [ - "pupenasan" - ] - }, - "Tools/Network_Monitor/request_list": { - "modified": "2020-07-16T22:35:34.227Z", - "contributors": [ - "pupenasan" - ] - }, - "Tools/Network_Monitor/Throttling": { - "modified": "2020-07-16T22:35:36.549Z", - "contributors": [ - "pupenasan" - ] - }, - "Tools/Network_Monitor/toolbar": { - "modified": "2020-07-16T22:35:32.971Z", - "contributors": [ - "pupenasan" - ] - }, - "Tools/Web_Console/Console_messages": { - "modified": "2020-07-16T22:34:16.455Z", - "contributors": [ - "pupenasan" - ] - }, - "Tools/Web_Console": { - "modified": "2020-07-16T22:34:10.166Z", - "contributors": [ - "pupenasan", - "PavloEleva" - ] - }, - "Tools/Web_Console/UI_Tour": { - "modified": "2020-07-16T22:34:17.758Z", - "contributors": [ - "pupenasan" - ] - }, - "Tools/Web_Console/Split_console": { - "modified": "2020-07-16T22:34:21.548Z", - "contributors": [ - "pupenasan" - ] - }, - "conflicting/Glossary/Doctype": { - "modified": "2019-01-17T01:19:22.959Z", - "contributors": [ - "asmforce" - ] - }, - "conflicting/Web/API/WindowOrWorkerGlobalScope": { - "modified": "2019-03-23T22:25:44.821Z", - "contributors": [ - "Sheppy" - ] - }, - "Web/CSS/CSS_Flexible_Box_Layout/Basic_Concepts_of_Flexbox": { - "modified": "2019-03-23T22:35:58.219Z", - "contributors": [ - "animatio" - ] - }, - "Web/API/HTMLMediaElement/abort_event": { - "modified": "2019-04-30T14:23:14.164Z", - "contributors": [ - "wbamberg", - "fscholz", - "CosmicBoris" - ] - }, - "conflicting/Learn/CSS/First_steps": { - "modified": "2019-03-23T22:37:37.659Z", - "contributors": [ - "ASeegull", - "yuraantonov" - ] - }, - "Learn/CSS/First_steps/How_CSS_works": { - "modified": "2019-03-23T22:21:20.519Z", - "contributors": [ - "ASeegull" - ] - }, - "conflicting/Web/JavaScript/Reference/Global_Objects/Boolean": { - "modified": "2020-10-15T22:06:14.618Z", - "contributors": [ - "DariaManko", - "AdriandeCita" - ] - }, - "conflicting/Web/JavaScript/Reference/Global_Objects/Error": { - "modified": "2020-10-15T22:18:21.094Z", - "contributors": [ - "DariaManko" - ] - }, - "conflicting/Web/JavaScript/Reference/Global_Objects/EvalError": { - "modified": "2020-10-15T22:18:43.111Z", - "contributors": [ - "DariaManko" - ] - }, - "conflicting/Web/JavaScript/Reference/Global_Objects/Function": { - "modified": "2020-10-15T22:21:50.690Z", - "contributors": [ - "DariaManko" - ] - }, - "conflicting/Web/JavaScript/Reference/Global_Objects/GeneratorFunction": { - "modified": "2020-10-15T22:25:30.929Z", - "contributors": [ - "DariaManko" - ] - }, - "conflicting/Web/JavaScript/Reference/Global_Objects/InternalError": { - "modified": "2020-10-15T22:18:47.273Z", - "contributors": [ - "DariaManko" - ] - }, - "conflicting/Web/JavaScript/Reference/Global_Objects/Promise": { - "modified": "2020-10-15T21:51:58.196Z", - "contributors": [ - "piton13" - ] - }, - "conflicting/Web/JavaScript/Reference/Global_Objects/RangeError": { - "modified": "2020-10-15T22:18:03.049Z", - "contributors": [ - "DariaManko" - ] - }, - "conflicting/Web/JavaScript/Reference/Global_Objects/ReferenceError": { - "modified": "2020-10-15T22:18:46.456Z", - "contributors": [ - "DariaManko" - ] - }, - "conflicting/Web/JavaScript/Reference/Global_Objects/SyntaxError": { - "modified": "2020-10-15T21:58:51.957Z", - "contributors": [ - "DariaManko", - "asmforce" - ] - }, - "conflicting/Web/JavaScript/Reference/Global_Objects/TypeError": { - "modified": "2020-10-15T22:18:47.800Z", - "contributors": [ - "DariaManko" - ] - }, - "conflicting/Web/JavaScript/Reference/Global_Objects/URIError": { - "modified": "2020-10-15T22:18:47.179Z", - "contributors": [ - "DariaManko" - ] - }, - "conflicting/Web/JavaScript/Reference/Global_Objects/Number": { - "modified": "2020-10-15T21:56:21.125Z", - "contributors": [ - "asmforce" - ] - }, - "conflicting/Web/JavaScript/Reference/Operators": { - "modified": "2020-10-15T22:24:28.585Z", - "contributors": [ - "DariaManko" - ] - }, - "conflicting/Web/JavaScript/Reference/Operators_7c8eb9475d97a4a734c5991857698560": { - "modified": "2020-10-15T22:24:24.851Z", - "contributors": [ - "DariaManko" - ] - }, - "conflicting/Web/JavaScript/Reference/Operators_f71733c8e7001a29c3ec40d8522a4aca": { - "modified": "2020-10-15T22:24:49.649Z", - "contributors": [ - "DariaManko" - ] - }, - "conflicting/Web/JavaScript/Reference/Operators/Spread_syntax": { - "modified": "2020-03-12T19:45:50.602Z", - "contributors": [ - "Lancer92", - "Artem2011", - "devalf", - "trofima", - "KadirTopal" - ] - }, - "conflicting/Web/JavaScript/Reference/Operators_a8aa9ce42ce1749862961c61113d120b": { - "modified": "2020-10-15T21:57:25.055Z", - "contributors": [ - "DariaManko", - "Onimi", - "Anonymous", - "GrytsiukSerhiy", - "asmforce" - ] - }, - "conflicting/Web/JavaScript/Reference/Operators_1cd48548c16282df3883f99267726c3e": { - "modified": "2020-10-15T21:53:06.640Z", - "contributors": [ - "DariaManko", - "wbamberg", - "Onimi", - "trofima" - ] - }, - "conflicting/Web/JavaScript/Reference/Statements/switch": { - "modified": "2020-10-15T22:22:48.978Z", - "contributors": [ - "DariaManko" - ] - } -} \ No newline at end of file diff --git a/files/uk/conflicting/glossary/doctype/index.html b/files/uk/conflicting/glossary/doctype/index.html deleted file mode 100644 index 156cfe51d7..0000000000 --- a/files/uk/conflicting/glossary/doctype/index.html +++ /dev/null @@ -1,11 +0,0 @@ ---- -title: DTD -slug: conflicting/Glossary/Doctype -tags: - - CodingScripting - - Глосарій -translation_of: Glossary/Doctype -translation_of_original: Glossary/DTD -original_slug: Glossary/DTD ---- -

{{page("/uk/docs/Glossary/Doctype")}}

diff --git a/files/uk/conflicting/learn/css/first_steps/index.html b/files/uk/conflicting/learn/css/first_steps/index.html deleted file mode 100644 index 8658350018..0000000000 --- a/files/uk/conflicting/learn/css/first_steps/index.html +++ /dev/null @@ -1,48 +0,0 @@ ---- -title: Getting started with CSS -slug: conflicting/Learn/CSS/First_steps -translation_of: Learn/CSS/First_steps -translation_of_original: Web/Guide/CSS/Getting_started -original_slug: Web/Guide/CSS/Getting_started ---- -

Це керівництво ознайомить Вас з основними функціями та мовою (синтаксисом) каскадних таблиць стилів (Cascading Style Sheets - CSS). Ви використовуєте CSS, щоб змінити зовнішній вигляд структурованого документу, такого як веб-сторінка. Урок також включає приклади вправ, які ви можете спробувати виконати на власному комп’ютері, щоб побачити ефекти CSS і функції, що реалізуються в сучасних браузерах.

- -

Посібник призначений для початківців і будь-кого, хто б хотів повторити основи CSS. Якщо ви маєте більше досвіду з CSS, основна сторінка CSS містить списки більш просуненого рівня.

- - - -

Що потрібно для початку роботи

- - - -

Не зважаючи на те, що вправи можуть допомогти тобі в навчанні, ти не зобов’язаний хз виконувати. Ти можеш просто читати керівництво та розглядати зображення.

- -

На замітку: Керівництво розглядає тему як CSS працює з кольором. Буде простіше завершити ці секції з кольоровим дисплеєм та нормальним кольоровим зором.  

- -

Як використовувати це керівництво

- -

В опрацюванні цього керівництва читай сторінки уважно і в визначеній послідовності. Якщо ти пропустиш сторінку, надалі може бути важко зрозуміти наступні сторінки підручника. 

- -

Частина І: основи CSS

- -

На кожній сторінці переглянь відділ Інформація, щоб зрозуміти як працює CSS. Спробуй  секцію Дія, щоб випробувати CSS на власному комп’ютері.

- -

To test your understanding, take the challenge at the end of each page. Solutions to the challenges are linked under the challenges, so you don't need to look at them if you don't want to.

- -

Щоб глибше зрозуміти CSS, прочитай інформацію, яку ти знайдеш в блоці з заголовком Детальніше. Використай лінки у них, щоб знайти довідникову інформацію про CSS.

- -

Частина II: Сфера CSS

- -

Друга частина підручника надає приклади, які показують сферу CSS з іншими веб- і Mozilla технологіями.

- -
    -
  1. JavaScript
  2. -
  3. SVG-графіка
  4. -
  5. XML дані
  6. -
  7. XBL сполучення
  8. -
  9. Користувацбкі інтерфейси ХUL
  10. -
diff --git a/files/uk/conflicting/web/api/windoworworkerglobalscope/index.html b/files/uk/conflicting/web/api/windoworworkerglobalscope/index.html deleted file mode 100644 index bc8dcb5f8a..0000000000 --- a/files/uk/conflicting/web/api/windoworworkerglobalscope/index.html +++ /dev/null @@ -1,127 +0,0 @@ ---- -title: WindowTimers -slug: conflicting/Web/API/WindowOrWorkerGlobalScope -tags: - - API - - HTML DOM - - Interface - - Intervals - - Mixin - - NeedsTranslation - - Reference - - Timers - - TopicStub - - Workers -translation_of: Web/API/WindowOrWorkerGlobalScope -translation_of_original: Web/API/WindowTimers -original_slug: Web/API/WindowTimers ---- -
{{APIRef("HTML DOM")}}
- -

WindowTimers is a mixin used to provide utility methods which set and clear timers. No objects of this type exist; instead, its methods are available on {{domxref("Window")}} for the standard browsing scope, or on {{domxref("WorkerGlobalScope")}} for workers.

- -

Properties

- -

This interface neither inherits nor provides any properties.

- -

Methods

- -

This interface does not inherit any methods. It offers the following methods.

- -
-
{{domxref("WindowTimers.clearInterval()")}}
-
Cancels the repeated execution set using {{domxref("WindowTimers.setInterval()")}}.
-
{{domxref("WindowTimers.clearTimeout()")}}
-
Cancels the delayed execution set using {{domxref("WindowTimers.setTimeout()")}}.
-
{{domxref("WindowTimers.setInterval()")}}
-
Schedules a function to execute every time a given number of milliseconds elapses.
-
{{domxref("WindowTimers.setTimeout()")}}
-
Schedules a function to execute in a given amount of time.
-
- -

Specifications

- - - - - - - - - - - - - - - - - - - - - - - - - - -
SpecificationStatusComment
{{SpecName('HTML WHATWG', '#windowtimers', 'WindowTimers')}}{{Spec2('HTML WHATWG')}}No change since the latest snapshot, {{SpecName("HTML5.1")}}.
{{SpecName('HTML5.1', '#windowtimers', 'WindowTimers')}}{{Spec2('HTML5.1')}}Snapshot of {{SpecName("HTML WHATWG")}}. No change.
{{SpecName("HTML5 W3C", "#windowtimers", "WindowTimers")}}{{Spec2('HTML5 W3C')}}Snapshot of {{SpecName("HTML WHATWG")}}. Creation of WindowBase64 (properties where on the target before it).
- -

Browser compatibility

- -

{{CompatibilityTable}}

- -
- - - - - - - - - - - - - - - - - - - -
FeatureFirefox (Gecko)ChromeInternet ExplorerOperaSafari
Basic support{{CompatGeckoDesktop(1)}}1.04.04.01.0
-
- -
- - - - - - - - - - - - - - - - - - - -
FeatureFirefox Mobile (Gecko)AndroidIE MobileOpera MobileSafari Mobile
Basic support{{CompatGeckoMobile(1)}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
-
- -

 

- -

See also

- - diff --git a/files/uk/conflicting/web/javascript/reference/global_objects/boolean/index.html b/files/uk/conflicting/web/javascript/reference/global_objects/boolean/index.html deleted file mode 100644 index 4cbc7d8fb6..0000000000 --- a/files/uk/conflicting/web/javascript/reference/global_objects/boolean/index.html +++ /dev/null @@ -1,84 +0,0 @@ ---- -title: Boolean.prototype -slug: conflicting/Web/JavaScript/Reference/Global_Objects/Boolean -tags: - - Boolean - - JavaScript - - Властивість - - Поле - - прототип -translation_of: Web/JavaScript/Reference/Global_Objects/Boolean -translation_of_original: Web/JavaScript/Reference/Global_Objects/Boolean/prototype -original_slug: Web/JavaScript/Reference/Global_Objects/Boolean/prototype ---- -
{{JSRef}}
- -

Поле Boolean.prototype представляє прототип конструктора {{jsxref("Boolean")}}.

- -
{{js_property_attributes(0, 0, 0)}}
- -
{{EmbedInteractiveExample("pages/js/boolean-constructor.html")}}
- - - -

Опис

- -

Екземпляри {{jsxref("Boolean")}} наслідуються від Boolean.prototype. Ви можете використовувати об'єкт прототипа конструктора, щоб додавати свої поля та методи до всіх екземплярів {{jsxref("Boolean")}}.

- -

Властивості

- -
-
Boolean.prototype.constructor
-
Повертає функцію, що створила прототип екземпляра. За замовчування це функція {{jsxref("Boolean")}}.
-
- -

Методи

- -
-
{{jsxref("Boolean.prototype.toSource()")}} {{non-standard_inline}}
-
Повертає строку, що містить сирець об'єкту {{jsxref("Boolean")}}; використавши її ви можете створити еквівалентний об'єкт. Перевизначає метод {{jsxref("Object.prototype.toSource()")}}.
-
{{jsxref("Boolean.prototype.toString()")}}
-
Повертає строку "true" чи "false" залежно від значення об'єкту. Перевизначає метод {{jsxref("Object.prototype.toString()")}}.
-
{{jsxref("Boolean.prototype.valueOf()")}}
-
Повертає примітив значення об'єкту {{jsxref("Boolean")}}. Перевизначає метод {{jsxref("Object.prototype.valueOf()")}}.
-
- -

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

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
СпецифікаціяСтатусПримітка
{{SpecName('ES1')}}{{Spec2('ES1')}}Первинне визначення. Реалізовано у JavaScript 1.0.
{{SpecName('ES5.1', '#sec-15.6.3.1', 'Boolean.prototype')}}{{Spec2('ES5.1')}} 
{{SpecName('ES6', '#sec-boolean.prototype', 'Boolean.prototype')}}{{Spec2('ES6')}} 
{{SpecName('ESDraft', '#sec-boolean.prototype', 'Boolean.prototype')}}{{Spec2('ESDraft')}} 
- -

Підтримка у браузерах

- -
- - -

{{Compat("javascript.builtins.Boolean.prototype")}}

-
diff --git a/files/uk/conflicting/web/javascript/reference/global_objects/error/index.html b/files/uk/conflicting/web/javascript/reference/global_objects/error/index.html deleted file mode 100644 index d7c6bbabf9..0000000000 --- a/files/uk/conflicting/web/javascript/reference/global_objects/error/index.html +++ /dev/null @@ -1,116 +0,0 @@ ---- -title: Error.prototype -slug: conflicting/Web/JavaScript/Reference/Global_Objects/Error -tags: - - Error - - JavaScript - - Властивість - - прототип -translation_of: Web/JavaScript/Reference/Global_Objects/Error -translation_of_original: Web/JavaScript/Reference/Global_Objects/Error/prototype -original_slug: Web/JavaScript/Reference/Global_Objects/Error/prototype ---- -
{{JSRef}}
- -

Властивість Error.prototype є прототипом для конструктора {{jsxref("Error")}}.

- -
{{js_property_attributes(0, 0, 0)}}
- -

Опис

- -

Всі екземпляри {{jsxref("Error")}} та екземпляри {{jsxref("Global_Objects/Error", "базових конструкторів помилок", "#Типи_помилок", 1)}} успадковуються від Error.prototype. Як в усіх функціях-конструкторах, ви можете використовувати прототип конструктора, щоб додавати властивості чи методи до усіх екземплярів, створених цим конструктором. 

- -

Властивості

- -

Стандартні властивості

- -
-
Error.prototype.constructor
-
Функція, яка створила прототип екземпляра.
-
{{jsxref("Error.prototype.message")}}
-
Повідомлення помилки.
-
{{jsxref("Error.prototype.name")}}
-
Ім'я помилки.
-
- -

Спеціальні розширення

- -

{{non-standard_header}}

- -

Microsoft

- -
-
Error.description
-
Опис помилки. Властивість схожа на {{jsxref("Error.prototype.message", "message")}}.
-
Error.number
-
Номер помилки.
-
- -

Mozilla

- -
-
{{jsxref("Error.prototype.fileName")}}
-
Шлях до файлу, що спричинив помилку.
-
{{jsxref("Error.prototype.lineNumber")}}
-
Номер рядка у файлі, що спричинив помилку.
-
{{jsxref("Error.prototype.columnNumber")}}
-
Номер стовпця у файлі, де виникла помилка.
-
{{jsxref("Error.prototype.stack")}}
-
Трасування стеку.
-
- -

Методи

- -
-
{{jsxref("Error.prototype.toSource()")}} {{non-standard_inline}}
-
Повертає рядок з кодом, що спричинить створення заданого об'єкта {{jsxref("Error")}}; ви можете використати це значення, щоб створити новий об'єкт. Заміщує метод {{jsxref("Object.prototype.toSource()")}}.
-
{{jsxref("Error.prototype.toString()")}}
-
Повертає рядок, що представляє заданий об'єкт. Заміщує метод {{jsxref("Object.prototype.toString()")}}.
-
- -

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

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
СпецифікаціяСтатусКоментар
{{SpecName('ES1')}}{{Spec2('ES1')}}Початкове визначення Реалізовано у JavaScript 1.1.
{{SpecName('ES5.1', '#sec-15.11.3.1', 'Error')}}{{Spec2('ES5.1')}}
{{SpecName('ES6', '#sec-error.prototype', 'Error')}}{{Spec2('ES6')}}
{{SpecName('ESDraft', '#sec-error.prototype', 'Error')}}{{Spec2('ESDraft')}}
- -

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

- -
- - -

{{Compat("javascript.builtins.Error.prototype")}}

-
- -

Див. також

- - diff --git a/files/uk/conflicting/web/javascript/reference/global_objects/evalerror/index.html b/files/uk/conflicting/web/javascript/reference/global_objects/evalerror/index.html deleted file mode 100644 index 2e030759d1..0000000000 --- a/files/uk/conflicting/web/javascript/reference/global_objects/evalerror/index.html +++ /dev/null @@ -1,91 +0,0 @@ ---- -title: EvalError.prototype -slug: conflicting/Web/JavaScript/Reference/Global_Objects/EvalError -tags: - - Error - - EvalError - - JavaScript - - помилка -translation_of: Web/JavaScript/Reference/Global_Objects/EvalError -translation_of_original: Web/JavaScript/Reference/Global_Objects/EvalError/prototype -original_slug: Web/JavaScript/Reference/Global_Objects/EvalError/prototype ---- -
{{JSRef}}
- -

Властивість EvalError.prototype є прототипом для конструктора {{jsxref("EvalError")}}.

- -
{{js_property_attributes(0, 0, 0)}}
- -

Опис

- -

Всі екземпляри {{jsxref("EvalError")}} успадковуються від EvalError.prototype. Ви можете використати прототип, щоб додати властивості та методи до усіх екземплярів.

- -

Властивості

- -
-
EvalError.prototype.constructor
-
Функція, яка створила прототип об'єкта.
-
{{jsxref("Error.prototype.message", "EvalError.prototype.message")}}
-
Повідомлення помилки. Хоча ECMA-262 зазначає, що {{jsxref("EvalError")}} повинен мати власну властивість message, у SpiderMonkey він успадковує {{jsxref("Error.prototype.message")}}.
-
{{jsxref("Error.prototype.name", "EvalError.prototype.name")}}
-
Ім'я помилки. Успадковано від {{jsxref("Error")}}.
-
{{jsxref("Error.prototype.fileName", "EvalError.prototype.fileName")}}
-
Шлях до файлу, що спричинив помилку. Успадковано від {{jsxref("Error")}}.
-
{{jsxref("Error.prototype.lineNumber", "EvalError.prototype.lineNumber")}}
-
Номер рядка файлу, в якому виникла помилка. Успадковано від {{jsxref("Error")}}.
-
{{jsxref("Error.prototype.columnNumber", "EvalError.prototype.columnNumber")}}
-
Номер стовпця у рядку, де виникла помилка. Успадковано від {{jsxref("Error")}}.
-
{{jsxref("Error.prototype.stack", "EvalError.prototype.stack")}}
-
Трасування стеку. Успадковано від {{jsxref("Error")}}.
-
- -

Методи

- -

Хоча прототип {{jsxref("EvalError")}} не містить власних методів, екземпляри {{jsxref("EvalError")}} успадковують деякі методи через ланцюжок прототипів.

- -

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

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
СпецифікаціяСтатусКоментар
{{SpecName('ES3')}}{{Spec2('ES3')}}Початкове визначення.
{{SpecName('ES5.1', '#sec-15.11.7.6', 'NativeError.prototype')}}{{Spec2('ES5.1')}}Визначено як NativeError.prototype.
{{SpecName('ES6', '#sec-nativeerror.prototype', 'NativeError.prototype')}}{{Spec2('ES6')}}Визначено як NativeError.prototype.
{{SpecName('ESDraft', '#sec-nativeerror.prototype', 'NativeError.prototype')}}{{Spec2('ESDraft')}}Визначено як NativeError.prototype.
- -

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

- -
- - -

{{Compat("javascript.builtins.EvalError")}}

-
- -

Див. також

- - diff --git a/files/uk/conflicting/web/javascript/reference/global_objects/function/index.html b/files/uk/conflicting/web/javascript/reference/global_objects/function/index.html deleted file mode 100644 index e77a1ed5ef..0000000000 --- a/files/uk/conflicting/web/javascript/reference/global_objects/function/index.html +++ /dev/null @@ -1,101 +0,0 @@ ---- -title: Function.prototype -slug: conflicting/Web/JavaScript/Reference/Global_Objects/Function -tags: - - Function - - JavaScript - - Властивість - - прототип -translation_of: Web/JavaScript/Reference/Global_Objects/Function -translation_of_original: Web/JavaScript/Reference/Global_Objects/Function/prototype -original_slug: Web/JavaScript/Reference/Global_Objects/Function/prototype ---- -
{{JSRef}}
- -

Властивість Function.prototype є об'єктом прототипу {{jsxref("Function")}}.

- -

Опис

- -

Об'єкти {{jsxref("Function")}} успадковуються від Function.prototypeFunction.prototype не можна змінити.

- -

Властивості

- -
-
{{jsxref("Function.prototype.arguments")}} {{deprecated_inline}}
-
Масив, що відповідає аргументам, переданим у функцію. Це застаріла властивість {{jsxref("Function")}}. Використовуйте натомість об'єкт {{jsxref("Functions/arguments", "arguments")}}, доступний всередині функції.
-
{{jsxref("Function.arity")}} {{obsolete_inline}}
-
Вказувала кількість аргументів, очікуваних функцією, але була видалена. Використовуйте натомість властивість {{jsxref("Function.length", "length")}}.
-
{{jsxref("Function.prototype.caller")}} {{non-standard_inline}}
-
Вказує функцію, що викликала функцію, яка виконується.
-
{{jsxref("Function.prototype.length")}}
-
Вказує кількість аргументів, очікуваних функцією.
-
{{jsxref("Function.prototype.name")}}
-
Ім'я функції.
-
{{jsxref("Function.displayName")}} {{non-standard_inline}}
-
Ім'я, що відображається для функції.
-
Function.prototype.constructor
-
Вказує функцію, яка створює прототип об'єкта. Більше інформації дивіться на сторінці {{jsxref("Object.prototype.constructor")}}.
-
- -

Методи

- -
-
{{jsxref("Function.prototype.apply()")}}
-
Викликає функцію та встановлює її this надане значення, аргументи можуть передаватися об'єктом {{jsxref("Array")}}.
-
{{jsxref("Function.prototype.bind()")}}
-
Створює нову функцію, в якої під час виклику this присвоєне надане значення, з заданою послідовністю аргументів, що передують будь-якім іншим наданим аргументам під час виклику нової функції.
-
{{jsxref("Function.prototype.call()")}}
-
Викликає (виконує) функцію та присвоює її this надане значення, аргументи можуть передаватися як є.
-
{{jsxref("Function.prototype.isGenerator()")}} {{non-standard_inline}}
-
Повертає true, якщо функція є генератором; інакше повертає false.
-
{{jsxref("Function.prototype.toSource()")}} {{non-standard_inline}}
-
Повертає рядкове представлення першокоду функції. Заміщує метод {{jsxref("Object.prototype.toSource")}}.
-
{{jsxref("Function.prototype.toString()")}}
-
Повертає рядкове представлення першокоду функції. Заміщує метод {{jsxref("Object.prototype.toString")}}.
-
- -

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

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
СпецифікаціяСтатусКоментар
{{SpecName('ES1')}}{{Spec2('ES1')}}Початкове визначення. Реалізоване у JavaScript 1.1
{{SpecName('ES5.1', '#sec-15.3.5.2', 'Function.prototype')}}{{Spec2('ES5.1')}}
{{SpecName('ES6', '#sec-function-instances-prototype', 'Function.prototype')}}{{Spec2('ES6')}}
{{SpecName('ESDraft', '#sec-function-instances-prototype', 'Function.prototype')}}{{Spec2('ESDraft')}}
- -

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

- -
- - -

{{Compat("javascript.builtins.Function.prototype")}}

-
- -

Див. також

- - diff --git a/files/uk/conflicting/web/javascript/reference/global_objects/generatorfunction/index.html b/files/uk/conflicting/web/javascript/reference/global_objects/generatorfunction/index.html deleted file mode 100644 index e499707efa..0000000000 --- a/files/uk/conflicting/web/javascript/reference/global_objects/generatorfunction/index.html +++ /dev/null @@ -1,67 +0,0 @@ ---- -title: GeneratorFunction.prototype -slug: conflicting/Web/JavaScript/Reference/Global_Objects/GeneratorFunction -tags: - - ECMAScript 2015 - - GeneratorFunction - - JavaScript - - Ітератор - - Властивість - - прототип -translation_of: Web/JavaScript/Reference/Global_Objects/GeneratorFunction -translation_of_original: Web/JavaScript/Reference/Global_Objects/GeneratorFunction/prototype -original_slug: Web/JavaScript/Reference/Global_Objects/GeneratorFunction/prototype ---- -
{{JSRef}}
- -

Властивість GeneratorFunction.prototype відображає прототип {{jsxref("GeneratorFunction")}}.

- -

Опис

- -

Об'єкти {{jsxref("GeneratorFunction")}} успадковуються від GeneratorFunction.prototype. GeneratorFunction.prototype не можна змінювати.

- -

Властивості

- -
-
GeneratorFunction.constructor
-
Початковим значенням є {{jsxref("GeneratorFunction")}}.
-
GeneratorFunction.prototype.prototype
-
Значення дорівнює %GeneratorPrototype%.
-
- -

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

- - - - - - - - - - - - - - - - - - - -
СпецифікаціяСтатусКоментар
{{SpecName('ES2015', '#sec-generatorfunction.prototype', 'GeneratorFunction.prototype')}}{{Spec2('ES2015')}}Початкове визначення.
{{SpecName('ESDraft', '#sec-generatorfunction.prototype', 'GeneratorFunction.prototype')}}{{Spec2('ESDraft')}}
- -

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

- -
- - -

{{Compat("javascript.builtins.GeneratorFunction.prototype")}}

-
- -

Див. також

- - diff --git a/files/uk/conflicting/web/javascript/reference/global_objects/internalerror/index.html b/files/uk/conflicting/web/javascript/reference/global_objects/internalerror/index.html deleted file mode 100644 index 615851285c..0000000000 --- a/files/uk/conflicting/web/javascript/reference/global_objects/internalerror/index.html +++ /dev/null @@ -1,64 +0,0 @@ ---- -title: InternalError.prototype -slug: conflicting/Web/JavaScript/Reference/Global_Objects/InternalError -tags: - - Error - - InternalError - - JavaScript - - Властивість - - прототип -translation_of: Web/JavaScript/Reference/Global_Objects/InternalError -translation_of_original: Web/JavaScript/Reference/Global_Objects/InternalError/prototype -original_slug: Web/JavaScript/Reference/Global_Objects/InternalError/prototype ---- -
{{JSRef}} {{non-standard_header}}
- -

Властивість InternalError.prototype є прототипом конструктора {{jsxref("InternalError")}}.

- -
{{js_property_attributes(0, 0, 0)}}
- -

Опис

- -

Всі екземпляри {{jsxref("InternalError")}} успадковуються від InternalError.prototype. Ви можете використати прототип, щоб додати властивості чи методи до усіх екземплярів.

- -

Властивості

- -
-
InternalError.prototype.constructor
-
Визначає функцію, яка створила прототип об'єкта.
-
{{jsxref("Error.prototype.message", "InternalError.prototype.message")}}
-
Повідомлення помилки. Успадковано від {{jsxref("Error")}}.
-
{{jsxref("Error.prototype.name", "InternalError.prototype.name")}}
-
Ім'я помилки. Успадковано від {{jsxref("Error")}}.
-
{{jsxref("Error.prototype.fileName", "InternalError.prototype.fileName")}}
-
Шлях до файлу, що спричинив помилку. Успадковано від {{jsxref("Error")}}.
-
{{jsxref("Error.prototype.lineNumber", "InternalError.prototype.lineNumber")}}
-
Номер рядка файлу, в якому виникла помилка. Успаковано від {{jsxref("Error")}}.
-
{{jsxref("Error.prototype.columnNumber", "InternalError.prototype.columnNumber")}}
-
Номер стовпця у рядку, де виникла помилка. Успаковано від {{jsxref("Error")}}.
-
{{jsxref("Error.prototype.stack", "InternalError.prototype.stack")}}
-
Трасування стеку. Успаковано від {{jsxref("Error")}}.
-
- -

Методи

- -

Хоча прототип {{jsxref("InternalError")}} не має власних методів, екземпляри {{jsxref("InternalError")}} успадковують деякі методи через ланцюжок прототипів.

- -

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

- -

Не є частиною жодних специфікацій.

- -

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

- -
- - -

{{Compat("javascript.builtins.InternalError")}}

-
- -

Див. також

- - diff --git a/files/uk/conflicting/web/javascript/reference/global_objects/number/index.html b/files/uk/conflicting/web/javascript/reference/global_objects/number/index.html deleted file mode 100644 index a7589f1422..0000000000 --- a/files/uk/conflicting/web/javascript/reference/global_objects/number/index.html +++ /dev/null @@ -1,91 +0,0 @@ ---- -title: Number.prototype -slug: conflicting/Web/JavaScript/Reference/Global_Objects/Number -tags: - - JavaScript - - Number - - Property - - Prototype -translation_of: Web/JavaScript/Reference/Global_Objects/Number -translation_of_original: Web/JavaScript/Reference/Global_Objects/Number/prototype -original_slug: Web/JavaScript/Reference/Global_Objects/Число/prototype ---- -
{{JSRef}}
- -

Властивість Number.prototype являє собою прототип для конструктора класу {{jsxref("Global_Objects/Number", "Number")}}.

- -
{{js_property_attributes(0, 0, 0)}}
- -

Опис

- -

Кожен примірник класу {{jsxref("Global_Objects/Number", "Number")}} успадковує властивості й методи з Number.prototype. Зміни, внесені до прототипа, позначаться на всіх об'єктах, що є примірниками класу {{jsxref("Global_Objects/Number", "Number")}}.

- -

Властивості

- -
-
Number.prototype.constructor
-
Повертає функцію, що створила цей примірник об'єкта. Типово це об'єкт {{jsxref("Global_Objects/Number", "Number")}}, який водночас є і функцією.
-
- -

Методи

- -
-
{{jsxref("Number.prototype.toExponential()")}}
-
Повертає рядок, що містить експоненціальний запис числа.
-
{{jsxref("Number.prototype.toFixed()")}}
-
Повертає рядок, що містить запис числа у форматі з нерухомою комою.
-
{{jsxref("Number.prototype.toLocaleString()")}}
-
Повертає рядок, що містить узалежнений від мови запис числа. Перекриває метод {{jsxref("Object.prototype.toLocaleString()")}}.
-
{{jsxref("Number.prototype.toPrecision()")}}
-
Повертає рядок, що містить запис числа із зазначеною точністю у форматі з нерухомою комою чи експоненціальний.
-
{{jsxref("Number.prototype.toSource()")}} {{non-standard_inline}}
-
Повертає рядок, що містить код мовою JavaScript, який створює об'єкт класу {{jsxref("Global_Objects/Number", "Number")}} з відповідним значенням. Цей код можна використати для створення нового об'єкта. Перекриває метод {{jsxref("Object.prototype.toSource()")}}.
-
{{jsxref("Number.prototype.toString()")}}
-
Повертає рядок, що містить числовий запис значення об'єкта в зазначеній системі числення. Перекриває метод {{jsxref("Object.prototype.toString()")}}.
-
{{jsxref("Number.prototype.valueOf()")}}
-
Повертає {{Glossary("Primitive", "просте числове значення")}} об'єкта. Перекриває метод {{jsxref("Object.prototype.valueOf()")}}.
-
- -

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

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
СпецифікаціяСтатусКоментар
{{SpecName('ES1')}}{{Spec2('ES1')}}Первинне визначення. Реалізовано у JavaScript 1.1.
{{SpecName('ES5.1', '#sec-15.7.4', 'Number')}}{{Spec2('ES5.1')}} 
{{SpecName('ES6', '#sec-properties-of-the-number-prototype-object', 'Number')}}{{Spec2('ES6')}} 
{{SpecName('ESDraft', '#sec-properties-of-the-number-prototype-object', 'Number')}}{{Spec2('ESDraft')}} 
- -

Підтримка веб-переглядачами

- - - -

{{Compat("javascript.builtins.Number.prototype")}}

- -

Див. також

- - diff --git a/files/uk/conflicting/web/javascript/reference/global_objects/promise/index.html b/files/uk/conflicting/web/javascript/reference/global_objects/promise/index.html deleted file mode 100644 index b5affe46e1..0000000000 --- a/files/uk/conflicting/web/javascript/reference/global_objects/promise/index.html +++ /dev/null @@ -1,71 +0,0 @@ ---- -title: Promise.prototype -slug: conflicting/Web/JavaScript/Reference/Global_Objects/Promise -tags: - - JavaScript - - Promise - - ДжаваСкріпт - - Проміс -translation_of: Web/JavaScript/Reference/Global_Objects/Promise -translation_of_original: Web/JavaScript/Reference/Global_Objects/Promise/prototype -original_slug: Web/JavaScript/Reference/Global_Objects/Promise/prototype ---- -
{{JSRef}}
- -

Параметр Promise.prototype відображає прототип для конструктора {{jsxref("Promise")}} constructor.

- -
{{js_property_attributes(0,0,0)}}
- -

Опис

- -

Екземпляри {{jsxref("Promise")}} успадковуються від {{jsxref("Promise.prototype")}}. Ви можете використовувати прототип конструктора, щоб добавляти параметри або методи до всіх екземплярів Promise.

- -

Параметри

- -
-
Promise.prototype.constructor
-
Повертає функцію, яка створила прототип екземпляра. Це є функція {{jsxref("Promise")}} по замовчуванню.
-
- -

Методи

- -
-
{{jsxref("Promise.catch", "Promise.prototype.catch(onRejected)")}}
-
Добавляє колбек обробник відхилення проміса, і повертає новий проміс, який вирішується значенням, яке повертається з функції колбеку, якщо вона була викликана, або його початковий результат виконання, якщо даний проміс був виконаний.
-
{{jsxref("Promise.then", "Promise.prototype.then(onFulfilled, onRejected)")}}
-
Добавляє до проміса функції колбеки для випадків, коли проміс був виконаний (onFulfilled) і відхилений (onRejected) і повертає новий проміс, який вирішується значенням, яке було повернуто з onFulfilled функції колбеку, або з початковим значенням, яке було вирішено, коли даний проміс не був оброблений (тобто коли обробники onFulfilled або onRejected не є функцією).
-
- -

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

- - - - - - - - - - - - - - - - - - - -
СпецифікаціяСтатусКоментар
{{SpecName('ES6', '#sec-promise.prototype', 'Promise.prototype')}}{{Spec2('ES6')}}Початкове визначення.
{{SpecName('ESDraft', '#sec-promise.prototype', 'Promise.prototype')}}{{Spec2('ESDraft')}} 
- -

Сумісність із браузерами

- - - -

{{Compat("javascript/promise","Promise.prototype")}}

- -

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

- - diff --git a/files/uk/conflicting/web/javascript/reference/global_objects/rangeerror/index.html b/files/uk/conflicting/web/javascript/reference/global_objects/rangeerror/index.html deleted file mode 100644 index a1688fe918..0000000000 --- a/files/uk/conflicting/web/javascript/reference/global_objects/rangeerror/index.html +++ /dev/null @@ -1,91 +0,0 @@ ---- -title: RangeError.prototype -slug: conflicting/Web/JavaScript/Reference/Global_Objects/RangeError -tags: - - Error - - JavaScript - - RangeError - - прототип -translation_of: Web/JavaScript/Reference/Global_Objects/RangeError -translation_of_original: Web/JavaScript/Reference/Global_Objects/RangeError/prototype -original_slug: Web/JavaScript/Reference/Global_Objects/RangeError/prototype ---- -
{{JSRef}}
- -

Властивість RangeError.prototype є прототипом для конструктора {{jsxref("RangeError")}}

- -
{{js_property_attributes(0, 0, 0)}}
- -

Опис

- -

Всі екземпляри {{jsxref("RangeError")}} успадковуються від RangeError.prototype. Ви можете використати прототип, щоб додати властивості чи методи до усіх екземплярів.

- -

Властивості

- -
-
RangeError.prototype.constructor
-
Визначає функцію, яка створила прототип об'єкта.
-
{{jsxref("Error.prototype.message", "RangeError.prototype.message")}}
-
Повідомлення помилки. Хоча ECMA-262 зазначає, що {{jsxref("RangeError")}} має надавати власну властивість message, у SpiderMonkey, він успадковує {{jsxref("Error.prototype.message")}}.
-
{{jsxref("Error.prototype.name", "RangeError.prototype.name")}}
-
Ім'я помилки. Успаковано від {{jsxref("Error")}}.
-
{{jsxref("Error.prototype.fileName", "RangeError.prototype.fileName")}}
-
Шлях до файлу, що спричинив помилку. Успаковано від {{jsxref("Error")}}.
-
{{jsxref("Error.prototype.lineNumber", "RangeError.prototype.lineNumber")}}
-
Номер рядка файлу, в якому виникла помилка. Успаковано від {{jsxref("Error")}}.
-
{{jsxref("Error.prototype.columnNumber", "RangeError.prototype.columnNumber")}}
-
Номер стовпця у рядку, де виникла помилка. Успаковано від {{jsxref("Error")}}.
-
{{jsxref("Error.prototype.stack", "RangeError.prototype.stack")}}
-
Трасування стеку. Успаковано від {{jsxref("Error", "Error")}}.
-
- -

Методи

- -

Хоча прототип {{jsxref("RangeError")}} не містить власних методів, екземпляри {{jsxref("RangeError")}} успадковують деякі методи через ланцюжок прототипів.

- -

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

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
СпецифікаціяСтатусКоментар
{{SpecName('ES3')}}{{Spec2('ES3')}}Початкове визначення.
{{SpecName('ES5.1', '#sec-15.11.7.6', 'NativeError.prototype')}}{{Spec2('ES5.1')}}Визначено як NativeError.prototype.
{{SpecName('ES6', '#sec-nativeerror.prototype', 'NativeError.prototype')}}{{Spec2('ES6')}}Визначено як NativeError.prototype.
{{SpecName('ESDraft', '#sec-nativeerror.prototype', 'NativeError.prototype')}}{{Spec2('ESDraft')}}Визначено як NativeError.prototype.
- -

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

- -
- - -

{{Compat("javascript.builtins.RangeError")}}

-
- -

Див. також

- - diff --git a/files/uk/conflicting/web/javascript/reference/global_objects/referenceerror/index.html b/files/uk/conflicting/web/javascript/reference/global_objects/referenceerror/index.html deleted file mode 100644 index 3d1102cf05..0000000000 --- a/files/uk/conflicting/web/javascript/reference/global_objects/referenceerror/index.html +++ /dev/null @@ -1,92 +0,0 @@ ---- -title: ReferenceError.prototype -slug: conflicting/Web/JavaScript/Reference/Global_Objects/ReferenceError -tags: - - Error - - JavaScript - - ReferenceError - - помилка - - прототип -translation_of: Web/JavaScript/Reference/Global_Objects/ReferenceError -translation_of_original: Web/JavaScript/Reference/Global_Objects/ReferenceError/prototype -original_slug: Web/JavaScript/Reference/Global_Objects/ReferenceError/prototype ---- -
{{JSRef}}
- -

Властивість ReferenceError.prototype є прототипом для конструктора {{jsxref("ReferenceError")}}.

- -
{{js_property_attributes(0, 0, 0)}}
- -

Опис

- -

Всі екземпляри {{jsxref("ReferenceError")}} успадковуються від ReferenceError.prototype. Ви можете використати прототип, щоб додати властивості чи методи до усіх екземплярів.

- -

Властивості

- -
-
ReferenceError.prototype.constructor
-
Визначає функцію, яка створила прототип об'єкта.
-
{{jsxref("Error.prototype.message", "ReferenceError.prototype.message")}}
-
Повідомлення помилки. Хоча ECMA-262 зазначає, що {{jsxref("ReferenceError")}} повинен мати власну властивість message, у SpiderMonkey він успадковує {{jsxref("Error.prototype.message")}}.
-
{{jsxref("Error.prototype.name", "ReferenceError.prototype.name")}}
-
Ім'я помилки. Успадковано від {{jsxref("Error")}}.
-
{{jsxref("Error.prototype.fileName", "ReferenceError.prototype.fileName")}}
-
Шлях до файлу, що спричинив помилку. Успаковано від {{jsxref("Error")}}.
-
{{jsxref("Error.prototype.lineNumber", "ReferenceError.prototype.lineNumber")}}
-
Номер рядка файлу, в якому виникла помилка. Успаковано від {{jsxref("Error")}}.
-
{{jsxref("Error.prototype.columnNumber", "ReferenceError.prototype.columnNumber")}}
-
Номер стовпця у рядку, де виникла помилка. Успаковано від {{jsxref("Error")}}.
-
{{jsxref("Error.prototype.stack", "ReferenceError.prototype.stack")}}
-
Трасування стеку. Успаковано від {{jsxref("Error")}}.
-
- -

Методи

- -

Хоча прототип {{jsxref("ReferenceError")}} не містить власних методів, екземпляри {{jsxref("ReferenceError")}} успадковують деякі методи через ланцюжок прототипів.

- -

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

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
СпецифікаціяСтатусКоментар
{{SpecName('ES3')}}{{Spec2('ES3')}}Початкове визначення.
{{SpecName('ES5.1', '#sec-15.11.7.6', 'NativeError.prototype')}}{{Spec2('ES5.1')}}Визначено як NativeError.prototype.
{{SpecName('ES6', '#sec-nativeerror.prototype', 'NativeError.prototype')}}{{Spec2('ES6')}}Визначено як NativeError.prototype.
{{SpecName('ESDraft', '#sec-nativeerror.prototype', 'NativeError.prototype')}}{{Spec2('ESDraft')}}Визначено як NativeError.prototype.
- -

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

- -
- - -

{{Compat("javascript.builtins.ReferenceError")}}

-
- -

Див. також

- - diff --git a/files/uk/conflicting/web/javascript/reference/global_objects/syntaxerror/index.html b/files/uk/conflicting/web/javascript/reference/global_objects/syntaxerror/index.html deleted file mode 100644 index f872f5d40c..0000000000 --- a/files/uk/conflicting/web/javascript/reference/global_objects/syntaxerror/index.html +++ /dev/null @@ -1,90 +0,0 @@ ---- -title: SyntaxError.prototype -slug: conflicting/Web/JavaScript/Reference/Global_Objects/SyntaxError -tags: - - Error - - JavaScript - - Prototype - - SyntaxError - - помилка -translation_of: Web/JavaScript/Reference/Global_Objects/SyntaxError -translation_of_original: Web/JavaScript/Reference/Global_Objects/SyntaxError/prototype -original_slug: Web/JavaScript/Reference/Global_Objects/SyntaxError/prototype ---- -
{{JSRef}}
- -

Властивість SyntaxError.prototype є прототипом для конструктора {{jsxref("SyntaxError")}}.

- -

Опис

- -

Всі примірники {{jsxref("SyntaxError")}} успадковуються від SyntaxError.prototype, тож ви можете скористатися прототипом задля додавання властивостей чи методів до всіх примірників.

- -

Властивості

- -
-
SyntaxError.prototype.constructor
-
Функція, що створює прототип об'єкта.
-
{{jsxref("Error.prototype.message", "SyntaxError.prototype.message")}}
-
Повідомлення помилки. Попри те, що в ECMA-262 зазначено, що {{jsxref("SyntaxError")}} мусить мати свою властивість message, у SpiderMonkey він насправді успадковує {{jsxref("Error.prototype.message")}}.
-
{{jsxref("Error.prototype.name", "SyntaxError.prototype.name")}}
-
Ім'я помилки. Успадковано від {{jsxref("Global_Objects/Error", "Error")}}.
-
{{jsxref("Error.prototype.fileName", "SyntaxError.prototype.fileName")}}
-
Шлях до файла, де сталася ця помилка. Успадковано від {{jsxref("Global_Objects/Error", "Error")}}.
-
{{jsxref("Error.prototype.lineNumber", "SyntaxError.prototype.lineNumber")}}
-
Номер рядка у файлі, де сталася ця помилка. Успадковано від {{jsxref("Global_Objects/Error", "Error")}}.
-
{{jsxref("Error.prototype.columnNumber", "SyntaxError.prototype.columnNumber")}}
-
Номер символа у рядку, де сталася ця помилка. Успадковано від {{jsxref("Global_Objects/Error", "Error")}}.
-
{{jsxref("Error.prototype.stack", "SyntaxError.prototype.stack")}}
-
Стек викликів. Успадковано від {{jsxref("Global_Objects/Error", "Error")}}.
-
- -

Методи

- -

Хоча прототип {{jsxref("SyntaxError")}} не містить власних методів, примірники {{jsxref("SyntaxError")}} успадковують деякі методи від ланцюжка прототипів.

- -

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

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
СпецифікаціяСтатусКоментар
{{SpecName('ES3')}}{{Spec2('ES3')}}Первинне визначення.
{{SpecName('ES5.1', '#sec-15.11.7.6', 'NativeError.prototype')}}{{Spec2('ES5.1')}}Визначено як NativeError.prototype.
{{SpecName('ES6', '#sec-nativeerror.prototype', 'NativeError.prototype')}}{{Spec2('ES6')}}Визначено як NativeError.prototype.
{{SpecName('ESDraft', '#sec-nativeerror.prototype', 'NativeError.prototype')}}{{Spec2('ESDraft')}}Визначено як NativeError.prototype.
- -

Підтримка веб-переглядачами

- -
- - -

{{Compat("javascript.builtins.SyntaxError")}}

-
- -

Див. також

- - diff --git a/files/uk/conflicting/web/javascript/reference/global_objects/typeerror/index.html b/files/uk/conflicting/web/javascript/reference/global_objects/typeerror/index.html deleted file mode 100644 index 0caac5e6fa..0000000000 --- a/files/uk/conflicting/web/javascript/reference/global_objects/typeerror/index.html +++ /dev/null @@ -1,89 +0,0 @@ ---- -title: TypeError.prototype -slug: conflicting/Web/JavaScript/Reference/Global_Objects/TypeError -tags: - - Error - - JavaScript - - TypeError - - помилка -translation_of: Web/JavaScript/Reference/Global_Objects/TypeError -translation_of_original: Web/JavaScript/Reference/Global_Objects/TypeError/prototype -original_slug: Web/JavaScript/Reference/Global_Objects/TypeError/prototype ---- -
{{JSRef}}
- -

Властивість TypeError.prototype є прототипом для конструктора {{jsxref("TypeError")}}.

- -

Опис

- -

Всі екземпляри {{jsxref("TypeError")}} успадковуються від TypeError.prototype. Ви можете використати прототип, щоб додати властивості чи методи до усіх екземплярів.

- -

Властивості

- -
-
TypeError.prototype.constructor
-
Визначає функцію, яка створила прототип об'єкта.
-
{{jsxref("Error.prototype.message", "TypeError.prototype.message")}}
-
Повідомлення помилки. Хоча ECMA-262 зазначає, що {{jsxref("TypeError")}} повинен мати власну властивість message, у SpiderMonkey, він успадковує {{jsxref("Error.prototype.message")}}.
-
{{jsxref("Error.prototype.name", "TypeError.prototype.name")}}
-
Ім'я помилки. Успадковано від {{jsxref("Error")}}.
-
{{jsxref("Error.prototype.fileName", "TypeError.prototype.fileName")}}
-
Шлях до файлу, що спричинив помилку. Успаковано від {{jsxref("Error")}}.
-
{{jsxref("Error.prototype.lineNumber", "TypeError.prototype.lineNumber")}}
-
Номер рядка файлу, в якому виникла помилка. Успаковано від {{jsxref("Error")}}.
-
{{jsxref("Error.prototype.columnNumber", "TypeError.prototype.columnNumber")}}
-
Номер стовпця у рядку, де виникла помилка. Успаковано від {{jsxref("Error")}}.
-
{{jsxref("Error.prototype.stack", "TypeError.prototype.stack")}}
-
Трасування стеку. Успаковано від {{jsxref("Error")}}.
-
- -

Методи

- -

Хоча прототип {{jsxref("TypeError")}} не містить власних методів, екземпляри {{jsxref("TypeError")}} успадковують деякі методи через ланцюжок прототипів.

- -

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

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
СпецифікаціяСтатусКоментар
{{SpecName('ES3', '#sec-15.11.7.6', 'NativeError.prototype')}}{{Spec2('ES3')}}Початкове визначення.
{{SpecName('ES5.1', '#sec-15.11.7.6', 'NativeError.prototype')}}{{Spec2('ES5.1')}}Визначено як  NativeError.prototype.
{{SpecName('ES6', '#sec-nativeerror.prototype', 'NativeError.prototype')}}{{Spec2('ES6')}}Визначено як  NativeError.prototype.
{{SpecName('ESDraft', '#sec-nativeerror.prototype', 'NativeError.prototype')}}{{Spec2('ESDraft')}} 
- -

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

- -
- - -

{{Compat("javascript.builtins.TypeError")}}

-
- -

Див. також

- - diff --git a/files/uk/conflicting/web/javascript/reference/global_objects/urierror/index.html b/files/uk/conflicting/web/javascript/reference/global_objects/urierror/index.html deleted file mode 100644 index edc28b2064..0000000000 --- a/files/uk/conflicting/web/javascript/reference/global_objects/urierror/index.html +++ /dev/null @@ -1,90 +0,0 @@ ---- -title: URIError.prototype -slug: conflicting/Web/JavaScript/Reference/Global_Objects/URIError -tags: - - Error - - JavaScript - - URIError - - помилка - - прототип -translation_of: Web/JavaScript/Reference/Global_Objects/URIError -translation_of_original: Web/JavaScript/Reference/Global_Objects/URIError/prototype -original_slug: Web/JavaScript/Reference/Global_Objects/URIError/prototype ---- -
{{JSRef}}
- -

Властивість URIError.prototype є прототипом для конструктора {{jsxref("URIError")}}.

- -

Опис

- -

Всі екземпляри {{jsxref("URIError")}} успадковуються від URIError.prototype. Ви можете використати прототип, щоб додати властивості чи методи до усіх екземплярів.

- -

Властивості

- -
-
URIError.prototype.constructor
-
Визначає функцію, яка створила прототип об'єкта.
-
{{jsxref("Error.prototype.message", "URIError.prototype.message")}}
-
Повідомлення помилки. Хоча ECMA-262 зазначає, що {{jsxref("URIError")}} повинен мати власну властивість message, у SpiderMonkey, він успадковує {{jsxref("Error.prototype.message")}}.
-
{{jsxref("Error.prototype.name", "URIError.prototype.name")}}
-
Ім'я помилки. Успадковано від {{jsxref("Error")}}.
-
{{jsxref("Error.prototype.fileName", "URIError.prototype.fileName")}}
-
Шлях до файлу, що спричинив помилку. Успаковано від {{jsxref("Error")}}.
-
{{jsxref("Error.prototype.lineNumber", "URIError.prototype.lineNumber")}}
-
Номер рядка файлу, в якому виникла помилка. Успаковано від {{jsxref("Error")}}.
-
{{jsxref("Error.prototype.columnNumber", "URIError.prototype.columnNumber")}}
-
Номер стовпця у рядку, де виникла помилка. Успаковано від {{jsxref("Error")}}.
-
{{jsxref("Error.prototype.stack", "URIError.prototype.stack")}}
-
Трасування стеку. Успаковано від {{jsxref("Error")}}.
-
- -

Методи

- -

Хоча прототип {{jsxref("URIError")}} не містить власних методів, екземпляри {{jsxref("URIError")}} успадковують деякі методи через ланцюжок прототипів.

- -

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

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
СпецифікаціяСтатусКоментар
{{SpecName('ES3', '#sec-15.11.7.6', 'NativeError.prototype')}}{{Spec2('ES3')}}Початкове визначення.
{{SpecName('ES5.1', '#sec-15.11.7.6', 'NativeError.prototype')}}{{Spec2('ES5.1')}}Визначено як  NativeError.prototype.
{{SpecName('ES6', '#sec-nativeerror.prototype', 'NativeError.prototype')}}{{Spec2('ES6')}}Визначено як  NativeError.prototype.
{{SpecName('ESDraft', '#sec-nativeerror.prototype', 'NativeError.prototype')}}{{Spec2('ESDraft')}}Визначено як  NativeError.prototype.
- -

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

- -
- - -

{{Compat("javascript.builtins.URIError")}}

-
- -

Див. також

- - diff --git a/files/uk/conflicting/web/javascript/reference/operators/index.html b/files/uk/conflicting/web/javascript/reference/operators/index.html deleted file mode 100644 index 5afab5c852..0000000000 --- a/files/uk/conflicting/web/javascript/reference/operators/index.html +++ /dev/null @@ -1,315 +0,0 @@ ---- -title: Арифметичні оператори -slug: conflicting/Web/JavaScript/Reference/Operators -tags: - - JavaScript - - Оператор -translation_of: Web/JavaScript/Reference/Operators -translation_of_original: Web/JavaScript/Reference/Operators/Arithmetic_Operators -original_slug: Web/JavaScript/Reference/Operators/Arithmetic_Operators ---- -
{{jsSidebar("Operators")}}
- -

Арифметичні оператори приймають числові значення (або літерали, або змінні) в якості операндів та повертають єдине числове значення. Стандартними арифметичними операторами є додавання (+), віднімання (-), множення (*) та ділення (/).

- -
{{EmbedInteractiveExample("pages/js/expressions-arithmetic.html")}}
- - - -

Додавання (+)

- -

Оператор додавання повертає суму числових операндів або об'єднання рядків.

- -

Синтаксис

- -
Оператор: x + y
-
- -

Приклади

- -
// Number + Number -> сума
-1 + 2 // 3
-
-// Boolean + Number -> сума
-true + 1 // 2
-
-// Boolean + Boolean -> сума
-false + false // 0
-
-// Number + String -> об'єднання
-5 + 'foo' // "5foo"
-
-// String + Boolean -> об'єднання
-'foo' + false // "foofalse"
-
-// String + String -> об'єднання
-'foo' + 'bar' // "foobar"
-
- -

Віднімання (-)

- -

Оператор віднімання проводить операцію віднімання між двома операндами, повертаючи різницю між ними.

- -

Синтаксис

- -
Оператор: x - y
-
- -

Приклади

- -
5 - 3 // 2
-3 - 5 // -2
-'foo' - 3 // NaN
- -

Ділення (/)

- -

Оператор ділення повертає частку своїх операндів, де лівий операнд є діленим, а правий операнд є дільником.

- -

Синтаксис

- -
Оператор: x / y
-
- -

Приклади

- -
1 / 2      // повертає 0.5 у JavaScript
-1 / 2      // повертає 0 у Java
-// (жодне з чисел не є явно числом з рухомою комою)
-
-1.0 / 2.0  // повертає 0.5 у JavaScript та Java
-
-2.0 / 0    // повертає Infinity у JavaScript
-2.0 / 0.0  // також повертає Infinity
-2.0 / -0.0 // повертає -Infinity у JavaScript
- -

Множення (*)

- -

Оператор множення повертає добуток операндів.

- -

Синтаксис

- -
Оператор: x * y
-
- -

Приклади

- -
2 * 2 // 4
--2 * 2 // -4
-Infinity * 0 // NaN
-Infinity * Infinity // Infinity
-'foo' * 2 // NaN
-
- -

Остача (%)

- -

Оператор остачі повертає остачу від ділення першого операнду на другий. Він завжди приймає знак діленого.

- -

Синтаксис

- -
Оператор: var1 % var2
-
- -

Приклади

- -
12 % 5 // 2
--1 % 2 // -1
-1 % -2 // 1
-NaN % 2 // NaN
-1 % 2 // 1
-2 % 3 // 2
--4 % 2 // -0
-5.5 % 2 // 1.5
-
- -

Піднесення до степеня (**)

- -

Оператор піднесення до степеня повертає результат піднесення першого операнду до показника степеня другого операнду. Тобто, var1var2 у наведеній інструкції, де var1 та var2 є змінними. Оператор піднесення до степеня правоасоціативний. a ** b ** c дорівнює a ** (b ** c).

- -

Синтаксис

- -
Оператор: var1 ** var2
-
- -

Примітки

- -

У більшості мов, таких як PHP, Python та інших, які мають оператор піднесення до степеня (**), оператор піднесення до степеня має вищий пріоритет, ніж унарні оператори, такі як унарний + та унарний -, але існує кілька винятків. Наприклад, у Bash оператор ** має нижчий пріоритет, ніж унарні оператори. У JavaScript неможливо написати неоднозначний вираз піднесення до степеня, тобто, ви не можете поставити унарний оператор (+/-/~/!/delete/void/typeof) одразу перед числом основи степеня.

- -
-2 ** 2;
-// 4 у Bash, -4 у інших мовах.
-// Це помилка у JavaScript, оскільки операція неоднозначна.
-
-
--(2 ** 2);
-// -4 у JavaScript, а наміри автора однозначні.
-
- -

Приклади

- -
2 ** 3 // 8
-3 ** 2 // 9
-3 ** 2.5 // 15.588457268119896
-10 ** -1 // 0.1
-NaN ** 2 // NaN
-
-2 ** 3 ** 2 // 512
-2 ** (3 ** 2) // 512
-(2 ** 3) ** 2 // 64
-
- -

Щоб поміняти знак результату виразу піднесення до степеня:

- -
-(2 ** 2) // -4
-
- -

Щоб зробити основу степеня у виразі від'ємним числом:

- -
(-2) ** 2 // 4
-
- -
-

Заувага: JavaScript також має бітовий оператор ^ (логічний XOR). ** та ^ відрізняються (наприклад: 2 ** 3 === 8, тоді як 2 ^ 3 === 1.)

-
- -

Інкремент (++)

- -

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

- - - -

Синтаксис

- -
Оператор: x++ або ++x
-
- -

Приклади

- -
// Постфіксний
-var x = 3;
-y = x++; // y = 3, x = 4
-
-// Префіксний
-var a = 2;
-b = ++a; // a = 3, b = 3
-
- -

Декремент (--)

- -

Оператор декременту зменшує свій операнд (віднімає одиницю) та повертає його значення.

- - - -

Синтаксис

- -
Оператор: x-- або --x
-
- -

Приклади

- -
// Постфіксний
-var x = 3;
-y = x--; // y = 3, x = 2
-
-// Префіксний
-var a = 2;
-b = --a; // a = 1, b = 1
-
- -

Унарний мінус (-)

- -

Унарний мінус ставиться перед своїм операндом та міняє його знак на протилежний.

- -

Синтаксис

- -
Оператор: -x
-
- -

Приклади

- -
var x = 3;
-y = -x; // y = -3, x = 3
-
-// Унарний мінус може перетворити нечислове значення на число
-var x = "4";
-y = -x; // y = -4
-
- -

Унарний плюс (+)

- -

Унарний плюс ставиться перед своїм операндом та повертає значення операнду, але намагається перетворити його на число, якщо він не є числом. Хоча унарний мінус (-) також вміє перетворювати нечислові значення, унарний плюс найшвидший та найкращий спосіб перетворити щось у число, тому що він не виконує ніяких інших операцій з числом. Він може перетворювати рядкові представлення цілих чисел та чисел з рухомою комою, а також нерядкові значення true, false та null. Підтримуються цілі числа у десятковому та шістнадцятковому форматах. Підтримуються від'ємні числа (хоча не у шістнадцятковому форматі). Якщо оператор не може розібрати певне значення, він поверне {{jsxref("NaN")}}.

- -

Синтаксис

- -
Оператор: +x
-
- -

Приклади

- -
+3     // 3
-+'3'   // 3
-+true  // 1
-+false // 0
-+null  // 0
-+function(val){ return val } // NaN
-
- -

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

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
СпецифікаціяСтатусКоментар
{{SpecName('ESDraft', '#sec-additive-operators')}}{{Spec2('ESDraft')}}
{{SpecName('ES2016', '#sec-postfix-expressions')}}{{Spec2('ES2016')}}Доданий Оператор піднесення до степеня.
{{SpecName('ES2017', '#sec-postfix-expressions')}}{{Spec2('ES2017')}}
{{SpecName('ES2015', '#sec-postfix-expressions')}}{{Spec2('ES2015')}}Визначені у кількох розділах специфікації: Адитивні оператори, мультиплікативні оператори, постфіксні вирази, унарні оператори.
{{SpecName('ES5.1', '#sec-11.3')}}{{Spec2('ES5.1')}}Визначені у кількох розділах специфікації: Адитивні оператори, мультиплікативні оператори, постфіксні вирази, унарні оператори.
{{SpecName('ES1')}}{{Spec2('ES1')}}Початкове визначення.
- -

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

- - - -

{{Compat("javascript.operators.arithmetic")}}

- -

Див. також

- - diff --git a/files/uk/conflicting/web/javascript/reference/operators/spread_syntax/index.html b/files/uk/conflicting/web/javascript/reference/operators/spread_syntax/index.html deleted file mode 100644 index fdf9637511..0000000000 --- a/files/uk/conflicting/web/javascript/reference/operators/spread_syntax/index.html +++ /dev/null @@ -1,284 +0,0 @@ ---- -title: Оператор розпакування -slug: conflicting/Web/JavaScript/Reference/Operators/Spread_syntax -tags: - - Iterator - - JavaScript - - Operator - - Ітератор - - Оператор -translation_of: Web/JavaScript/Reference/Operators/Spread_syntax -translation_of_original: Web/JavaScript/Reference/Operators/Spread_operator -original_slug: Web/JavaScript/Reference/Operators/Оператор_розпакування ---- -
{{jsSidebar("Operators")}}
- -

Оператор розпакування дозволяє розкласти колекцію в місця, де потрібні нуль чи декілька аргументів (як от виклики функцій), або декілька елементів (масиви), чи декілька змінних (деструктуризаційне присвоєння). Також можна розкласти об’єкт у місця де потрібні нуль чи більше пар ключ-значення (для оголошення об’єктів).

- -

Синтаксис

- -

Для виклику функцій:

- -
myFunction(...iterableObj);
-
- -

Для масивів:

- -
[...iterableObj, 4, 5, 6];
- -

Для об’єктів (нове в ECMAScript; чернетка в 3-ій стадії):

- -
let objClone = { ...obj };
- -

Приклади

- -

Розпакування у викликах функції

- -

Заміна apply

- -

Приклад: {{jsxref( "Function.prototype.apply")}} прийнято використовувати у випадках, коли потрібно застосувати елементи масиву як аргументи функції.

- -
function myFunction(x, y, z) { }
-var args = [0, 1, 2];
-myFunction.apply(null, args);
- -

З розпакуванням тепер отак:

- -
function myFunction(x, y, z) { }
-var args = [0, 1, 2];
-myFunction(...args);
- -

Оператор розпакування може бути застосований до будь-якого аргументу та може бути застосований кілька разів.

- -
function myFunction(v, w, x, y, z) { }
-var args = [0, 1];
-myFunction(-1, ...args, 2, ...[3]);
- -

Apply для new

- -

Викликаючи конструктор з new, неможливо напряму використовувати на ньому apply (apply робить [[Call]], а не [[Construct]]). Проте з оператором розпакування можна легко розкладати масив у аргументи конструктора:

- -
var dateFields = [1970, 0, 1]; // 1 Січ 1970
-// var d = new Date.apply(dateFields) не спрацює. Викине TypeError
-var d = new Date(...dateFields); // вуаля
- -

Розпакування в масивах

- -

Ліпше оголошення масивів

- -

Без розпакування, коли потрібно створити новий масив так, щоб якийсь існуючий був його частиною, старого синтаксису оголошення масиву не достатньо та необхідно використовувати комбінацію методів push, splice, concat, тощо. З оператором розпакування це стає значно лаконічніше:

- -
var parts = ['shoulders', 'knees'];
-var lyrics = ['head', ...parts, 'and', 'toes'];
-// ["head", "shoulders", "knees", "and", "toes"]
- -

Як і з розпакуванням списку аргументів, ... можна використовувати будь-де в оголошенні масиву та будь-яку кількість разів.

- -

Копіювання масиву

- -
var arr = [1, 2, 3];
-var arr2 = [...arr]; // так само як arr.slice()
-arr2.push(4);
-
-// arr2 стає [1, 2, 3, 4]
-// arr залишається незміненим
- -

Зауваження: оператор розпакування при копіюванні масиву йде лише на один рівень вглиб. Таким чином він не придатний для копіювання багатовимірних масивів, що видно з наступного прикладу (те саме з {{jsxref("Object.assign()")}} та розпакуванням об’єктів).

- -
var a = [[1], [2], [3]];
-var b = [...a];
-b.shift().shift(); // 1
-// Тепер масив a також змінено: [[], [2], [3]]
- -

Ліпше злиття масивів

- -

{{jsxref("Array.concat")}} часто використовується, щоб додати один масив у кінець іншого. Без розпакування це робиться так:

- -
var arr1 = [0, 1, 2];
-var arr2 = [3, 4, 5];
-// Доддати всі елементи з arr2 в arr1
-arr1 = arr1.concat(arr2);
- -

З розпакуванням це стає:

- -
var arr1 = [0, 1, 2];
-var arr2 = [3, 4, 5];
-arr1 = [...arr1, ...arr2];
- -

{{jsxref("Array.unshift")}} часто використовується для того, щоб вставити значення з одного масиву в початок іншого. Без розпакування це робиться так:

- -
var arr1 = [0, 1, 2];
-var arr2 = [3, 4, 5];
-// Вставити всі елементи з arr2 в початок arr1
-Array.prototype.unshift.apply(arr1, arr2) // arr1 тепер [3, 4, 5, 0, 1, 2]
- -

З розпакуванням це стає:

- -
var arr1 = [0, 1, 2];
-var arr2 = [3, 4, 5];
-arr1 = [...arr2, ...arr1]; // arr1 тепер [3, 4, 5, 0, 1, 2]
- -

Розпакування об’єктів

- -

Пропозиція Rest/Spread Properties for ECMAScript (стадія 3) додає розпакування до об’єктів. It copies own enumerable properties from a provided object onto a new object.

- -

Однорівневе клонування (без прототипу) чи злиття об’єктів тепер можливе використовуючи коротший запис ніж {{jsxref("Object.assign()")}}.

- -
var obj1 = { foo: 'bar', x: 42 };
-var obj2 = { foo: 'baz', y: 13 };
-
-var clonedObj = { ...obj1 };
-// Object { foo: "bar", x: 42 }
-
-var mergedObj = { ...obj1, ...obj2 };
-// Object { foo: "baz", x: 42, y: 13 }
- -

Зауваж, що {{jsxref("Object.assign()")}} викликає сетери, а оператор розпакування - ні.

- -

Лише для ітерованих

- -

Розпакування може бути застосоване лише для ітерованик об’єктів:

- -
var obj = {'key1': 'value1'};
-var array = [...obj]; // TypeError: obj is not iterable
- -

Зауваження: наразі (липень 2017) можна говорити про появу розпакування об’єктів у специфікації (дивись попередній підзаголовок). Але ще не до кінця зрозуміло як працюватиме вищенаведений приклад, адже ще немає конкретного рішення щодо цього у спецефікації. Тобто тепер ти можеш розпакувати об’єкт в об’єкт, але не зрозуміло, що станеться, якщо об’єкт розпаковувати у масив і навпаки, масив у об’єкт. Наприклад транспілятор babel вертає наступні результати:

- -
var obj = {'key1': 'value1'};
-var array = [...obj]; // запише в array пустий масив []
-
-var arr = [1,1,1];
-var obj1 = {...arr}; // запише в obj1 {'0': 1, '1': 1, '2': 1}
- -

Розпакування великих колекцій

- -

Використовуючи розпакування зважай на можливість досягнення ліміту аргументів, встановленого у JavaScript рушії, адже оператор розпакування витягує всі елементи колекції в стек, скільки б їх не було. Дивись apply() щоб дізнатись більше.

- -

Оператор решти

- -

Оператор решти виглядає точно так само як і оператор розпакування. До певної міри, він протилежний оператору розпакування - оператор розпакування розкладає колекцію на елементи, а оператор решти, натомість, складає кілька елементів у колекцію. Дивись решта параметрів.

- -

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

- - - - - - - - - - - - - - - - - - - - - - - - - - -
СпецифікаціяСтанКоментар
{{SpecName('ES2015', '#sec-array-initializer')}}{{Spec2('ES2015')}}Визначено в деяких секціях специфікацій: Array Initializer, Argument Lists
{{SpecName('ESDraft', '#sec-array-initializer')}}{{Spec2('ESDraft')}}Без змін.
Rest/Spread Properties for ECMAScriptЧернеткаЧернетка в 3 стадії
- -

Сумісність з браузерами

- -

{{CompatibilityTable}}

- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FeatureChromeFirefox (Gecko)Internet ExplorerOperaSafari (WebKit)
Spread operation in array literals{{CompatChrome("46")}}{{ CompatGeckoDesktop("16") }}{{CompatIE("Edge/10240")}}{{CompatNo}}7.1
Spread operation in function calls{{CompatChrome("46")}}{{ CompatGeckoDesktop("27") }}{{CompatIE("Edge/10240")}}{{CompatNo}}7.1
Spread operation in destructuring{{CompatChrome("49")}}{{ CompatGeckoDesktop("34") }}{{CompatNo}}{{CompatUnknown}}{{CompatUnknown}}
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FeatureAndroidAndroid WebviewFirefox Mobile (Gecko)IE MobileOpera MobileSafari MobileChrome for Android
Spread operation in array literals{{CompatNo}}{{CompatChrome("46")}}{{ CompatGeckoMobile("16") }}{{CompatNo}}{{CompatNo}}8{{CompatChrome("46")}}
Spread operation in function calls{{CompatNo}}{{CompatChrome("46")}}{{ CompatGeckoMobile("27") }}{{CompatNo}}{{CompatNo}}8{{CompatChrome("46")}}
Spread operation in destructuring{{CompatNo}}{{CompatNo}}{{ CompatGeckoDesktop("34") }}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}{{CompatNo}}
-
- -

See also

- - diff --git a/files/uk/conflicting/web/javascript/reference/operators_1cd48548c16282df3883f99267726c3e/index.html b/files/uk/conflicting/web/javascript/reference/operators_1cd48548c16282df3883f99267726c3e/index.html deleted file mode 100644 index 0eb03eb5a1..0000000000 --- a/files/uk/conflicting/web/javascript/reference/operators_1cd48548c16282df3883f99267726c3e/index.html +++ /dev/null @@ -1,421 +0,0 @@ ---- -title: Оператори присвоєння -slug: >- - conflicting/Web/JavaScript/Reference/Operators_1cd48548c16282df3883f99267726c3e -tags: - - JavaScript - - Оператор -translation_of: Web/JavaScript/Reference/Operators#Assignment_operators -translation_of_original: Web/JavaScript/Reference/Operators/Assignment_Operators -original_slug: Web/JavaScript/Reference/Operators/Оператори_присвоєння ---- -
{{jsSidebar("Operators")}}
- -

Оператор присвоєння присвоює своєму лівому операнду значення, на підставі значення правого операнду.

- -

{{EmbedInteractiveExample("pages/js/expressions-assignment.html")}}

- - - -

Огляд

- -

Базовим оператором присвоєння є оператор дорівнює (=), який присвоює значення свого правого операнда лівому операнду. Таким чином, x = y присвоює змінній x значення змінної y. Інші оператори присвоєння у своїй більшості є скороченнями для стандарних операцій, як це вказано у наступній таблиці з визначеннями та прикладами.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
НазваОператор скороченого записуЗначення
Присвоєнняx = yx = y
Присвоєння з додаваннямx += yx = x + y
Присвоєння з відніманнямx -= yx = x - y
Присвоєння з множеннямx *= yx = x * y
Присвоєння з діленнямx /= yx = x / y
Присвоєння остачіx %= yx = x % y
Присвоєння з піднесенням до степеняx **= yx = x ** y
Присвоєння з лівим зсувомx <<= yx = x << y
Присвоєння з правим зсувомx >>= yx = x >> y
Присвоєння з беззнаковим правим зсувомx >>>= yx = x >>> y
Присвоєння з побітовим Іx &= yx = x & y
Присвоєння з виключним побітовим АБОx ^= yx = x ^ y
Присвоєння з побітовим АБОx |= yx = x | y
- -

Присвоєння

- -

Простий оператор присвоєння використовується для присвоєння змінній значення. Оператор присвоєння обчислює значення, що присвоюється. Можна використовувати ланцюжок присвоюваннь, щоб присвоїти одне значення декільком змінним. Дивіться приклад нижче.

- -

Синтаксис

- -
Оператор: x = y
-
- -

Приклади

- -
// Розглянемо такі змінні:
-//  x = 5
-//  y = 10
-//  z = 25
-
-x = y     // x дорівнює 10
-x = y = z // x, y та z усі дорівнюють 25
-
- -

Присвоєння з додаванням

- -

Оператор присвоєння з додаванням додає значення правого операнду до змінної (лівого перанду) та записує у неї отриманий результат. Типи двох операндів визначають поведінку оператора. Таким чином, його результатом може стати або додавання або конкатенація. Для більш детального огляду дивіться {{jsxref("Operators/Arithmetic_Operators", "оператор додавання", "#Addition", 1)}}.

- -

Синтаксис

- -
Оператор:  x += y
-Значення:  x  = x + y
-
- -

Приклади

- -
// Розглянемо такі змінні:
-//  foo = 'foo'
-//  bar = 5
-//  baz = true
-
-
-// число + число -> додавання
-bar += 2 // 7
-
-// булеве значення + число -> додавання
-baz += 1 // 2
-
-// булеве значення + булеве значення -> додавання
-baz += false // 1
-
-// число + рядок -> конкатенація
-bar += 'foo' // "5foo"
-
-// рядок + булеве значення -> конкатенація
-foo += false // "foofalse"
-
-// рядок + рядок -> конкатенація
-foo += 'bar' // "foobar"
-
- -

Присвоєння з відніманням

- -

Оператор присвоєння з відніманням віднімає значення правого операнду від змінної (лівого перанду) та записує у неї отриманий результат. Дивіться {{jsxref("Operators/Arithmetic_Operators", "оператор віднімання", "#Subtraction", 1)}} для більш детального огляду.

- -

Синтаксис

- -
Оператор:  x -= y
-Значення:  x  = x - y
-
- -

Приклади

- -
// Розглянемо такі змінні:
-//  bar = 5
-
-bar -= 2     // 3
-bar -= 'foo' // NaN
-
- -

Присвоєння з множенням

- -

Оператор присвоєння з множенням помножує змінну (лівий операнд) на значення правого операнду та записує отриманий результат у змінну. Дивіться {{jsxref("Operators/Arithmetic_Operators", "оператор множення", "#Multiplication", 1)}} для більш детального огляду.

- -

Синтаксис

- -
Оператор:  x *= y
-Значення:  x  = x * y
-
- -

Приклади

- -
// Розглянемо такі змінні:
-//  bar = 5
-
-bar *= 2     // 10
-bar *= 'foo' // NaN
-
- -

Присвоєння з діленням

- -

Оператор присвоєння з діленням ділить змінну (лівий операнд) на значення правого операнду та записує отриманий результат у змінну. Дивіться {{jsxref("Operators/Arithmetic_Operators", "оператор ділення", "#Division", 1)}} для більш детального огляду.

- -

Синтаксис

- -
Оператор:  x /= y
-Значення:  x  = x / y
-
- -

Приклади

- -
// Розглянемо такі змінні:
-//  bar = 5
-
-bar /= 2     // 2.5
-bar /= 'foo' // NaN
-bar /= 0     // Infinity
-
- -

Присвоєння остачі

- -

Оператор присвоєння остачі ділить змінну на значення правого операнду та присвоює остачу змінній. Дивіться {{jsxref("Operators/Arithmetic_Operators", "оператор остачі", "#Remainder", 1)}} для більш детального огляду.

- -

Синтаксис

- -
Оператор:  x %= y
-Значення:  x  = x % y
-
- -

Приклади

- -
// Розглянемо такі змінні:
-//  bar = 5
-
-bar %= 2     // 1
-bar %= 'foo' // NaN
-bar %= 0     // NaN
-
- -

Присвоєння з піднесенням до степеня

- -

Оператор присвоєння з піднесенням до степеня обчислює результат піднесення першого операнду до показника степеня другого операнду. Дивіться {{jsxref("Operators/Arithmetic_Operators", "оператор піднесення до степеня", "#Exponentiation", 1)}} для більш детального огляду.

- -

Синтаксис

- -
Оператор:  x **= y
-Значення:  x  = x ** y
-
- -

Приклади

- -
// Розглянемо такі змінні:
-//  bar = 5
-
-bar **= 2     // 25
-bar **= 'foo' // NaN
- -

Присвоєння з лівим зсувом

- -

Оператор присвоєння з лівим зсувом виконує зсув першого операнду на вказану кількість бітів ліворуч та присвоює результат у змінну. Дивіться {{jsxref("Operators/Bitwise_Operators", "оператор лівого зсуву", "#Left_shift", 1)}} для більш детального огляду.

- -

Синтаксис

- -
Оператор:  x <<= y
-Значення:  x   = x << y
-
- -

Приклади

- -
var bar = 5; //  (00000000000000000000000000000101)
-bar <<= 2; // 20 (00000000000000000000000000010100)
-
- -

Присвоєння з правим зсувом

- -

Оператор присвоєння з правим зсувом виконує зсув першого операнду на вказану кількість бітів праворуч та присвоює результат у змінну. Дивіться {{jsxref("Operators/Bitwise_Operators", "оператор правого зсуву", "#Right_shift", 1)}} для більш детального огляду.

- -

Синтаксис

- -
Оператор:  x >>= y
-Значення:  x   = x >> y
-
- -

Приклади

- -
var bar = 5; //   (00000000000000000000000000000101)
-bar >>= 2;   // 1 (00000000000000000000000000000001)
-
-var bar -5; //    (-00000000000000000000000000000101)
-bar >>= 2;  // -2 (-00000000000000000000000000000010)
-
- -

Присвоєння з беззнаковим правим зсувом

- -

Оператор присвоєння з беззнаковим правим зсувом виконує зсув першого операнду на вказану кількість бітів праворуч та присвоює результат змінній. Дивіться {{jsxref("Operators/Bitwise_Operators", " оператор беззнакового правого зсуву", "#Unsigned_right_shift", 1)}} для більш детального огляду.

- -

Синтаксис

- -
Оператор:  x >>>= y
-Значення:  x    = x >>> y
-
- -

Приклади

- -
var bar = 5; //   (00000000000000000000000000000101)
-bar >>>= 2;  // 1 (00000000000000000000000000000001)
-
-var bar = -5; // (-00000000000000000000000000000101)
-bar >>>= 2; // 1073741822 (00111111111111111111111111111110)
- -

Присвоєння з побітовим І

- -

Оператор присвоєння з побітовим І використовує двійкове представлення обох операндів, виконує над ними операцію побітового І та присвоює результат змінній. Дивіться {{jsxref("Operators/Bitwise_Operators", "оператор побітового І", "#Bitwise_AND", 1)}} для більш детального огляду.

- -

Синтаксис

- -
Оператор:  x &= y
-Значення:  x  = x & y
-
- -

Приклади

- -
var bar = 5;
-// 5:     00000000000000000000000000000101
-// 2:     00000000000000000000000000000010
-bar &= 2; // 0
-
- -

Присвоєння з виключним побітовим АБО

- -

Оператор присвоєння з виключним побітовим АБО використовує двійкове представлення обох операндів, виконує над ними операцію виключного побітового АБО (XOR) та присвоює результат змінній. Дивіться {{jsxref("Operators/Bitwise_Operators", "оператор виключного побітового АБО", "#Bitwise_XOR", 1)}} для більш детального огляду.

- -

Синтаксис

- -
Оператор:  x ^= y
-Значення:  x  = x ^ y
-
- -

Приклади

- -
var bar = 5;
-bar ^= 2; // 7
-// 5: 00000000000000000000000000000101
-// 2: 00000000000000000000000000000010
-// -----------------------------------
-// 7: 00000000000000000000000000000111
-
- -

Присвоєння з побітовим АБО

- -

Оператор присвоєння з побітовим АБО використовує двійкове представлення обох операндів, виконує над ними операцію побітового АБО та присвоює результат змінній. Дивіться {{jsxref("Operators/Bitwise_Operators", "оператор побітового АБО", "#Bitwise_OR", 1)}} для більш детального огляду.

- -

Синтаксис

- -
Оператор:  x |= y
-Значення:  x  = x | y
-
- -

Приклади

- -
var bar = 5;
-bar |= 2; // 7
-// 5: 00000000000000000000000000000101
-// 2: 00000000000000000000000000000010
-// -----------------------------------
-// 7: 00000000000000000000000000000111
-
- -

Приклади

- -

Лівий операнд з іншим оператором присвоєння

- -

У незвичних ситуаціях оператор присвоєння (наприклад,  x += y) не є ідентичним виразу, який він означає (в даному випадку x = x + y). Коли лівий операнд оператора присвоєння сам містить оператор присвоєння, лівий операнд обчислюється лише один раз. Наприклад:

- -
a[i++] += 5         // i обчислюється лише один раз
-a[i++] = a[i++] + 5 // i обчислюється двічі
-
- -

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

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
СпецифікаціяСтатусКоментар
{{SpecName('ESDraft', '#sec-assignment-operators', 'Assignment operators')}}{{Spec2('ESDraft')}}
{{SpecName('ES2015', '#sec-assignment-operators', 'Assignment operators')}}{{Spec2('ES2015')}}
{{SpecName('ES5.1', '#sec-11.13', 'Assignment operators')}}{{Spec2('ES5.1')}}
{{SpecName('ES1', '#sec-11.13', 'Assignment operators')}}{{Spec2('ES1')}}Початкове визначення.
- -

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

- - - -

{{Compat("javascript.operators.assignment")}}

- -
- -

Див. також

- - diff --git a/files/uk/conflicting/web/javascript/reference/operators_7c8eb9475d97a4a734c5991857698560/index.html b/files/uk/conflicting/web/javascript/reference/operators_7c8eb9475d97a4a734c5991857698560/index.html deleted file mode 100644 index a41371e7c0..0000000000 --- a/files/uk/conflicting/web/javascript/reference/operators_7c8eb9475d97a4a734c5991857698560/index.html +++ /dev/null @@ -1,562 +0,0 @@ ---- -title: Бітові оператори -slug: >- - conflicting/Web/JavaScript/Reference/Operators_7c8eb9475d97a4a734c5991857698560 -tags: - - JavaScript - - Довідка - - Оператор -translation_of: Web/JavaScript/Reference/Operators -translation_of_original: Web/JavaScript/Reference/Operators/Bitwise_Operators -original_slug: Web/JavaScript/Reference/Operators/Bitwise_Operators ---- -
{{jsSidebar("Operators")}}
- -

Бітові оператори опрацьовують свої операнди як послідовність 32-х бітів (нулів та одиниць), а не як десяткові, шістнадцяткові чи вісімкові числа. Наприклад, десяткове число дев'ять має бітове представлення 1001. Бітові оператори виконують операції над цими бітовими представленнями, але повертають стандартні числові значення JavaScript.

- -
{{EmbedInteractiveExample("pages/js/expressions-bitwiseoperators.html")}}
- - - -

Наступна таблиця наводить перелік бітових операторів JavaScript:

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ОператорЗастосуванняОпис
Побітове І (AND)a & bПовертає 1 на кожній позиції, де відповідні біти обох операндів дорівнюють 1.
Побітове АБО (OR)a | bПовертає 1 на кожній позиції, де відповідні біти одного чи обох операндів дорівнюють 1.
Виключне побітове АБО (XOR)a ^ bПовертає 1 на кожній позиції, де відповідний біт одного з двох, але не обох, операндів дорівнює 1.
Побітове НЕ (NOT)~ aВиконує інверсію бітів операнду.
Лівий зсувa << bЗсуває a у двійковому представленні на b (< 32) бітів ліворуч, заповнюючи позиції справа нулями.
Правий зсув з розширенням знакуa >> bЗсуває a у двійковому представленні на b (< 32) бітів праворуч, відкидаючи зсунуті біти.
Правий зсув із заповненням нулямиa >>> b  Зсуває a у двійковому представленні на b (< 32) бітів праворуч, відкидаючи зсунуті біти та заповнюючи позиції зліва нулями.
- -

32-бітні цілі числа зі знаком

- -

Операнди усіх бітових операторів перетворюються на 32-бітні цілі числа зі знаком у форматі доповняльного коду, окрім оператора правого зсуву із заповненням нулями, який повертає беззнакове ціле 32-бітне число. Формат доповняльного коду означає, що від'ємний еквівалент числа (наприклад, 5 та -5) - це інвертовані біти числа (побітове НЕ, або обернений код числа) плюс один. Для прикладу, наступний код представляє ціле число 314:

- -
00000000000000000000000100111010
-
- -

Наступний код представляє ~314, тобто, обернений код числа 314:

- -
11111111111111111111111011000101
-
- -

Нарешті, наступний код представляє доповняльний код числа -314:

- -
11111111111111111111111011000110
-
- -

Доповняльний код гарантує, що лівий біт дорівнює 0, коли число є додатним, і 1, коли число є від'ємним. Тому він відомий як знаковий біт.

- -

Число 0 є цілим числом, усі біти якого дорівнюють 0.

- -
0 (основа 10) = 00000000000000000000000000000000 (основа 2)
-
- -

Число -1 є цілим числом, усі біти якого дорівнюють 1.

- -
-1 (основа 10) = 11111111111111111111111111111111 (основа 2)
-
- -

Число -2147483648 (шістнадцяткове представлення: -0x80000000) є цілим числом, усі біти якого дорівнюють 0, окрім першого (старшого) біта.

- -
-2147483648 (основа 10) = 10000000000000000000000000000000 (основа 2)
-
- -

Число 2147483647 (шістнадцяткове представлення: 0x7fffffff) є цілим числом, усі біти якого дорівнюють 1, окрім першого (старшого) біта.

- -
2147483647 (основа 10) = 01111111111111111111111111111111 (основа 2)
-
- -

Числа -2147483648 та 2147483647 є мінімальним та максимальним цілими числами, які можуть бути представлені 32-бітним знаковим числом.

- -

Побітові логічні оператори

- -

Концептуально побітові логічні оператори працюють наступним чином:

- - - -

& (Побітове І)

- -

Виконує операцію І (AND) над кожною парою бітів. a І b дає 1 тільки якщо обидва, a та b, дорівнюють 1. Таблиця істинності для операції І наступна:

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
aba AND b
000
010
100
111
- -
.    9 (основа 10) = 00000000000000000000000000001001 (основа 2)
-    14 (основа 10) = 00000000000000000000000000001110 (основа 2)
-                   --------------------------------
-14 & 9 (основа 10) = 00000000000000000000000000001000 (основа 2) = 8 (основа 10)
-
- -

Побітове І над будь-яким числом x та 0 дає 0.

- -

| (Побітове АБО)

- -

Виконує операцію АБО (OR) над кожною парою бітів. a АБО b дає 1, якщо або a, або b дорівнює 1. Таблиця істинності для операції АБО наступна:

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
aba OR b
000
011
101
111
- -
.    9 (основа 10) = 00000000000000000000000000001001 (основа 2)
-    14 (основа 10) = 00000000000000000000000000001110 (основа 2)
-                   --------------------------------
-14 | 9 (основа 10) = 00000000000000000000000000001111 (основа 2) = 15 (основа 10)
-
- -

Побітове АБО над будь-яким числом x та 0 дає x.

- -

^ (Виключне побітове АБО)

- -

Виконує операцію виключного АБО (XOR) над кожною парою бітів. a викл. АБО b дає 1, якщо a та b є різними. Таблиця істинності для операції XOR наступна:

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
aba XOR b
000
011
101
110
- -
.    9 (основа 10) = 00000000000000000000000000001001 (основа 2)
-    14 (основа 10) = 00000000000000000000000000001110 (основа 2)
-                   --------------------------------
-14 ^ 9 (основа 10) = 00000000000000000000000000000111 (основа 2) = 7 (основа 10)
-
- -

Виключне побітове АБО над будь-яким числом x та 0 дає x.

- -

~ (Побітове НЕ)

- -

Виконує операцію НЕ над кожним бітом. НЕ a повертає інвертоване значення (або обернений код) операнду a. Таблиця істинності для операції НЕ наступна:

- - - - - - - - - - - - - - - - -
aNOT a
01
10
- -
 9 (основа 10) = 00000000000000000000000000001001 (основа 2)
-               --------------------------------
-~9 (основа 10) = 11111111111111111111111111110110 (основа 2) = -10 (основа 10)
-
- -

Побітове НЕ над будь-яким числом x дає -(x + 1). Наприклад, ~-5 дорівнює 4.

- -

Зауважте, що через використання 32-бітного представлення чисел і ~-1, і ~4294967295 (232-1) повернуть 0.

- -

Оператори бітового зсуву

- -

Оператори бітового зсуву приймають два операнди: перший є величиною, в якій треба виконати зсув, а другий вказує кількість бітових позицій для зсуву. Напрямок операції зсуву контролюється застосованим оператором.

- -

Оператори зсуву перетворюють свої операнди на 32-бітні цілі числа у порядку від старшого до молодшого байту та повертають результат того самого типу, до якого належить лівий операнд. Лише молодші п'ять бітів правого операнду будуть використані.

- -

<< (Лівий зсув)

- -

Цей оператор виконує зсув першого операнду на вказану кількість бітів ліворуч. Надлишкові біти, зсунуті ліворуч, відкидаються. Біти, додані справа, заповнюються нулями.

- -

Наприклад, 9 << 2 дорівнює 36:

- -
.    9 (основа 10): 00000000000000000000000000001001 (основа 2)
-                  --------------------------------
-9 << 2 (основа 10): 00000000000000000000000000100100 (основа 2) = 36 (основа 10)
-
- -

Бітовий зсув будь-якого числа x ліворуч на y бітів дорівнює x * 2 ** y.
- Отже, для прикладу: 9 << 3 можна перекласти як: 9 * (2 ** 3) = 9 * (8) = 72.

- -

>> (Правий зсув з розширенням знаку)

- -

Цей оператор виконує зсув першого операнду на вказану кількість бітів праворуч. Надлишкові біти, зсунуті праворуч, відкидаються. Біти, додані зліва, заповнюються значенням старшого біта. Оскільки новий старший біт матиме те саме значення, що й попередній старший біт, знаковий (старший) біт не змінюється. Звідси назва "з розширенням знаку".

- -

Наприклад, 9 >> 2 дорівнює 2:

- -
.    9 (основа 10): 00000000000000000000000000001001 (основа 2)
-                  --------------------------------
-9 >> 2 (основа 10): 00000000000000000000000000000010 (основа 2) = 2 (основа 10)
-
- -

Аналогічно, -9 >> 2 дорівнює -3, оскільки знак зберігається:

- -
.    -9 (основа 10): 11111111111111111111111111110111 (основа 2)
-                   --------------------------------
--9 >> 2 (основа 10): 11111111111111111111111111111101 (основа 2) = -3 (основа 10)
-
- -

>>> (Правий зсув із заповненням нулями)

- -

Цей оператор виконує зсув першого операнду на вказану кількість бітів праворуч. Надлишкові біти, зсунуті праворуч, відкидаються. Біти, додані зліва, заповнюються нулями. Знаковий біт отримує значення 0, а отже, результат завжди невід'ємний. На відміну від інших бітових операторів, правий зсув із заповненням нулями повертає беззнакове ціле 32-бітне число.

- -

Для невід'ємних чисел, правий зсув із заповненням нулями та правий зсув з розширенням знаку дають однаковий результат. Наприклад, 9 >>> 2 дорівнює 2, так само, як 9 >> 2:

- -
.     9 (основа 10): 00000000000000000000000000001001 (основа 2)
-                   --------------------------------
-9 >>> 2 (основа 10): 00000000000000000000000000000010 (основа 2) = 2 (основа 10)
-
- -

Однак, це не одне й те саме для від'ємних чисел. Наприклад, -9 >>> 2 поверне 1073741821, що відрізняється від -9 >> 2 (що дорівнює -3):

- -
.     -9 (основа 10): 11111111111111111111111111110111 (основа 2)
-                    --------------------------------
--9 >>> 2 (основа 10): 00111111111111111111111111111101 (основа 2) = 1073741821 (основа 10)
-
- -

Приклади

- -

Прапори та бітові маски

- -

Побітові логічні оператори часто використовуються для створення, маніпулювання та читання послідовностей прапорів, які грають роль двійкових змінних. Замість цих послідовностей можуть використовуватись зміні, але двійкові прапори займають набагато менше пам'яті (у 32 рази).

- -

Припустимо, є 4 прапори:

- - - -

Ці прапори представлені послідовністю бітів: DCBA. Коли прапор встановлений, він має значення 1. Коли прапор очищений, він має значення 0. Припустимо, змінна flags має двійкове значення 0101:

- -
var flags = 5;   // двійкове значення 0101
-
- -

Це значення вказує:

- - - -

Оскільки бітові операнди 32-бітні, 0101 насправді дорівнює 00000000000000000000000000000101, але нулями попереду можна знехтувати, оскільки вони не містять корисної інформації.

- -

Бітова маска - це послідовність бітів, які можуть маніпулювати прапорами та/або читати їх. Зазвичай, визначається "примітивна" бітова маска для кожного прапора:

- -
var FLAG_A = 1; // 0001
-var FLAG_B = 2; // 0010
-var FLAG_C = 4; // 0100
-var FLAG_D = 8; // 1000
-
- -

Нові бітові маски можуть створюватись застовуванням побітових логічних операторів до цих примітивних бітових масок. Наприклад, бітова маска 1011 може бути створена операцією АБО з прапорів FLAG_A, FLAG_B та FLAG_D:

- -
var mask = FLAG_A | FLAG_B | FLAG_D; // 0001 | 0010 | 1000 => 1011
-
- -

Індивідуальні значення прапорів можна витягнути застосуванням операції І до них та бітової маски, де кожний біт, що має значення один, "витягне" відповідний прапор. Бітова маска маскує невідповідні прапори, об'єднуючи їх операцією І з нулями (звідси термін "бітова маска"). Наприклад, бітову маску 0100 можна використати, щоб побачити, чи встановлений прапор C:

- -
// якщо ми маємо кота
-if (flags & FLAG_C) { // 0101 & 0100 => 0100 => true
-   // зробити щось
-}
-
- -

Бітова маска з кількома встановленими прапорами діє як "або/або". Для прикладу, наступні два фрагменти еквівалентні:

- -
// якщо ми маємо кажана або ми маємо кота
-// (0101 & 0010) || (0101 & 0100) => 0000 || 0100 => true
-if ((flags & FLAG_B) || (flags & FLAG_C)) {
-   // зробити щось
-}
-
- -
// якщо ми маємо кажана або кота
-var mask = FLAG_B | FLAG_C; // 0010 | 0100 => 0110
-if (flags & mask) { // 0101 & 0110 => 0100 => true
-   // зробити щось
-}
-
- -

Прапори можна встановити, об'єднавши їх операцією АБО з бітовою маскою, де кожний біт, що має значення один, встановить відповідний прапор, якщо прапор ще не встановлений. Наприклад, бітову маску 1100 можна використати, щоб встановити прапори C та D:

- -
// так, ми маємо кота та качку
-var mask = FLAG_C | FLAG_D; // 0100 | 1000 => 1100
-flags |= mask;   // 0101 | 1100 => 1101
-
- -

Прапори можна очистити, об'єднавши їх операцією І з бітовою маскою, де кожний біт, що має значення нуль, очистить відповідний прапор, якщо він ще не очищений. Ця бітова маска може бути створена застосуванням операції НЕ до примітивних бітових масок. Наприклад, бітову маску 1010 можна використати, щоб очистити прапори A та C:

- -
// ні, ми не маємо проблеми з мурахами або кота
-var mask = ~(FLAG_A | FLAG_C); // ~0101 => 1010
-flags &= mask;   // 1101 & 1010 => 1000
-
- -

Маску також можна створити за допомогою ~FLAG_A & ~FLAG_C (правило де Моргана):

- -
// ні, ми не маємо проблеми з мурахами і ми не маємо кота
-var mask = ~FLAG_A & ~FLAG_C;
-flags &= mask;   // 1101 & 1010 => 1000
-
- -

Прапори можна перемикати, об'єднуючи їх операцією виключне АБО з бітовою маскою, де кожний біт, що має значення один, переключить відповідний прапор. Наприклад, бітову маску 0110 можна використати, щоб переключити прапори B та C:

- -
// якщо ми не мали кажана, тепер ми його маємо,
-// а якщо він в нас був, бувай, кажанчику
-// те саме для котів
-var mask = FLAG_B | FLAG_C;
-flags = flags ^ mask;   // 1100 ^ 0110 => 1010
-
- -

Нарешті, усі прапори можна перевернути оператором НЕ:

- -
// входимо у паралельний всесвіт...
-flags = ~flags;    // ~1010 => 0101
-
- -

Перетворення типів

- -

Перетворити двійковий рядок на десяткове число:

- -
var sBinString = '1011';
-var nMyNumber = parseInt(sBinString, 2);
-alert(nMyNumber); // виводить 11, тобто 1011
-
- -

Перетворити десяткове число на двійковий рядок:

- -
var nMyNumber = 11;
-var sBinString = nMyNumber.toString(2);
-alert(sBinString); // виводить 1011, тобто 11
-
- -

Автоматизація створення маски

- -

Ви можете створювати маски з набору булевих значень наступним чином:

- -
function createMask() {
-  var nMask = 0, nFlag = 0, nLen = arguments.length > 32 ? 32 : arguments.length;
-  for (nFlag; nFlag < nLen; nMask |= arguments[nFlag] << nFlag++);
-  return nMask;
-}
-var mask1 = createMask(true, true, false, true); // 11, тобто: 1011
-var mask2 = createMask(false, false, true); // 4, тобто: 0100
-var mask3 = createMask(true); // 1, тобто: 0001
-// і т.д.
-
-alert(mask1); // виводить 11, тобто: 1011
-
- -

Зворотний алгоритм: отримання масиву булевих значень з маски

- -

Якщо ви бажаєте створити масив булевих значень з маски, можете скористатись цим кодом:

- -
function arrayFromMask(nMask) {
-  // Значенння nMask має бути між -2147483648 та 2147483647
-  if (nMask > 0x7fffffff || nMask < -0x80000000) {
-    throw new TypeError('arrayFromMask - out of range');
-  }
-  for (var nShifted = nMask, aFromMask = []; nShifted;
-       aFromMask.push(Boolean(nShifted & 1)), nShifted >>>= 1);
-  return aFromMask;
-}
-
-var array1 = arrayFromMask(11);
-var array2 = arrayFromMask(4);
-var array3 = arrayFromMask(1);
-
-alert('[' + array1.join(', ') + ']');
-// виводить "[true, true, false, true]", тобто: 11, тобто: 1011
-
- -

Ви можете перевірити обидва алгоритми одночасно…

- -
var nTest = 19; // наша користувацька маска
-var nResult = createMask.apply(this, arrayFromMask(nTest));
-
-alert(nResult); // 19
-
- -

Суто з навчальною метою (оскільки існує метод Number.toString(2)) ми показуємо, як можна модифікувати алгоритм arrayFromMask для створення рядка, що містить двійкове представлення числа, а не масиву булевих значень:

- -
function createBinaryString(nMask) {
-  // Значення nMask має бути між -2147483648 та 2147483647
-  for (var nFlag = 0, nShifted = nMask, sMask = ''; nFlag < 32;
-       nFlag++, sMask += String(nShifted >>> 31), nShifted <<= 1);
-  return sMask;
-}
-
-var string1 = createBinaryString(11);
-var string2 = createBinaryString(4);
-var string3 = createBinaryString(1);
-
-alert(string1);
-// виводить 00000000000000000000000000001011, тобто 11
-
- -

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

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
СпецифікаціяСтатусКоментар
{{SpecName('ES1')}}{{Spec2('ES1')}}Початкове визначення.
{{SpecName('ES5.1', '#sec-11.7')}}{{Spec2('ES5.1')}}Визначені у кількох розділах специфікації: Побітовий оператор НЕ, Бітові оператори зсуву, Двійкові побітові оператори
{{SpecName('ES6', '#sec-bitwise-shift-operators')}}{{Spec2('ES6')}}Визначені у кількох розділах специфікації: Побітовий оператор НЕ, Бітові оператори зсуву, Двійкові побітові оператори
{{SpecName('ESDraft', '#sec-bitwise-shift-operators')}}{{Spec2('ESDraft')}}Визначені у кількох розділах специфікації: Побітовий оператор НЕ, Бітові оператори зсуву, Двійкові побітові оператори
- -

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

- - - -

{{Compat("javascript.operators.bitwise")}}

- -

Див. також

- - diff --git a/files/uk/conflicting/web/javascript/reference/operators_a8aa9ce42ce1749862961c61113d120b/index.html b/files/uk/conflicting/web/javascript/reference/operators_a8aa9ce42ce1749862961c61113d120b/index.html deleted file mode 100644 index 1313c5b9c6..0000000000 --- a/files/uk/conflicting/web/javascript/reference/operators_a8aa9ce42ce1749862961c61113d120b/index.html +++ /dev/null @@ -1,247 +0,0 @@ ---- -title: Оператори порівняння -slug: >- - conflicting/Web/JavaScript/Reference/Operators_a8aa9ce42ce1749862961c61113d120b -tags: - - JavaScript - - Довідка - - Оператор -translation_of: Web/JavaScript/Reference/Operators -translation_of_original: Web/JavaScript/Reference/Operators/Comparison_Operators -original_slug: Web/JavaScript/Reference/Operators/Оператори_порівняння ---- -
{{jsSidebar("Operators")}}
- -

JavaScript має як строге порівняння, так і порівняння з перетворенням типів. Строге порівняння (===) є істинним лише в тому випадку, якщо операнди мають однаковий тип, а їхній зміст співпадає. Найчастіше вживане абстрактне порівняння (==) приводить операнди до спільного типу перед виконанням порівняння. Для абстрактних порівнянь (наприклад, <=) операнди спочатку приводяться до простих типів, потім приводяться до спільного типу, а вже тоді порівнюються.

- -

Рядки порівнюються на основі стандартного лексикографічного упорядкування, використовуючи значення Unicode.

- -

{{EmbedInteractiveExample("pages/js/expressions-comparisonoperators.html")}}

- - - -

Особливості порівнянь:

- - - -

Оператори рівності

- -

Рівність (==)

- -

Оператор рівності перетворює операнди, якщо вони не однакового типу, і після цього застосовує строге порівняння. Якщо обидва операнди є об'єктами, JavaScript порівнює внутрішні посилання, які є рівними, якщо операнди посилаються на один і той самий об'єкт у пам'яті.

- -

Синтаксис

- -
x == y
-
- -

Приклади

- -
1    ==  1         // true
-'1'  ==  1         // true
-1    == '1'        // true
-0    == false      // true
-0    == null       // false
-var object1 = {'key': 'value'}, object2 = {'key': 'value'};
-object1.key == object2.key // true
-0    == undefined  // false
-null == undefined  // true
-
- -

Нерівність (!=)

- -

Оператор нерівності повертає true,  якщо операнди не є рівними. Якщо два операнда не належать до одного типу, JavaScript намагається привести операнди до відповідного типу для порівняння. Якщо обидва операнда є об'єктами, JavaScript порівнює внутрішні посилання, які є нерівними, якщо операнди посилаються на різні об'єкти у пам'яті.

- -

Синтаксис

- -
x != y
- -

Приклади

- -
1 !=   2     // true
-1 !=  '1'    // false
-1 !=  "1"    // false
-1 !=  true   // false
-0 !=  false  // false
-
- -

Ідентичність / строга рівність (===)

- -

Оператор ідентичності повертає true, якщо операнди строго рівні (див. вище) без приведення типів

- -

Синтаксис

- -
x === y
- -

Приклади

- -
3 === 3   // true
-3 === '3' // false
-var object1 = {'key': 'value'}, object2 = {'key': 'value'};
-object1 === object2 //false
- -

Неідентичність / строга нерівність (!==)

- -

Оператор неідентичності повертає true, якщо операнди не є рівними та/або не однакового типу.

- -

Синтаксис

- -
x !== y
- -

Приклади

- -
3 !== '3' // true
-4 !== 3   // true
-
- -

Оператори відношення

- -

Кожен з цих операторів буде примусово приведений до простої величини перед порівнянням. Якщо обидва перетворюються на рядки, вони порівнюються з використанням лексикографічного порядку, інакше вони будуть перетворені на числа для порівняння. Порівняння із NaN завжди поверне false.

- -

Більше ніж (>)

- -

Оператор більше ніж повертає true, якщо значення лівого операнда більше за значення правого операнда.

- -

Синтаксис

- -
x > y
- -

Приклади

- -
4 > 3 // true
-
- -

Більше чи дорівнює (>=)

- -

Оператор більше чи дорівнює повертає true, якщо значення лівого операнда більше, або дорівнює значенню правого операнда.

- -

Синтаксис

- -
 x >= y
- -

Приклади

- -
4 >= 3 // true
-3 >= 3 // true
-
- -

Менше ніж (<)

- -

Оператор менше ніж повертає true, якщо значення лівого операнда менше значення правого операнда.

- -

Синтаксис

- -
 x < y
- -

Приклади

- -
3 < 4 // true
-
- -

Менше чи дорівнює (<=)

- -

Оператор менше чи дорівнює повертає true, якщо значення лівого операнда менше або дорівнює значенню правого операнда.

- -

Синтаксис

- -
 x <= y
- -

Приклади

- -
3 <= 4 // true
-
- -

Застосування операторів порівняння

- -

Стандартні оператори рівності (== та !=) використовують алгоритм абстрактної рівності для порівняння двох операндів. Якщо операнди належать до різних типів, алгоритм спробує привести їх до спільного типу перед порівнянням; наприклад, у виразі 5 == '5', рядок праворуч буде приведений до {{jsxref("Число","числа")}} перед здійсненням порівняння.

- -

Оператори строгої рівності (=== та !==) використовують алгоритм строгої рівності та призначені для виконання перевірки рівності операндів одного типу. Якщо операнди належать до різних типів, результат завжди буде false, тому 5 !== '5'.

- -

Використовуйте оператори строгого порівняння, якщо операнди мають належати до вказаного типу, як і їх значення, або, якщо конкретний тип операндів має значення. Інакше, використовуйте стандартні оператори рівності, які дозволяють перевіряти ідентичність двох операндів, навіть якщо вони не належать до одного типу.

- -

Коли в порівнянні застосовується перетворення типів (тобто, це не строге порівняння), JavaScript перетворює типи операндів {{jsxref ("String")}}, {{jsxref ("Число","Number")}}, {{jsxref ("Boolean" )}} або {{jsxref ("Object")}} наступним чином:

- - - -
Заувага: Рядкові об'єкти є об'єктами типу Object, а не String! Об'єкти типу String використовуються рідко, а отже, наведені нижче результати можуть бути несподіваними:
- -
// true, оскільки обидва операнди мають тип String (є рядковими примітивами):
-'foo' === 'foo'
-
-var a = new String('foo');
-var b = new String('foo');
-
-// false, оскільки a та b мають тип Object і посилаються на різні об'єкти
-a == b
-
-// false, оскільки a та b мають тип Object і посилаються на різні об'єкти
-a === b
-
-// true, оскільки a та 'foo' мають різні типи, але об'єкт (а)
-// перетворюється на рядок 'foo' перед порівнянням
-a == 'foo'
- -

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

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
СпецифікаціяСтатусКоментар
{{SpecName('ES1')}}{{Spec2('ES1')}}Початкове визначення. Реалізовано у JavaScript 1.0
{{SpecName('ES3')}}{{Spec2('ES3')}}Додані оператори === та !== . Реалізовано у JavaScript 1.3
{{SpecName('ES5.1', '#sec-11.8')}}{{Spec2('ES5.1')}}Дано визначення у декільках секціях специфікації: Оператори відношення, Оператори рівності
{{SpecName('ES6', '#sec-relational-operators')}}{{Spec2('ES6')}}Дано визначення у декільках секціях специфікації: Оператори відношення, Оператори рівності
{{SpecName('ESDraft', '#sec-relational-operators')}}{{Spec2('ESDraft')}}Дано визначення у декільках секціях специфікації: Оператори відношення, Оператори рівності
- -

Підтримка веб-переглядачами

- - - -

{{Compat("javascript.operators.comparison")}}

- -

Див. також

- - diff --git a/files/uk/conflicting/web/javascript/reference/operators_f71733c8e7001a29c3ec40d8522a4aca/index.html b/files/uk/conflicting/web/javascript/reference/operators_f71733c8e7001a29c3ec40d8522a4aca/index.html deleted file mode 100644 index c2ae524fa3..0000000000 --- a/files/uk/conflicting/web/javascript/reference/operators_f71733c8e7001a29c3ec40d8522a4aca/index.html +++ /dev/null @@ -1,255 +0,0 @@ ---- -title: Логічні оператори -slug: >- - conflicting/Web/JavaScript/Reference/Operators_f71733c8e7001a29c3ec40d8522a4aca -tags: - - JavaScript - - Оператор - - логічний -translation_of: Web/JavaScript/Reference/Operators -translation_of_original: Web/JavaScript/Reference/Operators/Logical_Operators -original_slug: Web/JavaScript/Reference/Operators/Logical_Operators ---- -
{{jsSidebar("Operators")}}
- -

Логічні оператори зазвичай застосовуються до {{jsxref("Boolean", "булевих")}} (логічних) значень. В цьому випадку вони повертають значення типу Boolean. Однак, оператори && та || насправді повертають значення одного з заданих операндів, тому, якщо ці оператори використовуються зі значеннями не булевого типу, вони повернуть значення не булевого типу.

- -
{{EmbedInteractiveExample("pages/js/expressions-logicaloperator.html")}}
- - - -

Опис

- -

Логічні оператори описані у наведеній нижче таблиці (вирази expr можуть належати до будь-якого типу, не лише булевого):

- - - - - - - - - - - - - - - - - - - - - - - - -
ОператорСинтаксисОпис
Логічне І (&&)expr1 && expr2Якщо вираз expr1 може бути приведений до true, вертає expr2; інакше, вертає expr1.
Логічне АБО (||)expr1 || expr2Якщо вираз expr1 може бути приведений до true, вертає expr1; інакше, вертає expr2.
Логічне НЕ (!)!exprВертає false, якщо його єдиний операнд може бути приведений до true; інакше, вертає true.
- -

Якщо значення може бути приведене до true, то воно називається {{Glossary("truthy","правдивим")}}. Якщо значення може бути приведене до false, воно називається {{Glossary("falsy","хибним")}}.

- -

Приклади виразів, які можуть бути приведені до false:

- - - -

Хоча оператори && та || можуть використовуватись з операндами не булевого (логічного) типу, вони все одно можуть вважатися логічними операторами, оскільки значення, які вони повертають, завжди можуть бути приведені до булевих примітивів. Щоб явно перетворити повернені значення (або, взагалі, будь-який вираз) до відповідного булевого значення, скористайтесь подвійним оператором НЕ або конструктором Boolean.

- -

Коротке замикання обчислення

- -

Оскільки логічні вирази обчислюються зліва направо, вони перевіряються на можливе "коротке замикання" обчислення за наступними правилами:

- - - -

Коротке замикання означає, що наведені вирази expr не обчислюються, тому будь-які побічні ефекти від цього не відбудуться (наприклад, якщо expr є викликом функції, виклик не відбувається). Це відбувається тому, що значення оператора вже визначене після обчислення першого операнду. Дивіться приклад:

- -
function A(){ console.log('викликано A'); return false; }
-function B(){ console.log('викликано B'); return true; }
-
-console.log( A() && B() );
-// виводить "викликано A" в результаті виклику функції,
-// потім виводить false (що є результатом виклику оператора)
-
-console.log( B() || A() );
-// виводить "викликано B" в результаті виклику функції,
-// потім виводить true (що є результатом виклику оператора)
-
- -

Пріоритет операторів

- -

Наступні вирази можуть виглядати еквівалентними, але це не так, оскільки оператор && виконується перед оператором || (дивіться Пріоритет операторів).

- -
true || false && false      // вертає true, оскільки && виконується першим
-(true || false) && false    // вертає false, оскільки не можна застосувати пріоритет операторів
- -

Логічне І (&&)

- -

Наступний код наводить приклади оператора && (логічне І).

- -
a1 = true  && true       // t && t вертає true
-a2 = true  && false      // t && f вертає false
-a3 = false && true       // f && t вертає false
-a4 = false && (3 == 4)   // f && f вертає false
-a5 = 'Кіт' && 'Пес'      // t && t вертає "Пес"
-a6 = false && 'Кіт'      // f && t вертає false
-a7 = 'Кіт' && false      // t && f вертає false
-a8 = ''    && false      // f && f вертає ""
-a9 = false && ''         // f && f вертає false
-
- -

Логічне АБО (||)

- -

Наступний код наводить приклади оператора || (логічне АБО).

- -
o1 = true  || true       // t || t вертає true
-o2 = false || true       // f || t вертає true
-o3 = true  || false      // t || f вертає true
-o4 = false || (3 == 4)   // f || f вертає false
-o5 = 'Кіт' || 'Пес'      // t || t вертає "Кіт"
-o6 = false || 'Кіт'      // f || t вертає "Кіт"
-o7 = 'Кіт' || false      // t || f вертає "Кіт"
-o8 = ''    || false      // f || f вертає false
-o9 = false || ''         // f || f вертає ""
-o10 = false || varObject // f || object вертає varObject
-
- -
-

Заувага: Якщо ви використовуєте цей оператор для присвоєння значення за замовчуванням якійсь змінній, пам'ятайте, що будь-яке хибне значення не буде використане. Якщо вам потрібно лише відфільтрувати {{jsxref("null")}} або {{jsxref("undefined")}}, розгляньте оператор null-об'єднання (однак, станом на листопад 2019 ця функціональність ще не була широко реалізована і має вважатися експериментальною, оскільки знаходиться на Стадії 3).

-
- -

Логічне НЕ (!)

- -

Наступний код демонструє приклади оператора ! (логічне НЕ).

- -
n1 = !true               // !t вертає false
-n2 = !false              // !f вертає true
-n3 = !''                 // !f вертає true
-n4 = !'Cat'              // !t вертає false
-
- -

Подвійне НЕ (!!)

- -

Можна використовувати пару операторів НЕ поспіль, щоб явно викликати перетворення будь-якої величини на відповідний булевий примітив. Перетворення базується на "правдивості" або "хибності" значення (дивіться {{Glossary("truthy")}} та {{Glossary("falsy")}}).

- -

Таке саме перетворення можна виконати функцією {{jsxref("Boolean")}}.

- -
n1 = !!true                   // !!truthy вертає true
-n2 = !!{}                     // !!truthy вертає true: будь-який об'єкт є правдивим...
-n3 = !!(new Boolean(false))   // ...навіть об'єкти Boolean з false .valueOf()!
-n4 = !!false                  // !!falsy вертає false
-n5 = !!""                     // !!falsy вертає false
-n6 = !!Boolean(false)         // !!falsy вертає false
-
- -

Правила перетворення для булевих значень

- -

Перетворення І на АБО

- -

Наступна операція з булевими значеннями:

- -
умова1 && умова2
- -

завжди дорівнює:

- -
!(!умова1 || !умова2)
- -

Перетворення АБО на І

- -

Наступна операція з булевими значеннями:

- -
умова1 || умова2
- -

завжди дорівнює:

- -
!(!умова1 && !умова2)
- -

Перетворення НЕ

- -

Наступна операція з булевими значеннями:

- -
!!умова
- -

завжди дорівнює:

- -
умова
- -

Прибирання вкладених дужок

- -

Оскільки логічні вирази обчислюються зліва направо, завжди можна прибрати дужки зі складного виразу, дотримуючись деяких правил.

- -

Прибирання вкладеного І

- -

Наступна складена операція з булевими значеннями:

- -
умова1 || (умова2 && умова3)
- -

завжди дорівнює:

- -
умова1 || умова2 && умова3
- -

Прибирання вкладеного АБО

- -

Наступна складена операція з булевими значеннями:

- -
умова1 && (умова2 || умова3)
- -

завжди дорівнює:

- -
!(!умова1 || !умова2 && !умова3)
- -

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

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
СпецифікаціяСтатусКоментар
{{SpecName('ES1')}}{{Spec2('ES1')}}Початкове визначення.
{{SpecName('ES5.1', '#sec-11.11')}}{{Spec2('ES5.1')}}Визначені у кількох розділах специфікації: Логічний оператор НЕ, Бінарні логічні оператори
{{SpecName('ES6', '#sec-binary-logical-operators')}}{{Spec2('ES6')}}Визначені у кількох розділах специфікації: Логічний оператор НЕ, Бінарні логічні оператори
{{SpecName('ESDraft', '#sec-binary-logical-operators')}}{{Spec2('ESDraft')}}Визначені у кількох розділах специфікації: Логічний оператор НЕ, Бінарні логічні оператори
- -

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

- - - -

{{Compat("javascript.operators.logical")}}

- -

Див. також

- - diff --git a/files/uk/conflicting/web/javascript/reference/statements/switch/index.html b/files/uk/conflicting/web/javascript/reference/statements/switch/index.html deleted file mode 100644 index d85d7dedc7..0000000000 --- a/files/uk/conflicting/web/javascript/reference/statements/switch/index.html +++ /dev/null @@ -1,119 +0,0 @@ ---- -title: default -slug: conflicting/Web/JavaScript/Reference/Statements/switch -translation_of: Web/JavaScript/Reference/Statements/switch -translation_of_original: Web/JavaScript/Reference/Statements/default -original_slug: Web/JavaScript/Reference/Statements/default ---- -
{{jsSidebar("Statements")}}
- -

Ключове слово default може використовуватись у двох ситуаціях у JavaScript: у конструкції {{jsxref("Statements/switch", "switch")}} або з оператором {{jsxref("Statements/export", "export")}}.

- -
{{EmbedInteractiveExample("pages/js/statement-default.html")}}
- - - -

Синтаксис

- -

У конструкції {{jsxref("Statements/switch", "switch")}}:

- -
switch (expression) {
-  case value1:
-    //Інструкції, що виконуються, коли значення expression дорівнює value1
-    [break;]
-  default:
-    //Інструкції, що виконуються, коли жодне значення не дорівнює значенню expression
-    [break;]
-}
- -

З оператором {{jsxref("Statements/export", "export")}}:

- -
export default nameN 
- -

Опис

- -

Більш детально дивіться на сторінках

- - - -

Приклади

- -

Використання default у конструкціях switch

- -

У наступному прикладі, якщо expr оцінюється як "Апельсини" або "Яблука", програма зайде або у блок case "Апельсини", або у "Яблука" та виконає відповідну інструкцію. Ключове слово default допоможе у будь-якому іншому випадку та виконає пов'язану інструкцію.

- -
switch (expr) {
-  case 'Апельсини':
-    console.log('Апельсини коштують $0.59 за кілограм.');
-    break;
-  case 'Яблука':
-    console.log('Яблука коштують $0.32 за кілограм.');
-    break;
-  default:
-    console.log('На жаль, в нас закінчились ' + expr + '.');
-}
- -

Використання default з export

- -

Якщо ви хочете експортувати єдине значення, або вам потрібне запасне значення модуля, можна використати default у export:

- -
// module "my-module.js"
-let cube = function cube(x) {
-  return x * x * x;
-};
-export default cube;
- -

Тоді у іншому скрипті буде прямий імпорт експорту за замовчуванням:

- -
// module "another-module.js"
-import cube from 'my-module';  //default export gave us the liberty to say import cube, instead of import cube from 'my-module'
-console.log(cube(3)); // 27
-
- -

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

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
СпецифікаціяСтатусКоментар
{{SpecName('ES6', '#sec-switch-statement', 'switch statement')}}{{Spec2('ES6')}}
{{SpecName('ES6', '#sec-exports', 'Exports')}}{{Spec2('ES6')}}
{{SpecName('ESDraft', '#sec-switch-statement', 'switch statement')}}{{Spec2('ESDraft')}}
{{SpecName('ESDraft', '#sec-exports', 'Exports')}}{{Spec2('ESDraft')}}
- -

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

- - - -

{{Compat("javascript.statements.default")}}

- -

Див. також

- - diff --git a/files/uk/glossary/404/index.html b/files/uk/glossary/404/index.html deleted file mode 100644 index cc3a56d14b..0000000000 --- a/files/uk/glossary/404/index.html +++ /dev/null @@ -1,18 +0,0 @@ ---- -title: '404' -slug: Glossary/404 -tags: - - Інфраструктура - - Глосарій - - Навігація - - Помилки HTTP -translation_of: Glossary/404 ---- -

404 – Стандартний Код Відповіді, що означає що {{Glossary("Server", "сервер")}} не в змозі знайти запитуваний ресурс.

- -

Дізнатись більше

- - diff --git a/files/uk/glossary/abstraction/index.html b/files/uk/glossary/abstraction/index.html deleted file mode 100644 index 22f96d1eb5..0000000000 --- a/files/uk/glossary/abstraction/index.html +++ /dev/null @@ -1,19 +0,0 @@ ---- -title: Абстракція -slug: Glossary/Abstraction -tags: - - Абстракція - - Мова Програмування - - Словник -translation_of: Glossary/Abstraction -original_slug: Glossary/Абстракція ---- -

Абстрація у галузі {{Glossary("computer programming", "комп'ютерного програмування")}} є способом зменшення складності, що вможливлює підвищення ефективності розробки та втілення складних систем програмного забезпечення. Вона ховає технічну складність системи за простішими {{Glossary("API", "програмними інтерфейсами")}}.

- -

Дізнатись більше

- -

Загальні відомості

- - diff --git a/files/uk/glossary/accessibility/index.html b/files/uk/glossary/accessibility/index.html deleted file mode 100644 index e48d539657..0000000000 --- a/files/uk/glossary/accessibility/index.html +++ /dev/null @@ -1,33 +0,0 @@ ---- -title: Веб-доступність (Web Accessibility) -slug: Glossary/Accessibility -tags: - - Доступність - - Словник -translation_of: Glossary/Accessibility -original_slug: Glossary/Веб_Доступність ---- -

Веб-доступність, або Доступність веб-сайтів (Web Accesability, A11Y), відноситься до передового досвіду для використання веб-сайту, незважаючи на фізичні та технічні обмеження. Веб-доступність формально визначається й обговорюється на {{Glossary("W3C")}} з {{Glossary("WAI","Web Accessibility Initiative","Ініціатива веб-доступності")}} (WAI).

- -

Дізнайтесь більше

- -

Загальні поняття

- - - -

Дізнайтесь про веб-доступність

- - - -

Технічні посилання

- - diff --git a/files/uk/glossary/adobe_flash/index.html b/files/uk/glossary/adobe_flash/index.html deleted file mode 100644 index c65ac7cf5f..0000000000 --- a/files/uk/glossary/adobe_flash/index.html +++ /dev/null @@ -1,20 +0,0 @@ ---- -title: Adobe Flash -slug: Glossary/Adobe_Flash -tags: - - Flash - - Інфраструктура - - Словник -translation_of: Glossary/Adobe_Flash ---- -

Flash це застаріваюча технологія розроблена Adobe, котра робить можливими багаті Веб застосунки, векторну графіку та мультимедіа. Для того, аби мати можливість користуватись Flash, необхідно скачати правильний плагін для {{Glossary("Browser","веб переглядача")}}.

- -

Довідатись більше

- -

Загальні поняття

- - diff --git a/files/uk/glossary/ajax/index.html b/files/uk/glossary/ajax/index.html deleted file mode 100644 index bfe326f0d8..0000000000 --- a/files/uk/glossary/ajax/index.html +++ /dev/null @@ -1,25 +0,0 @@ ---- -title: AJAX -slug: Glossary/AJAX -tags: - - AJAX - - Інфраструктура - - Глосарій -translation_of: Glossary/AJAX ---- -

AJAX (Asynchronous {{glossary("JavaScript")}} And {{glossary("XML")}}) є практикою програмування з комбінування {{glossary("HTML")}}, {{glossary("CSS")}}, JavaScript, моделі {{glossary("DOM")}}, і XMLHttpRequest {{glossary("object","об'єкт")}} для побудови більш складних та динамічних сторінок. AJAX дозволяє оновлювати лише частини веб-сторінок замість того, щоб перезавантажувати сторінку повністю. Також AJAX дає можливість працювати асинхронно: JavaScript продовжує працювати, поки частина сторінки намагається оновитися (на відміну від синхронного способу, який заблокує виконання будь-якого коду до закінчення перезавантаження сторінки).

- -

Довідатись більше

- -

Загальні поняття

- - - -

Технічна інформація

- - diff --git a/files/uk/glossary/algorithm/index.html b/files/uk/glossary/algorithm/index.html deleted file mode 100644 index 84691c54bc..0000000000 --- a/files/uk/glossary/algorithm/index.html +++ /dev/null @@ -1,19 +0,0 @@ ---- -title: Алгоритм -slug: Glossary/Algorithm -tags: - - Словник -translation_of: Glossary/Algorithm -original_slug: Glossary/Алгоритм ---- -

Алгоритм — це впорядкована послідовність дієвказів (інструкцій), що має на меті розв'язання певної задачі.

- -

Зазвичай під цим поняттям мається на увазі саме стратегія розв'язання (алгоритм сортування, алгоритм пошуку). Натомість програмний код, що втілює ту чи ту стратегію, називають реалізацією алгоритму.

- -

Дізнатись більше

- -

Загальні відомості

- - diff --git a/files/uk/glossary/alignment_container/index.html b/files/uk/glossary/alignment_container/index.html deleted file mode 100644 index cabd45b4b7..0000000000 --- a/files/uk/glossary/alignment_container/index.html +++ /dev/null @@ -1,17 +0,0 @@ ---- -title: Alignment container (Контейнер вирівнювання) -slug: Glossary/Alignment_Container -tags: - - CSS - - Вирівнювання - - Контейнер вирівнювання - - Словник -translation_of: Glossary/Alignment_Container ---- -

Контейнер вирівнювання - це прямокутник в якому вирівнюється об'єкт вирівнювання. Це визначається режимом компонування; зазвичай це вирівнювання об'єкта, та допускання режиму запису для контейнера, що містить блок.

- -

Дізнатись більше

- - diff --git a/files/uk/glossary/alignment_subject/index.html b/files/uk/glossary/alignment_subject/index.html deleted file mode 100644 index b5dc16601d..0000000000 --- a/files/uk/glossary/alignment_subject/index.html +++ /dev/null @@ -1,33 +0,0 @@ ---- -title: Alignment subject (Предмет вирівнювання) -slug: Glossary/Alignment_Subject -tags: - - CSS - - Вирівнювання - - Предмет вирівнювання - - Словник -translation_of: Glossary/Alignment_Subject ---- -

В вирівнюванні блоків CSS об'єкт вирівнювання це річь (або речі) вирівнювані за властивостями.

- -

Для {{cssxref("justify-self")}} і {{cssxref("align-self")}}, об'єкт вирівнювання запасний блок блоку на якому встановлено властивості, за допомогою режиму запису цього блоку.

- -

Для {{cssxref("justify-content")}} і {{cssxref("align-content")}}, режим запису блоку також використовується. Визначення об'єкта вирівнювання залежить від використовуваного режиму макета.

- -
-
Блокувати контейнери (включаючи чарунки таблиці)
-
Весь вміст блоку як єдине ціле.
-
Багатоколірні контейнери
-
Поля блоків, з будь-яким проміжком вставленим між полями блоків додаються до відповідних проміжків стовпців.
-
Гнучкі контейнери
-
Для {{cssxref("justify-content")}}, гнучкі елементи в кожній гнучкій лінії.
- Для {{cssxref("align-content")}}, гнучкі лінії. Зверніть увагу, що це впливає лише на багаторядкові гнучкі контейнери.
-
Контейнери сітки
-
Сітка доріжок у відповідній осі, з будь-яким проміжком, вставленим між доріжками, доданими до відповідних жолобів. Згорнуті жолоби розглядаються як єдина можливість вставки простору.
-
- -

Дізнатись більше

- - diff --git a/files/uk/glossary/api/index.html b/files/uk/glossary/api/index.html deleted file mode 100644 index b863dfe685..0000000000 --- a/files/uk/glossary/api/index.html +++ /dev/null @@ -1,35 +0,0 @@ ---- -title: API (Прикладний програмний інтерфейс) -slug: Glossary/API -tags: - - API - - Інфраструктура - - Словник -translation_of: Glossary/API ---- -

Прикладний програмний інтерфейс (англ. Application Programming Interface, скорочено API) — це сукупність засобів та правил, що вможливлюють взаємодію між окремими складниками програмного забезпечення або між програмним та апаратним забезпечення.

- -

У царині веб-розробки поняття API охоплює низку засобів програмного коду (як-от {{glossary("method","методи")}}, події та {{Glossary("URL","посиланння")}}), що їх розробник може використовувати у власних застосунках задля взаємодії з програмним чи апаратним навкіллям — зі складниками веб-переглядача, іншим програмним чи апаратним забезпеченням комп'ютера користувача, або й навіть сторонніми сайтами чи службами.

- -

Наприклад:

- - - -

Дізнатись більше

- -

Загальні поняття

- - - -

Технічна довідка

- - diff --git a/files/uk/glossary/apple_safari/index.html b/files/uk/glossary/apple_safari/index.html deleted file mode 100644 index 7f4d82eef9..0000000000 --- a/files/uk/glossary/apple_safari/index.html +++ /dev/null @@ -1,26 +0,0 @@ ---- -title: Apple Safari -slug: Glossary/Apple_Safari -tags: - - Глосарій - - Навігація -translation_of: Glossary/Apple_Safari ---- -

Safari (Сафарі) — це {{Glossary("Browser","веб-переглядач")}}, який розробляється компанією Apple. Його включено до операційних систем Mac OS X та iOS. Safari базується на рушії з відкритим програмним кодом "WebKit"

- -

Довідатись більше

- -

Загальні поняття

- - - -

Технічна інформація

- - diff --git a/files/uk/glossary/argument/index.html b/files/uk/glossary/argument/index.html deleted file mode 100644 index f68d539ca1..0000000000 --- a/files/uk/glossary/argument/index.html +++ /dev/null @@ -1,28 +0,0 @@ ---- -title: Арґумент -slug: Glossary/Argument -tags: - - JavaScript - - Словник -translation_of: Glossary/Argument -original_slug: Glossary/Арґумент ---- -

Арґумент — це своєрідний тип {{Glossary("Variable", "змінної")}}, що дозволяє передавати до {{Glossary("Function", "функції")}} ({{Glossary("Method", "метода")}}) необхідні {{Glossary("value", "значення")}}, {{Glossary("Scope", "область видимості")}} яких не виходитиме за її (функції) межі.

- -

Поняття «арґумент» та «параметр» часто вживаються як взаємозамінні, а справжнє значення з'ясовується зі словесного оточення.

- -

Втім слово параметр (чи то пак «формальний параметр») часто вживається на позначення змінних, наведених в самому оголошенні функції, а натомість слово арґумент (або ж «фактичний арґумент») частіше позначає {{Glossary("Primitive", "прості величини")}} або {{Glossary("Object", "об'єкти")}} які фактично було передано до функції під час її виклику.

- -

Дізнатись більше

- -

Загальні відомості

- - - -

Технічна довідка

- - diff --git a/files/uk/glossary/array/index.html b/files/uk/glossary/array/index.html deleted file mode 100644 index 8231f64187..0000000000 --- a/files/uk/glossary/array/index.html +++ /dev/null @@ -1,33 +0,0 @@ ---- -title: Array -slug: Glossary/array -tags: - - JavaScript - - Глосарій - - Масив - - Словник -translation_of: Glossary/array ---- -

Масив є упорядкованою сукупністю даних (або {{Glossary("primitive", "примітивних")}}, або {{Glossary("object", "об'єктів")}}, в залежності від мови). Масиви використовуються для зберігання множини значень у єдиній змінній. Для порівняння зі змінною, яка може зберігати лише одне значення.

- -

Кожен елемент у масиві має номер, що називається числовим індексом, який дозволяє звертатися до цього елемента. У {{glossary("JavaScript")}} масиви починаються з нульового індекса, ними можна маніпулювати за допомогою різних {{Glossary("Method", "методів")}}.

- -

Масив у JavaScript має наступний вигляд:

- -
var myArray = [1, 2, 3, 4];
-var catNamesArray = ["Мурко", "Сірко", "Василь"];
-//Масиви у JavaScript можуть містити різні типи данних, як показано вище.
- -

Дізнатись більше

- -

Загальні поняття

- - - -

Технічна довідка

- - diff --git a/files/uk/glossary/ascii/index.html b/files/uk/glossary/ascii/index.html deleted file mode 100644 index 5b6e43134b..0000000000 --- a/files/uk/glossary/ascii/index.html +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: ASCII -slug: Glossary/ASCII -tags: - - Словник -translation_of: Glossary/ASCII ---- -

ASCII (англ. American Standard Code for Information Interchange - Американський стандартний код для інформаційного обміну) - один з найпопулярніших методів кодування, який використовується комп'ютерами для перетворення літер, чисел, знаків пунктуації та керуючих кодів у цифровий вигляд. З 2007 {{Glossary("UTF-8")}} витіснив його у Web.

- -

Дізнатися більше

- -

Загальна інформація

- -

{{Interwiki("wikipedia", "ASCII")}} на Вікіпедії

diff --git a/files/uk/glossary/asynchronous/index.html b/files/uk/glossary/asynchronous/index.html deleted file mode 100644 index d3679facf4..0000000000 --- a/files/uk/glossary/asynchronous/index.html +++ /dev/null @@ -1,38 +0,0 @@ ---- -title: Асинхронність -slug: Glossary/Asynchronous -tags: - - Веб - - Словник - - асинхронність -translation_of: Glossary/Asynchronous ---- -

Термін асинхронність означає два або більше об'єктів чи подій, які не існують/відбуваються одночасно (або декілька пов'язаних процесів, які відбуваються без очікування, поки попередній процес завершиться). Для комп'ютерів слово "асинхронність" використовується у двох основних контекстах.

- -
-
Мережі та комунікації
-
-

Асинхронна комунікація - це метод обміну повідомленнями між двома або більшою кількістю сторін, коли кожна сторона отримує та обробляє повідомлення тоді, коли їй це зручно, а не негайно по отриманні. Додатково, повідомлення можуть відсилатися без очікування на підтвердження, з розумінням, що, якщо проблема виникне, одержувач відправить запит на виправлення, чи іншим чином розбереться з ситуацією.

- -

Для людей методом асинхронної комунікації є електронне листування; відправник надсилає лист, а отримувач прочитає його та відповість на повідомлення, коли йому буде зручно це зробити, замість того, щоб відповідати одразу. І обидві сторони продовжують відправляти та отримувати повідомлення, коли вони цього хочуть, замість того, щоб складати графік листування.

- -

Коли програмне забезпечення використовує асинхронну комунікацію, програма може зробити запит на отримання інформації від іншого програмного забезпечення (наприклад, сервера), та продовжувати робити щось інше, очікуючи на відповідь. Наприклад, техніка програмування AJAX (Asynchronous JavaScript and {{Glossary("XML")}}) — зазвичай, просто "Ajax", хоча зазвичай у сучасних застосунках {{Glossary("JSON")}} використовується замість XML — є механізмом, який робить запити на відносно невеликі об'єми даних від сервера, використовуючи {{Glossary("HTTP")}}, та отримує результат, коли той є доступним, а не миттєво.

-
-
Проектування програмного забезпечення
-
-

Проектування асинхронного програмного забезпечення розширює концепцію побудовою коду, який дозволяє програмі запросити виконання нової задачі паралельно з основною задачею (чи задачами), не зупиняючись на очікування, поки задача не буде виконана. Коли другорядна задача виконана, основна задача отримує повідомлення за допомогою узгодженого механізму, який повідомляє, що робота виконана, і що результат, якщо він є, тепер доступний.

- -

Існує ряд технік програмування для реалізації асинхронного програмного забезпечення. Для ознайомлення з темою дивіться статтю Асинхронність у JavaScript.

-
-
- -

Дізнайтесь більше

- -

Технічна довідка

- - - -

{{IncludeSubnav("/uk/docs/Glossary")}}

diff --git a/files/uk/glossary/block/css/index.html b/files/uk/glossary/block/css/index.html deleted file mode 100644 index cd100989a6..0000000000 --- a/files/uk/glossary/block/css/index.html +++ /dev/null @@ -1,24 +0,0 @@ ---- -title: Блок(Каскадні таблиці стилів) -slug: Glossary/Block/CSS -tags: - - CSS - - HTML - - Дизайн - - Скриптинг - - Словник -translation_of: Glossary/Block/CSS ---- -

Блок на веб-сторінці це {{glossary("HTML")}} {{glossary("element","елемент")}}, який з'являється на новому рядку, тобто під попереднім елементом у горизонтальному розташуванні і над наступним елементом (загальновідомим як блочний елемент). Наприклад, {{htmlelement("p")}} за налаштуванням є блочним елементом, тоді як  {{htmlelement("a")}} це рядковий елемент — ви можете написати декілька посилань поруч у вашому HTML і вони будуть розташовані поруч на одному рядку на сторінці в браузері.

- -

Використовуючи властивість {{cssxref("display")}} ви можете змінити чи елемент відображається в рядку або як блок (серед багатьох інших варіантів); блоки також підпадають під дію схем позиціонування та використання властивості {{cssxref("position")}}.

- -

Learn more

- -

General knowledge

- - - -
{{QuickLinksWithSubpages("/en-US/docs/Glossary")}}
diff --git a/files/uk/glossary/block/index.html b/files/uk/glossary/block/index.html deleted file mode 100644 index b582dc3189..0000000000 --- a/files/uk/glossary/block/index.html +++ /dev/null @@ -1,20 +0,0 @@ ---- -title: Блок -slug: Glossary/Block -tags: - - TopicStub - - Однозначність - - Словник -translation_of: Glossary/Block ---- -

Термін блок може мати кілька значень залежно від контексту. Він може стосуватись:

- -
-
Блок(Каскадні таблиці стилів)
-
Блок на веб-сторінці це {{glossary("HTML")}} {{glossary("element","елемент")}}, який з'являється на новому рядку, тобто під попереднім елементом у горизонтальному розташуванні і над наступним елементом (загальновідомим як блочний елемент). Наприклад, {{htmlelement("p")}} за налаштуванням є блочним елементом, тоді як  {{htmlelement("a")}} це рядковий елемент — ви можете написати декілька посилань поруч у вашому HTML і вони будуть розташовані поруч на одному рядку на сторінці в браузері.
-
- -
-
Блок(Скриптинг)
-
В {{glossary("JavaScript")}}, блок - це сукупність пов'язаних {{glossary("statement","інструкцій")}} що вкладені в фігурні дужки ("\{\}"). Наприклад, Ви можете помістити блок інструкцій після блоку  {{jsxref("Statements/if...else","if (condition)")}}, щоб інтепритатор виконав код в середині блоку, якщо умова правдива (true), або пропустив цілий клок, якщо умова хибна (false).
-
diff --git a/files/uk/glossary/block/scripting/index.html b/files/uk/glossary/block/scripting/index.html deleted file mode 100644 index 6807665f73..0000000000 --- a/files/uk/glossary/block/scripting/index.html +++ /dev/null @@ -1,20 +0,0 @@ ---- -title: Блок (Скриптинг) -slug: Glossary/Block/Scripting -tags: - - CodingScripting - - JavaScript - - Глосарій - - Словник -translation_of: Glossary/Block/Scripting -original_slug: Glossary/Block/Скриптинг ---- -

В {{glossary("JavaScript")}}, блок - це сукупність пов'язаних {{glossary("statement","інструкцій")}} що вкладені в фігурні дужки ("{}"). Наприклад, Ви можете помістити блок інструкцій після блоку  {{jsxref("Statements/if...else","if (condition)")}}, щоб інтепритатор виконав код в середині блоку, якщо умова правдива (true), або пропустив цілий клок, якщо умова хибна (false).

- -

Дізнатись більше

- -

Дізнайтеся про це

- - diff --git a/files/uk/glossary/boolean/index.html b/files/uk/glossary/boolean/index.html deleted file mode 100644 index 94fd29f1c8..0000000000 --- a/files/uk/glossary/boolean/index.html +++ /dev/null @@ -1,54 +0,0 @@ ---- -title: Boolean -slug: Glossary/Boolean -tags: - - Boolean - - CodingScripting - - JavaScript - - Мови програмування - - Словник - - Типи даних -translation_of: Glossary/Boolean ---- -

У галузі комп'ютерних наук Boolean (укр. Булевий вираз) це логічний тип данних що може мати лише значення true ("вірний" або "так") або false ("помилковий" або "ні"). Наприклад, в JavaScript, Булеві умови часто використовуються для вирішення які секції коду виконувати (наприклад в операторах if) або повторити (наприклад в циклах).

- -

Нижче JavaScript псевдокод (це не дійсно виконуваний код), що демонструє цю концепцію.

- -
/* JavaScript if statement */
-if (boolean conditional) {
-   // код виконується якщо умова вірна
-}
-
-if (boolean conditional) {
-  console.log("boolean conditional resolved to true");
-} else {
-  console.log("boolean conditional resolved to false");
-}
-
-
-/* JavaScript for loop */
-for (control variable; boolean conditional; counter) {
-  // код виконується повторно якщо умова вірна
-}
-
-for (var i=0; i < 4; i++) {
-  console.log("I print only when the boolean conditional is true");
-}
-
- -

Булеве значення названо на честь англійського математика {{interwiki("wikipedia", "Джордж_Буль", "Джордж Буль")}} піонера на ниві математичної логіки.

- -

Дізнатись більше

- -

Загальна інформація

- - - -

Технічна довідка

- - diff --git a/files/uk/glossary/browser/index.html b/files/uk/glossary/browser/index.html deleted file mode 100644 index a93193d895..0000000000 --- a/files/uk/glossary/browser/index.html +++ /dev/null @@ -1,27 +0,0 @@ ---- -title: Переглядач -slug: Glossary/Browser -tags: - - Навігація - - Словник -translation_of: Glossary/Browser ---- -

Переглядач (англ. browser) — програма, що отримує та показує сторінки з {{Glossary("World Wide Web","мережі")}}, та надає користувачам доступ до інших сторінок через {{Glossary("hyperlink","гіперпосилання")}}.

- -

Дізнатись більше

- -

Загальні відомості

- - - -

Завантажити переглядач

- - diff --git a/files/uk/glossary/buffer/index.html b/files/uk/glossary/buffer/index.html deleted file mode 100644 index bb0c4d5613..0000000000 --- a/files/uk/glossary/buffer/index.html +++ /dev/null @@ -1,34 +0,0 @@ ---- -title: Буфер -slug: Glossary/buffer -tags: - - Буфер - - Кеш - - Словник -translation_of: Glossary/buffer -original_slug: Glossary/Буфер ---- -

Буфер — це ділянка фізичної пам'яті (зазвичай, оперативної), що використовується для тимчасового зберігання даних на час їх передачі з одного місця (носія) в інше.

- -

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

- - - -

Дізнатись більше

- -

Загальні відомості

- - diff --git a/files/uk/glossary/cache/index.html b/files/uk/glossary/cache/index.html deleted file mode 100644 index 3f627b90c2..0000000000 --- a/files/uk/glossary/cache/index.html +++ /dev/null @@ -1,19 +0,0 @@ ---- -title: Cache -slug: Glossary/Cache -tags: - - HTTP - - Словник -translation_of: Glossary/Cache ---- -

Cache (укр. кеш) (web cache або HTTP cache) це компонент, який тимчасово зберігає відповіді HTTP, щоб його можна було використовувати для наступних HTTP-запитів, якщо він відповідає певним умовам.

- -

.

- -

Дізнатись більше

- -

Загальна інформація

- - diff --git a/files/uk/glossary/callback_function/index.html b/files/uk/glossary/callback_function/index.html deleted file mode 100644 index e7b8948786..0000000000 --- a/files/uk/glossary/callback_function/index.html +++ /dev/null @@ -1,35 +0,0 @@ ---- -title: Функція зворотного виклику -slug: Glossary/Callback_function -tags: - - Словник - - Функція - - зворотний виклик -translation_of: Glossary/Callback_function ---- -

Функція зворотного виклику (callback function) - це функція, яка передається іншій функції в якості аргументу та викликається всередині зовнішньої функції для виконання певних дій.

- -

Ось швидкий приклад:

- -
function greeting(name) {
-  alert('Привіт ' + name);
-}
-
-function processUserInput(callback) {
-  var name = prompt("Будь ласка, введіть своє ім'я.");
-  callback(name);
-}
-
-processUserInput(greeting);
- -

Наведений приклад є {{glossary("synchronous","синхронним")}} зворотним викликом, так як він виконується негайно.

- -

Зауважте, однак, що функції зворотного виклику часто використовуються, щоб продовжувати виконання коду після завершення {{glossary("asynchronous","асинхронної")}} операції — вони називаються асинхронними функціями зворотного виклику. Гарним прикладом є фукнція зворотного виклику, що виконується всередині блоку .then(), приєднаного в кінець проміса, після чого проміс вирішується або відхиляється. Ця структура використовується у багатьох сучасних веб API, таких як fetch().

- -

Дізнайтесь більше

- -

Загальні відомості

- - diff --git a/files/uk/glossary/canvas/index.html b/files/uk/glossary/canvas/index.html deleted file mode 100644 index 3c7c015253..0000000000 --- a/files/uk/glossary/canvas/index.html +++ /dev/null @@ -1,29 +0,0 @@ ---- -title: Canvas -slug: Glossary/Canvas -translation_of: Glossary/Canvas ---- -

{{Glossary("HTML")}} {{HTMLElement("canvas")}} елемент, що забезпечує порожнє графічне поле, на котрому певні  {{Glossary("JavaScript")}} {{Glossary("API","APIs")}} можуть малювати (такі як Canvas 2D чи {{Glossary("WebGL")}}).

- -

Вивчіть більше

- -

Загальні знання

- - - -

Навчаьні джерела

- - - -

Технічна інформація

- - diff --git a/files/uk/glossary/character/index.html b/files/uk/glossary/character/index.html deleted file mode 100644 index fdf8c95d6d..0000000000 --- a/files/uk/glossary/character/index.html +++ /dev/null @@ -1,21 +0,0 @@ ---- -title: Символ -slug: Glossary/Character -tags: - - Словник - - рядки -translation_of: Glossary/Character ---- -

Символом може бути літера, число, знак пунктуації або недруковані керуючі символи (наприклад, повернення каретки або знак м'якого переносу).  {{glossary("UTF-8")}} - найбільш поширений набір символів, який включає графеми найпопулярніших мов.

- -

Дізнатись більше

- -

Загальні відомості

- - diff --git a/files/uk/glossary/character_encoding/index.html b/files/uk/glossary/character_encoding/index.html deleted file mode 100644 index 0639646a48..0000000000 --- a/files/uk/glossary/character_encoding/index.html +++ /dev/null @@ -1,25 +0,0 @@ ---- -title: Кодування символів -slug: Glossary/character_encoding -tags: - - Словник -translation_of: Glossary/character_encoding ---- -

Кодування визначає співвідношення між байтами та текстом. Послідовність байтів допускає різні текстові інтерпретації. Вказуючи певне кодування (наприклад, UTF-8), ми вказуємо, як інтерпретувати послідовність байтів.

- -

Наприклад, у HTML ми зазвичай оголошуємо кодування UTF-8, за допомогою наступного рядка:

- -
-
<meta charset="utf-8">
- -

Це гарантує, що ви зможете використовувати символи практично будь-якої людської мови у своєму HTML-документі, і вони будуть коректно відображені.

-
- -

Дізнатись більше

- -

Загальні відомості

- - diff --git a/files/uk/glossary/cipher/index.html b/files/uk/glossary/cipher/index.html deleted file mode 100644 index 99e0930a41..0000000000 --- a/files/uk/glossary/cipher/index.html +++ /dev/null @@ -1,34 +0,0 @@ ---- -title: Шифр -slug: Glossary/Cipher -tags: - - Безпека - - Криптографія - - Приватність - - Словник -translation_of: Glossary/Cipher -original_slug: Glossary/Шифр ---- -

В {{glossary("Криптографія","криптографії")}}, шифр це алгоритм, що спроможний {{glossary("encryption", "шифрувати")}} {{glossary("cleartext","відкритий текст")}} і зробити його нечитабельним, та {{glossary("decryption", "дешифрувати")}} його назад.

- -

Шифри набули широкої росповсюдженості ще до інформаційної ери (наприклад, шифри підстановки, шифри транспозиції та шифри перестановки), але жоден з них не був криптографічно безпечним, окрім Шифра Вернама.

- -

Сучасні шифри спроектовані щоб протистояти {{glossary("attack", "атакам")}} розробленим {{glossary("cryptanalysis", "криптоаналітиками")}}. Немає гарантій, що всі методи атак були відкриті, але кожен алгоритм заточений під відомі класи атак.

- -

Шифри працюють двома шляхами: блочні шифри на послідовних блоках чи буферах дати, та потокові шифри на потоці даних, що є безперервним (часто це потоки звуку чи відеo).

- -

Також існує класифікація за методами обробки їх {{glossary("key", "ключів")}}:

- - - -

Довідатись більше

- -

Загальні поняття

- - diff --git a/files/uk/glossary/ciphertext/index.html b/files/uk/glossary/ciphertext/index.html deleted file mode 100644 index af4ed1afac..0000000000 --- a/files/uk/glossary/ciphertext/index.html +++ /dev/null @@ -1,20 +0,0 @@ ---- -title: Шифротекст -slug: Glossary/Ciphertext -tags: - - Безпека - - Криптографія - - Приватність - - Словник -translation_of: Glossary/Ciphertext -original_slug: Glossary/Шифротекст ---- -

В {{glossary("Криптографія","криптографії")}}, шифротекст це зашифроване повідомлення, що передає інформацію, але воно є нерозбірливим до процесу {{glossary("decryption","дешифрування")}} правильно підібраним {{glossary("Шифр","шифром")}} і правильним секретом (зазвичай це {{glossary("key","ключ")}}), що дасть змогу відтворити оригінальний {{glossary("cleartext","відкритий текст")}}. Рівень захищеності шифротексту і секретність вміщеної інформації залежать від використання безпечного шифру та зберігання ключа в таємниці.

- -

Довідатись більше

- -

Загальні поняття

- - diff --git a/files/uk/glossary/closure/index.html b/files/uk/glossary/closure/index.html deleted file mode 100644 index 193254d230..0000000000 --- a/files/uk/glossary/closure/index.html +++ /dev/null @@ -1,47 +0,0 @@ ---- -title: Замикання -slug: Glossary/Closure -tags: - - JavaScript - - Словник -translation_of: Glossary/Closure -original_slug: Glossary/Замикання ---- -

Замикання (англ. closure) — це певний різновид сполучення між {{glossary("scope", "областями видимості")}}, що уможливлює доступ до місцевих (локальних) змінних зовнішнього середовища виконання з новоствореного внутрішнього середовища. У {{glossary("JavaScript")}} всяка {{glossary("function", "функція")}} створює замикання.

- -

Приклади

- -

В наступному прикладі наведено безіменну функцію, що має доступ до місцевих змінних зовнішньої функції, що її створила:

- -
function createSequenceGenerator(begin = 0) {
-  var value = begin;
-
-  return function() {
-    return value++;
-  };
-}
- -

Місцева змінна value доступна зсередини безіменної функції навіть по завершенню виконання функції createSequenceGenerator, що її створила:

- -
var seq1 = createSequenceGenerator();
-var seq2 = createSequenceGenerator(1000);
-
-console.log(seq1());  // виводить 0
-console.log(seq1());  // виводить 1
-console.log(seq2());  // виводить 1000
-console.log(seq2());  // виводить 1001
-console.log(seq1());  // виводить 2
- -

Дізнатись більше

- -

Загальні відомості

- - - -

Технічна довідка

- - diff --git a/files/uk/glossary/compile/index.html b/files/uk/glossary/compile/index.html deleted file mode 100644 index 1e89dfece6..0000000000 --- a/files/uk/glossary/compile/index.html +++ /dev/null @@ -1,27 +0,0 @@ ---- -title: Компіляція -slug: Glossary/Compile -translation_of: Glossary/Compile -original_slug: Glossary/Компіляція ---- -

Компіляція це процес перетворення комп'ютерної програми, написаної на {{Glossary("computer programming", "мові программування")}} у відповідний код на іншій мові програмування. Компілятор - це програмне забеспечення яке виконує це перетворення. Інколи цей процес називають "збирання" або "побудова", що як правило, означає бульше, ніж просто виконання компіляції, наприклад упакування його у двійковому форматі. 

- -

Зазвичай компілятор перетворює мову високого рівня, таку як С чи  {{Glossary("Java")}}, яка зрозуміла людям, на машинну мову, таку як Ассемблер, яку розуміє процесор. Деякі компілятори перекладають на подібні за рівнем мови, їх називають транспайлер або крос-компілятор, наприклад компіляція з TypeScript на {{Glossary("JavaScript")}}. Це вважається інтрументами продуктивності.

- -

Більшість компіляторів працюють або ahead-of-time (AOT) або just-in-time (JIT). Як програміст ти  зазвичай запускаєш компілятор з командного рядка або зі свого {{Glossary("IDE")}}. Як приклад, один з найпопулярніших "gcc".  JIT компілятор зазвичай виконується прозоро для вас.  Наприклад  браузер Firefox' SpiderMonkey JavaScript Engine має вбудований JIT компялітор, який перетворює JavaScript на сайті у машиний код під час перегляду, щоб він працював швидше. Такі проекти як  WebAssembly, працюють над тим щоб робити це ще краще.

- -

Дізнатися більше

- -

Загальна інформація

- - - -

Посилання для вивчення

- - diff --git a/files/uk/glossary/computer_programming/index.html b/files/uk/glossary/computer_programming/index.html deleted file mode 100644 index f3c8ade2ee..0000000000 --- a/files/uk/glossary/computer_programming/index.html +++ /dev/null @@ -1,21 +0,0 @@ ---- -title: Комп'ютерне програмування -slug: Glossary/Computer_Programming -tags: - - Мова Програмування - - Програмування - - Словник -translation_of: Glossary/Computer_Programming ---- -

Комп'ютерне програмування - це процес складання та організації колекції інструкцій. Вони кажуть комп'ютеру/програмному забезпеченню, що робити, тією мовою, яку розуміє комп'ютер. Ці інструкції подаються у формі багатьох різних мов, таких як C++, Java, JavaScript, HTML, Python, Ruby та Rust.  

- -

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

- -

Дізнайтесь більше

- -

Загальні відомості

- - diff --git a/files/uk/glossary/conditional/index.html b/files/uk/glossary/conditional/index.html deleted file mode 100644 index 102d5428d9..0000000000 --- a/files/uk/glossary/conditional/index.html +++ /dev/null @@ -1,30 +0,0 @@ ---- -title: Умовна конструкція -slug: Glossary/Conditional -tags: - - Словник -translation_of: Glossary/Conditional ---- -

Умова - це набір правил, які можуть перервати нормальне виконання коду або змінити його, в залежності від того, чи була виконана умова.

- -

Інструкція або набір інструкцій виконуються, якщо була виконана вказана умова. Інакше, виконується інша інструкція. Також можливо повторювати виконання інструкції чи набору інструкцій, доки умова не буде виконана.

- -

Дізнатись більше

- -

Загальні відомості

- - - -

Технічна довідка

- - - -

Навчання

- - diff --git a/files/uk/glossary/constant/index.html b/files/uk/glossary/constant/index.html deleted file mode 100644 index 1141403d06..0000000000 --- a/files/uk/glossary/constant/index.html +++ /dev/null @@ -1,19 +0,0 @@ ---- -title: Константа -slug: Glossary/Constant -tags: - - Словник - - константа -translation_of: Glossary/Constant ---- -

Константа - це значення, яке програміст не може змінити, наприклад, число (1, 2, 42). Що стосується {{glossary("variable","змінних")}}, з іншого боку, програміст може присвоїти нове {{glossary("value","значення")}} змінній, яка вже використовується.

- -

Як і змінні, деякі константи прив'язані до ідентифікаторів. Наприклад, ідентифікатор pi може бути прив'язаний до значення 3.14... .

- -

Дізнайтесь більше

- -

Загальні відомості

- - diff --git a/files/uk/glossary/control_flow/index.html b/files/uk/glossary/control_flow/index.html deleted file mode 100644 index b77252424a..0000000000 --- a/files/uk/glossary/control_flow/index.html +++ /dev/null @@ -1,45 +0,0 @@ ---- -title: Потік керування -slug: Glossary/Control_flow -tags: - - JavaScript - - Словник -translation_of: Glossary/Control_flow ---- -

Потік керування (control flow - англ.) - це порядок, у якому комп'ютер виконує інструкції скрипта.

- -

Код виконується у порядку від першого до останнього рядка, крім випадків, коли комп'ютер зустрічає (надзвичайно часто) структури, які змінюють потік керування, такі як умовні конструкції та цикли. 

- -

Наприклад, уявіть скрипт, який перевіряє дані користувача, отримані через форму веб-сторінки. Скрипт приймає перевірені дані, але, якщо користувач, скажімо, залишає обов'язкове поле порожнім, скрипт спонукає користувача його заповнити. Щоб зробити це, скрипт використовує {{Glossary("Conditional", "умовну")}} структуру, або if...else, щоб, в залежності від того, чи завершено заповнення форми, виконувався різний код:

- -
if (field==empty) {
-    promptUser();
-} else {
-    submitForm();
-}
- -

Типовий скрипт у {{glossary("JavaScript")}} чи {{glossary("PHP")}} (і подібних) включає багато керуючих структур, в тому числі умовних конструкцій, {{Glossary("Loop", "циклів")}} та {{Glossary("Function", "функцій")}}. Частини скрипту також можуть виконуватись, коли виникають {{Glossary("Event", "події")}}.

- -

Наприклад, наведений вище уривок може знаходитись всередині функції, яка запускається, коли користувач натискає на кнопку Прийняти на формі. Функція також може містити цикл, який перебирає усі поля форми, перевіряючи їх усі по черзі. Повертаючись до коду у секціях if та else, рядки promptUser та submitForm можуть також бути викликами інших функцій скрипта. Як бачите, контролюючі структури можуть диктувати комплексні потоки виконання навіть кількома рядками коду.

- -

Потік керування означає, що коли ви читаєте скрипт, ви маєте не лише читати його з початку до кінця, але також дивитись на структуру програми й на те, як вона впливає на порядок виконання.

- -

Дізнатись більше

- -

Загальні відомості

- - - -

Технічна довідка

- - - -

Навчання

- - diff --git a/files/uk/glossary/cryptanalysis/index.html b/files/uk/glossary/cryptanalysis/index.html deleted file mode 100644 index 4d0d870547..0000000000 --- a/files/uk/glossary/cryptanalysis/index.html +++ /dev/null @@ -1,20 +0,0 @@ ---- -title: Криптоаналіз -slug: Glossary/Cryptanalysis -tags: - - Безпека - - Криптографія - - Приватність - - Словник -translation_of: Glossary/Cryptanalysis -original_slug: Glossary/Криптоаналіз ---- -

Криптоаналіз це галузь {{glossary("криптографія","криптографії")}}, що вивчає шляхи взлому кодів та криптосистем. Криптоаналіз створює техніки взлому {{glossary("cipher","шифру")}}, зокрема більш ефективними методами ніж метод "грубої сили". На додачу до традиціїних методів, як частотний аналіз та індекс збігів, криптоаналіз включає більш нові методи, такі як лінійний криптаналіз або диференціальний криптоаналіз, що можуть взламати прогресивніші шифри.

- -

Довідатись більше

- -

Загальні поняття

- - diff --git a/files/uk/glossary/cryptographic_hash_function/index.html b/files/uk/glossary/cryptographic_hash_function/index.html deleted file mode 100644 index 6a6a3fa03d..0000000000 --- a/files/uk/glossary/cryptographic_hash_function/index.html +++ /dev/null @@ -1,28 +0,0 @@ ---- -title: Криптографічна геш-функція -slug: Glossary/Cryptographic_hash_function -tags: - - Безпека - - Криптографія - - Словник -translation_of: Glossary/Cryptographic_hash_function -original_slug: Glossary/Криптографічна_геш-функція ---- -

Криптографічна геш-функція, яка також іноді називається дайджест-функція, це одна з {{glossary("криптографія", "криптографічних")}} основ, на меті якої трансформація повідомлення довільного розміру в повідомлення фіксованого розміру, що називається {{glossary("digest","дайджест")}}. Криптографічні геш-функції використовуються для автентифікації, {{Glossary("digital signature", "цифрових підписів")}} та {{Glossary("HMAC", "кодів автентифікації повідомлень (МАС-підписів)")}}.

- -

Щоб використовуватись у криптографії, геш-функція мусить мати такі якості:

- - - -

Криптографічні геш-функції як MD5 і SHA-1 вважаються взломаними, бо знайшлись методи атак, що значно зменшили їх стійкість до суперечностей.

- -

Довідатись більше

- - diff --git a/files/uk/glossary/cryptography/index.html b/files/uk/glossary/cryptography/index.html deleted file mode 100644 index 7438b3d208..0000000000 --- a/files/uk/glossary/cryptography/index.html +++ /dev/null @@ -1,23 +0,0 @@ ---- -title: Криптографія -slug: Glossary/Cryptography -tags: - - Безпека - - Криптографія - - Приватність - - Словник -translation_of: Glossary/Cryptography -original_slug: Glossary/Криптографія ---- -

Криптографія (або криптологія) - це наука яка вивчає методи кодування і безпечної передачі повідомлень. Криптографія створює і вивчає алгоритми, що використовуються для шифрування і дешифрування повідомлень в незахищеному середовищі, і їх використання. Це не тільки конфіденційність даних, криптографія також вивчає ідентифікацію, аутентифікацію, невідмовність і цілісність даних. Тому вона також вивчає використання криптографічних методів в контексті, криптосистеми.

- -

Довідатись більше

- -

Загальні поняття

- - diff --git a/files/uk/glossary/css/index.html b/files/uk/glossary/css/index.html deleted file mode 100644 index eeec6f5077..0000000000 --- a/files/uk/glossary/css/index.html +++ /dev/null @@ -1,48 +0,0 @@ ---- -title: CSS -slug: Glossary/CSS -tags: - - CSS - - Веб - - Глосарій -translation_of: Glossary/CSS ---- -

CSS (Cascading Style Sheets) це декларативна мова програмування, яка контролює зовнішній вигляд веб-сторінок у {{glossary("browser", "браузері")}}. Браузер застосовує декларації стилей CSS до обраних елементів для їх коректного відображення. Декларація стиля складається з властивостей та їх значень, які обумовлюють вигляд веб-сторінки.

- -

CSS це одна із трьох ключових частин веб-технологій, разом із {{Glossary("HTML")}} та {{Glossary("JavaScript")}}. CSS зазвичай використовується для опису стилей {{Glossary("Element","HTML елементів")}}, але також може працювати із іншими мовами розмітки, такими як {{Glossary("SVG")}} чи {{Glossary("XML")}}.

- -

Правило CSS це набір {{Glossary("CSS Property","властивостей")}}, асоційованих із {{Glossary("selector", "селектором")}}. Ось приклад, який задає кожному параграфу жовтий колір тексту на чорному фоні:

- -
/* Селектор "p" вказує, що правило буде застосоване для всіх параграфів на сторінці. */
-p {
-  /* Властивість "color" визначає колір тексту, у цьому випадку жовтий. */
-  color: yellow;
-
-  /* Властивість "background-color" визначає колір фону, у цьому разі чорний. */
-  background-color: black
-}
- -

"Каскадність" це правила, за якими визначаються більш значимі селектори, ті, яким браузер віддасть приорітет при застосуванні стилей. Це дуже важливо, так як складний веб-сайт може мати тисячі правил CSS.

- -

Довідатись більше

- -

Загальні поняття

- - - -

Технічна інформація

- - - -

Вивчати CSS

- - diff --git a/files/uk/glossary/data_structure/index.html b/files/uk/glossary/data_structure/index.html deleted file mode 100644 index 52d1d78523..0000000000 --- a/files/uk/glossary/data_structure/index.html +++ /dev/null @@ -1,16 +0,0 @@ ---- -title: Структура даних -slug: Glossary/Data_structure -tags: - - Словник -translation_of: Glossary/Data_structure ---- -

Структура даних це спосіб організації даних, для ефективного подальшого їх використання.

- -

Довідатись більшеEdit

- -

Загальні поняття

- - diff --git a/files/uk/glossary/decryption/index.html b/files/uk/glossary/decryption/index.html deleted file mode 100644 index d82125a846..0000000000 --- a/files/uk/glossary/decryption/index.html +++ /dev/null @@ -1,26 +0,0 @@ ---- -title: Дешифрування -slug: Glossary/Decryption -tags: - - Безпека - - Криптографія - - Приватність - - Словник -translation_of: Glossary/Decryption -original_slug: Glossary/Дешифрування ---- -

В {{glossary("Криптографія","криптографії")}}, дешифрування це трансформація {{glossary("Шифротекст","шифротексту")}} в {{glossary("cleartext","відкритий текст")}}.

- -

Дешифрування це одна з криптографічних основ: цей процес перетворює повідомлення з шифротекстом в відкритий текст, використовуючи криптографічний алгоритм, що називається {{glossary("шифр")}}. Як і шифрування, дешифрування з використанням сучасних шифрів виконується за допомгою специфічних алгоритмів і секрету, який називають {{glossary("key","ключем")}}. Так як алгоритми часто є публічними, то ключ має зберігатись в таємниці, якщо шифрування має бути захищеним.

- -

The decryption primitive.

- -

Дешифрування це процес, протилежний процесу {{glossary("encryption","шифрування")}} і якщо ключ залишається в таємниці, то деширування без знання конкретного секрету є складним з математичної точки зору. Складність залежить від рівня захищеності обраного криптографічного алгоритму і розвивається разом з {{glossary("криптоаналіз","криптоаналізом")}}.

- -

Довідатись більше

- -

Teхнічна довідка

- - diff --git a/files/uk/glossary/doctype/index.html b/files/uk/glossary/doctype/index.html deleted file mode 100644 index f30daf9f01..0000000000 --- a/files/uk/glossary/doctype/index.html +++ /dev/null @@ -1,30 +0,0 @@ ---- -title: Doctype -slug: Glossary/Doctype -tags: - - HTML - - Метадані - - Словник - - Тип документа -translation_of: Glossary/Doctype ---- -

<!DOCTYPE> вказує {{Glossary("browser", "переглядачеві")}}, яку версію {{Glossary("HTML")}} (чи {{glossary("XML")}}) було використано для створення документа. Doctype є оголошенням, але не {{Glossary("tag", "тегом")}}; його можна називати «Визначенням типу документа», або скорочено «DTD» (Document Type Declaration).

- -

На початку {{Glossary("HTML")}}-документа очікується оголошення <!DOCTYPE html>, що має на меті завадити використанню переглядачем так званого «режиму сумісності» для відображення документа. Інакше кажучи, це оголошення змушує переглядач якнайточніше дотримуватися вимог відповідних специфікацій, а не вдаватися до використання режиму відображення, що є несумісним з деякими специфікаціями.

- -

Дізнатись більше

- -

Загальні відомості

- - - -

Технічна довідка

- - diff --git a/files/uk/glossary/dom/index.html b/files/uk/glossary/dom/index.html deleted file mode 100644 index 01bf41b037..0000000000 --- a/files/uk/glossary/dom/index.html +++ /dev/null @@ -1,30 +0,0 @@ ---- -title: DOM (Document Object Model) -slug: Glossary/DOM -tags: - - CodingScripting - - DOM - - Словник -translation_of: Glossary/DOM ---- -

DOM (англ. Document Object Model, укр. Об'єктна модель документа) - це {{glossary("API")}}, який представляє та взаємодіє з будь-яким {{glossary("HTML")}} або {{glossary("XML")}} документом. DOM - це модель документа, завантажена у {{glossary("browser","переглядач")}}, що представляє документ як дерево вузлів, де кожен вузол представляє частину документа (наприклад, {{Glossary("element","елемент")}}, текстовий рядок або коментар).

- -

DOM - один з найбільш використовуваних {{Glossary("API")}} у {{glossary("World Wide Web","всесвітній мережі")}}, тому що він дозволяє коду, запущеному в переглядачі, мати доступ і взаємодіяти з кожним вузлом документа. Вузли можна створювати, переміщувати та змінювати. Слухачі подій можуть бути додані до вузлів і спрацьовувати під час виникнення заданої події.

- -

DOM не було визначено спочатку - це сталося, коли веб-переглядачі почали реалізовувати {{Glossary("JavaScript")}}. Цей успадкований DOM іноді називають DOM 0. Сьогодні асоціація WHATWG підтримує стандарт DOM Living Standard.

- -

Дізнатись більше

- -

Загальна інформація

- - - -

Технічна інформація

- - diff --git a/files/uk/glossary/dynamic_programming_language/index.html b/files/uk/glossary/dynamic_programming_language/index.html deleted file mode 100644 index f93ccfccae..0000000000 --- a/files/uk/glossary/dynamic_programming_language/index.html +++ /dev/null @@ -1,23 +0,0 @@ ---- -title: Динамічна мова програмування -slug: Glossary/Dynamic_programming_language -tags: - - ДМП - - Динамічна мова програмування - - Словник -translation_of: Glossary/Dynamic_programming_language -original_slug: Glossary/Динамічна_мова_програмування ---- -

 

- -

Динамічна мова програмування, це мова програмування в якій операції, які в іншому разі обробляються в процесі компіляції, можуть здійснюватись в ході виконання коду. Наприклад, в JavaScript можливо змінювати тип змінної чи додавати нові властивості чи методи до об'єкта, коли програма запущена. 

- -

Термін протиставляється, так званим, статичним мовам програмування, в яких такі зміни типово не можливі.

- -

Learn more

- -

General knowledge

- - diff --git a/files/uk/glossary/ecmascript/index.html b/files/uk/glossary/ecmascript/index.html deleted file mode 100644 index f39f348d43..0000000000 --- a/files/uk/glossary/ecmascript/index.html +++ /dev/null @@ -1,22 +0,0 @@ ---- -title: ECMAScript -slug: Glossary/ECMAScript -tags: - - Словник -translation_of: Glossary/ECMAScript ---- -

ECMAScript - це стандарт мови програмування, на якому базується {{glossary("JavaScript")}}. Стандартизацією ECMAScript займається  Ecma International.

- -

Дізнатись більше

- -

Загальні відомості

- - - -

Технічна довідка

- - diff --git a/files/uk/glossary/element/index.html b/files/uk/glossary/element/index.html deleted file mode 100644 index 3a31d88f60..0000000000 --- a/files/uk/glossary/element/index.html +++ /dev/null @@ -1,21 +0,0 @@ ---- -title: Елемент -slug: Glossary/Element -tags: - - CodingScripting - - HTML - - Словник -translation_of: Glossary/Element ---- -

Елемент - частина веб-сторінки. В {{glossary("XML")}} та {{glossary("HTML")}}, елемент може містити данні або фрагмент тексту або зображення, або можливо нічого. Типовий елемент включає в себе відкриваючий тег з деякими атрибутами, вкладений текстовий вміст і закриваючий тег.
- Example: in <p class="nice">Hello world!</p>, '<p class="nice">' is an opening tag, 'class="nice"' is an attribute and its value, 'Hello world!' is enclosed text content, and '</p>' is a closing tag.

- -

Елементи та теги не одне й те саме. Теги починаються або закінчуються елементом у вихідному коді, тоді як елементи є частиною {{Glossary("DOM")}}, моделлю документа для відображення сторінки в {{glossary("browser")}}.

- -

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

- - diff --git a/files/uk/glossary/encryption/index.html b/files/uk/glossary/encryption/index.html deleted file mode 100644 index 2a296902dc..0000000000 --- a/files/uk/glossary/encryption/index.html +++ /dev/null @@ -1,25 +0,0 @@ ---- -title: Шифрування -slug: Glossary/Encryption -tags: - - Безпека - - Криптографія - - Приватність - - Словник -translation_of: Glossary/Encryption ---- -

В {{glossary("Криптографія","криптографії")}}, шифрування це трансфромація {{glossary("cleartext","відкритого тексту")}} в кодований текст або {{glossary("ciphertext","шифротекст")}}. Шифротекст призначений бути нечитабельним  для неавторизованих читачів.

- -

Шифрування це основа криптографії: воно трансформує повідомлення з текстовими даними в шифротекст використовуючи алгоритм, що називається " {{glossary("cipher","шифром")}} ". Шифруванння з використанням сучасних шифрів виконується за допомогою специфічних алгоритмів і секрету, що має назву {{glossary("key","ключ")}}. Так як алгоритми досить часто є в публічному доступі, то ключ має залишатись таємним, якщо шифрування має бути захищеним.

- -

Як працює шифрування. Відкритий текст(Cleartext) проходить процес шифрування(Encrypt) з використанням шифру(Cipher) й на виході маємо шифротекст(Ciphertext).

- -

Як працює шифрування. Відкритий текст(Cleartext) проходить процес шифрування(Encrypt) з використанням шифру(Cipher) й на виході маємо шифротекст(Ciphertext).

- -

Без знання секрету, зворотня операція {{glossary("decryption","дешифрування")}}, є складною для виконання з математичної точки зору. Складність залежить від рівня захищеності обраного криптографічного алгоритму і розвивається з прогресом {{glossary("Криптоаналіз","криптоаналізу")}}.

- -

Довідатись більше

- - diff --git a/files/uk/glossary/engine/index.html b/files/uk/glossary/engine/index.html deleted file mode 100644 index d82b70109e..0000000000 --- a/files/uk/glossary/engine/index.html +++ /dev/null @@ -1,18 +0,0 @@ ---- -title: Рушій JavaScript -slug: Glossary/Engine -tags: - - CodingScripting - - Glossary - - Глоссарій -translation_of: Glossary/Engine ---- -

Рушій {{glossary("JavaScript")}} — це інтерпретатор, що аналізує та виконує програму, написану на JavaScript.

- -

Дізнатися більше

- -

Загальні поняття

- - diff --git a/files/uk/glossary/falsy/index.html b/files/uk/glossary/falsy/index.html deleted file mode 100644 index 96f165b36b..0000000000 --- a/files/uk/glossary/falsy/index.html +++ /dev/null @@ -1,107 +0,0 @@ ---- -title: Falsy -slug: Glossary/Falsy -tags: - - JavaScript - - Словник -translation_of: Glossary/Falsy ---- -

Хибне (falsy) значення - це значення, яке вважається таким, що дорівнює false, у контексті {{Glossary("Boolean")}}.

- -

Мова {{Glossary("JavaScript")}} використовує {{Glossary("Type_Conversion", "перетворення типів")}}, щоб перетворити будь-яке значення на Boolean у контексті, який цього вимагає, наприклад, {{Glossary("Conditional", "умови")}} та {{Glossary("Loop", "цикли")}}.

- -

Є 8 хибних значень:

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
falseКлючове слово false
0Число нуль.
-0Від'ємне число нуль
0nBigInt, при використанні у якості boolean, дотримується тих самих правил, що й Number. 0n є хибним.
"" -

Порожній текстовий рядок (довжина рядка дорівнює нулю).

- -

Рядки у JavaScript можуть бути визначені через подвійні лапки "", одинарні лапки '', або Шаблонні літерали ``

-
{{Glossary("null")}}null - відсутність будь-якого значення об'єкта
{{Glossary("undefined")}}undefined - просте значення
{{Glossary("NaN")}}NaN - не число (not a number)
- -
-

Об'єкти є хибними лише тоді, коли мають внутрішній слот [[IsHTMLDDA]]. Цей слот існує лише у document.all та не може бути встановлений засобами JavaScript.

-
- -

Приклади

- -

Приклади хибних значень у JavaScript (які приводяться до false у контексті Boolean і, таким чином, пропускають блок if):

- -
if (false)
-if (null)
-if (undefined)
-if (0)
-if (-0)
-if (0n)
-if (NaN)
-if ("")
-
- -

Логічний оператор І, &&

- -

Якщо перший об'єкт є хибним, повертає цей об'єкт

- -
false && "dog"
-// ↪ false
-
-0 && "dog"
-// ↪ 0
-
- -

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

- - - - - - - - - - - - -
Специфікація
{{SpecName("ESDraft", "#sec-toboolean", "ToBoolean abstract operation")}}
- -

Дізнатись більше

- - - -
{{QuickLinksWithSubpages("/uk/docs/Glossary")}}
diff --git a/files/uk/glossary/function/index.html b/files/uk/glossary/function/index.html deleted file mode 100644 index 15f2ddcbf2..0000000000 --- a/files/uk/glossary/function/index.html +++ /dev/null @@ -1,90 +0,0 @@ ---- -title: Функція -slug: Glossary/Function -tags: - - IIFE - - JavaScript - - Словник - - Функція -translation_of: Glossary/Function -original_slug: Glossary/Функція ---- -

Функція - це фрагмент коду, що може бути викликаний іншим кодом чи сам собою, або {{Glossary("змінна")}} що відноситься до функцій. Коли функцію викликано, {{Glossary("арґументи")}} функція отримує як ввід, та може повертати вивід. Функції у {{glossary("JavaScript")}} це також {{glossary("Object","об'єкти")}}.

- -

Ім'я функції це {{Glossary("identifier","ідентифікатор")}} оголошений як частина оголошення функції чи виразу функції. {{Glossary("scope", "Область видимості")}} залежить від того, є функція оголошеною чи описаною.

- -

Різні види функцій

- -

Анонімна функція, це функція без імені функції:

- -
function () {};
-// або використовуючи ECMAScript 2015 запис зі стрілкою
-() => {};
-
- -

Названа функція, це функція що має ім'я:

- -
function foo() {};
-// або використовуючи ECMAScript 2015 запис зі стрілкою
-const foo = () => {};
-
- -

Внутрішня функція,  це функція всередині іншої функції (square в цьому випадку). Зовнішня функція, це функція, що містить всередині інші функції (addSquares в цьому випадку):

- -
function addSquares(a,b) {
-   function square(x) {
-      return x * x;
-   }
-   return square(a) + square(b);
-};
-// використовуючи ECMAScript 2015 запис зі стрілкою
-const addSquares = (a,b) => {
-   const square = x => x*x;
-   return square(a) + square(b);
-};
-
- -

Рекурсивна функція, це функція, що викликає сама себе. Дивіться {{Glossary("Рекурсія", "рекурсія")}}.

- -
function loop(x) {
-   if (x >= 10)
-      return;
-   loop(x + 1);
-};
-// використовуючи ECMAScript 2015 запис зі стрілкою
-const loop = x => {
-   if (x >= 10)
-      return;
-   loop(x + 1);
-};
-
- -

Негайно виконуваний функціональний вираз (IIFE, Immediately Invoked Function Expression) — це вираз, що одночасно оголошує {{Glossary("Функція", "функцію")}} в {{Glossary("JavaScript")}} та здійснює її виклик. Позаяк подальший виклик безіменної функції, посилання на яку відсутнє, неможливий, головним призначенням такого виразу є створення окремої області видимості, щоб уникнути засмічення зовнішньої (зазвичай, глобальної). Створити НВФВ можна, додавши ліву та праву дужки в кінці оголошення функції.

- -
// Error (https://en.wikipedia.org/wiki/Immediately-invoked_function_expression)
-/*
-​function foo() {
-    console.log('Hello Foo');
-}();
-*/
-
-(function foo() {
-    console.log("Hello Foo");
-}());
-
-(function food() {
-    console.log("Hello Food");
-})();
-
-
- -

Якщо хочете дізнатись бульше про НВФВ, перегляньте сторінку на Wikipedia : Immediately Invoked Function Expression

- -

Дізнатись більше

- -

Технічна довідка

- - diff --git a/files/uk/glossary/general_header/index.html b/files/uk/glossary/general_header/index.html deleted file mode 100644 index c49a7e4786..0000000000 --- a/files/uk/glossary/general_header/index.html +++ /dev/null @@ -1,12 +0,0 @@ ---- -title: Загальний заголовок (General header) -slug: Glossary/General_header -tags: - - Глоссарій - - Загальний заголовок - - Заголовок -translation_of: Glossary/General_header ---- -

Загальний заголовок це  {{glossary('HTTP заголовок /(HTTP header/)', 'HTTP заголовок)')}} {{glossary("HTTP_header","HTTP заголовок")}} що може використовуватись в запиті та відповіді але не стосується, власне, контенту. В залежності від контексту Depending on the context they are used in, general headers are either {{glossary("Response header", "response")}} or {{glossary("request header", "request headers")}}. However, they are not {{glossary("entity header", "entity headers")}}.

- -

Заголовки що найбільше застосовують це :{{HTTPHeader('Date')}}, {{HTTPheader("Cache-Control")}} or {{HTTPHeader("Connection")}}.

diff --git a/files/uk/glossary/global_object/index.html b/files/uk/glossary/global_object/index.html deleted file mode 100644 index d8a961d8c1..0000000000 --- a/files/uk/glossary/global_object/index.html +++ /dev/null @@ -1,35 +0,0 @@ ---- -title: Глобальний об'єкт -slug: Glossary/Global_object -tags: - - JavaScript - - Словник -translation_of: Glossary/Global_object ---- -

Глобальний об'єкт — це {{glossary("object", "об'єкт")}}, що є носієм чи то пак виразником {{glossary("global scope", "глобальної області видимості")}}.

- -

В JavaScript глобальний об'єкт завжди визначено. У веб-переглядачах створювані скриптами глобальні змінні насправді є властивостями цього об'єкта (натомість, у середовищі {{Glossary("node.js")}} це не так). {{Glossary("interface", "Інтерфейс")}} глобального об'єкта залежить від контексту виконання скрипта:

- - - -

Об'єкт window в перегядачі

- -

Веб-переглядач має window за глобальний об'єкт, тож будь-яка глобальна змінна чи функція є водночас властивістю об'єкта window. Наведений нижче приклад засвідчує, що оголошення змінної в глобальній області видимості створює у window нову властивість:

- -
var foo = 'Дещось';
-foo === window.foo;  // Вертає true
-
-console.log(window.foo);  // Виводить "Дещось"
- -

Те саме стосується оголошень функцій:

- -
function greeting() {
-  console.log('Отакої');
-}
-
-// Те саме, що й простий виклик greeting()
-window.greeting();
diff --git a/files/uk/glossary/gpu/index.html b/files/uk/glossary/gpu/index.html deleted file mode 100644 index a9ebb3cdfe..0000000000 --- a/files/uk/glossary/gpu/index.html +++ /dev/null @@ -1,11 +0,0 @@ ---- -title: GPU (Графічний процесор) -slug: Glossary/GPU -tags: - - Glossary - - Infrastructure - - Інфраструктура - - Глоссарій -translation_of: Glossary/GPU ---- -

Графічний процесор (англ. Graphics Processing Unit, скорочено GPU) — це компонент комп’ютера, подібний до ЦП (центральний процесор). Він спеціалізується на обробці як двовимірної, так і тривимірної комп’ютерної графіки, і виведенні її на екран вашого монітора.

diff --git a/files/uk/glossary/hash/index.html b/files/uk/glossary/hash/index.html deleted file mode 100644 index eb1105b534..0000000000 --- a/files/uk/glossary/hash/index.html +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: Hash -slug: Glossary/hash -translation_of: Glossary/hash ---- -

Хеш-функція приймає повідомлення змінної довжини та повертає, фіксованої довжини хеш-код. Зазвичай це: 128-бітний "Відбиток Пальця" чи "Дайджест Повідомлення". Хеш функціїї часто використовують в {{glossary("cryptography")}} — вони гарантують цілістність переданих данних. Це є основою для {{glossary("HMAC's")}}, який забезпечує аутентифікацію повідомлень.

- -

Довідатись більше

- -

Загальні поняття

- - diff --git a/files/uk/glossary/hoisting/index.html b/files/uk/glossary/hoisting/index.html deleted file mode 100644 index 8c628c093c..0000000000 --- a/files/uk/glossary/hoisting/index.html +++ /dev/null @@ -1,87 +0,0 @@ ---- -title: Підняття -slug: Glossary/Hoisting -tags: - - JavaScript - - Словник -translation_of: Glossary/Hoisting ---- -

Термін підняття (hoisting) ви не знайдете у жодній нормативній специфікації до ECMAScript® 2015 Language Specification. Підняття придумали як загальне поняття того, як працюють контексти виконання (зокрема, стадії створення та виконання) у JavaScript. Однак, спочатку ця концепція може дещо заплутати.

- -

Концептуально, наприклад, строге визначення підняття припускає, що оголошення змінних та функцій фізично пересуваються нагору вашого коду, але це не те, що насправді відбувається. Замість цього, оголошення змінних та функцій розміщуються у пам'яті під час стадії компіляції, але залишаються там, де ви написали їх у коді.

- -

Дізнайтесь більше

- -

Технічний приклад

- -

Однією з переваг розміщення оголошення функцій у пам'яті до того, як JavaScript виконає будь-який код, є те, що це дозволяє використовувати функцію до того, як ви оголосили її у коді. Наприклад:

- -
function catName(name) {
-  console.log("Мого кота звуть " + name);
-}
-
-catName("Тигр");
-
-/*
-Результат наведеного коду: "Мого кота звуть Тигр"
-*/
-
- -

Фрагмент коду, наведений вище, відображає те, як ви очікуєте написати код, щоб він працював. А тепер подивимось, що станеться, якщо ви викличете функцію перед її оголошенням:

- -
catName("Барсик");
-
-function catName(name) {
-  console.log("Мого кота звуть  " + name);
-}
-/*
-Результат наведеного коду: "Мого кота звуть Барсик"
-*/
-
- -

Хоча виклик функції у коді відбувається раніше за оголошення функції, код все одно працює. Причина в тому, як працює контекст виконання у JavaScript.

- -

Підняття добре працює з іншими типами даних та змінними. Змінні можна ініціалізувати та використовувати до того, як вони були оголошені.

- -

Піднімаються лише оголошення

- -

У JavaScript піднімаються лише оголошення, а не ініціалізації. Якщо змінна була оголошена та ініціалізована після того, як була використана, її значенням буде undefined. Наприклад:

- -
console.log(num); // Вертає undefined
-var num;
-num = 6;
- -

Якщо ви оголошуєт змінну після того, як вона була використана, але ініціалізуєте заздалегідь, буде повернене значення:

- -
num = 6;
-console.log(num); // вертає 6
-var num;
-
- -

Нижче більше прикладів, що демонструють підняття.

- -
//Приклад 1 - Не піднімається
-var x = 1; // Ініціалізація x
-console.log(x + " " + y); // '1 undefined'
-var y = 2; // Initialize y
-//Це не працюватиме, бо у JavaScript піднімаються лише оголошення
-
-//Приклад 2 - Піднімається
-var num1 = 3; //Оголосити та ініціалізувати num1
-num2 = 4; //Ініціалізувати num2
-console.log(num1 + " " + num2); //'3 4'
-var num2; //Оголосити num2 для підняття
-
-//Приклад 3 - Піднімається
-a = 'Журав'; //Ініціалізувати a
-b = 'лина'; //Ініціалізувати b
-console.log(a + "" + b); // 'Журавлина'
-var a, b; //Оголосити a & b для підняття
-
- -

Технічна довідка

- - diff --git a/files/uk/glossary/html/index.html b/files/uk/glossary/html/index.html deleted file mode 100644 index a0d0d99a00..0000000000 --- a/files/uk/glossary/html/index.html +++ /dev/null @@ -1,47 +0,0 @@ ---- -title: HTML -slug: Glossary/HTML -tags: - - HTML - - Словник -translation_of: Glossary/HTML ---- -

HTML (HyperText Markup Language, мова розмітки гіпертексту) — це декларативна мова, яка визначає структуру веб-сторінки.

- -

Історія

- -

У 1990, як частину його бачення {{glossary("World Wide Web","Web")}}, Тім Бернерс-Лі описав концепцію {{glossary("hypertext", "гіпертексту")}}, яку формалізував наступного року через розмітку, що була основана головним чином на {{glossary("SGML")}}. Спільнота {{glossary("IETF")}} почала створювати специфікацію HTML у 1993, та після декількох чорнеток випустила версію 2.0 у 1995. У 1994 Бернерс-Лі створив організацію {{glossary("W3C")}} для розробки Web. У 1996, W3C взяла на себе розробку стандарта HTML та випустила рекомендації HTML 3.2 роком пізніше. HTML 4.0 було випущено у 1999 році, який набув стандарту {{glossary("ISO")}} у 2000.

- -

У ті часи W3C майже покинула HTML на користь {{glossary("XHTML")}}, закликаючи до утворення незалежної групи {{glossary("WHATWG")}} in 2004. Завдяки WHATWG, роботу над стандартом {{glossary("HTML5")}} було продовжено: дві організації випустили першу чернетку у 2008 році та фіналізували стандарт у 2014.

- -

Концепція та синтаксис

- -

HTML-документ це текстовий документ, що складається з {{glossary("element","елементів")}}. Сам елемент зазвичай складається з початкового та кінцевого {{Glossary("tag","теґа")}}, втім є елементи (як-от {{htmlelement("img")}}), яким не дозволено мати вміст — такі елементи або складаються з одного-єдиного теґа («поодинокого» або «самозакривного»), або кінцевий теґ розташовано одразу за початковим (без жодного вмісту між ними). Кожен теґ починається та закінчується кутовими дужками.

- -

До теґів можна додавати {{Glossary("attribute","атрибути")}}, що передають додаткову інформацію, яка впливає на поведінку чи відображення елемента переглядачем:

- -

Складові HTML-елемента

- -

Зазвичай HTML зберегається у файлах із розширенням .htm чи .html, обслуговується (віддається) {{Glossary("Server","веб-сервером")}}, та може переглядатися будь-яким {{Glossary("Browser","веб-переглядачем")}}.

- -

Дізнатись більше

- -

Загальні відомості

- - - -

Вивчення HTML

- - - -

Технічна довідка

- - diff --git a/files/uk/glossary/html5/index.html b/files/uk/glossary/html5/index.html deleted file mode 100644 index ce32c8cb5b..0000000000 --- a/files/uk/glossary/html5/index.html +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: HTML5 -slug: Glossary/HTML5 -tags: - - Словник -translation_of: Glossary/HTML5 ---- -

Останній стабільний реліз {{Glossary("HTML")}}, HTML5 перетворює HTML з простої мови для структурування документа на платформу для розробки повноцінних додатків. Серед інших функцій, HTML5 включає в себе нові елементи і  {{glossary("JavaScript")}} {{glossary("API","APIs")}} для розширення можливостей сховища, мультимедіа та апаратного забезпечення .

- -

Learn more

- - diff --git a/files/uk/glossary/http/index.html b/files/uk/glossary/http/index.html deleted file mode 100644 index 23f3f973c4..0000000000 --- a/files/uk/glossary/http/index.html +++ /dev/null @@ -1,26 +0,0 @@ ---- -title: HTTP -slug: Glossary/HTTP -tags: - - HTTP - - Інфраструктура - - Початківець - - Словник -translation_of: Glossary/HTTP ---- -

Протокол перенесення гіпертексту (англ. HyperText Transfer Protocol (HTTP) — це основний {{glossary("protocol","протокол")}}, що дозволяє передавати документи гіпермедіа в {{glossary("World Wide Web","мережі")}}, в основному між переглядачем та сервером, щоб люди могли їх читати. Поточна версія специфікації HTTP називається HTTP/2.

- -

Як частина {{glossary("URI")}}, "http://" називається "схемою" і зазвичай стоїть на початку адреси, наприклад, в "https://developer.mozilla.org вказує переглядачу, що запит документу робиться по протоколу HTTP. https в цьому випадку стосується захищеної версії протоколу HTTP {{glossary("SSL")}} (також називається TLS).

- -

HTTP — це текстовий протокол (обмін інформацією здійснюється у вигляді {{glossary("Plaintext", "звичайного тексту")}}), що не зберігає стан (обмін даними здійснюється без урахування попереднього обміну). Ця властивість робить його ідеальним для того, щоб люди читали документи (сайти) у мережі. Однак HTTP також можна використати як основу для веб-сервісів {{glossary("REST")}} веб-сервісів від сервера до сервера або {{glossary("AJAX")}} запитів, щоб зробити їх більш динамічними

- -
-

Дізнатись більше

- - -
- -

 

diff --git a/files/uk/glossary/http_2/index.html b/files/uk/glossary/http_2/index.html deleted file mode 100644 index 023bb74f32..0000000000 --- a/files/uk/glossary/http_2/index.html +++ /dev/null @@ -1,19 +0,0 @@ ---- -title: HTTP/2 -slug: Glossary/HTTP_2 -tags: - - HTTP - - Інфраструктура - - Словник -translation_of: Glossary/HTTP_2 ---- -

HTTP/2 це значне оновлення спрямоване на доопрацювання мережевого протоколу HTTP. Основні цілі для протоколу HTTP/2 це зменшення затримки шляхом реалізаці об'єднання повного запиту і відповіді; мінімізація надлишків протоколу шляхом ефективного стиснення полів заголовків в HTTP та підтримка реалізації пріоритетності запитів і  технології "push"(надсилання даних користувачеві на основі раніше встановлених параметрами) зі сторони сервера.

- -

HTTP/2 не змінює сенс додатків HTTP взагалі. Всі концепти ядра, що наявні в HTTP 1.1, такі як методи HTTP, коди статусів, URIs та поля заголовків, залишаються на місці. Натоміть, HTTP/2 модифікує способи форматування(утворення) даних та їх транспортування між клієнтом та сервером, кожен з яких керує цілим процесом та приховує заплутаність додатків новим шаром обрамлення. В результаті маємо, що всі існуючі додатки можуть використовуватись без модифікацій.

- -

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

- - diff --git a/files/uk/glossary/http_header/index.html b/files/uk/glossary/http_header/index.html deleted file mode 100644 index ed27b4e912..0000000000 --- a/files/uk/glossary/http_header/index.html +++ /dev/null @@ -1,78 +0,0 @@ ---- -title: HTTP заголовок (HTTP header) -slug: Glossary/HTTP_header -tags: - - HTTP - - HTTP Заголовок - - htpp заголовок - - Глосарій - - Заголовок -translation_of: Glossary/HTTP_header ---- -

HTTP заголовок - це поле у HTTP запиту чи відповіді, яке передає  додаткову інформацію змініюючи або уточнюючи семантику повідомлення або тіла запиту. Заголовки нечутливі до регістру, починаються на початку рядка і одразу після них: ':' а значення залежно від самого заголовка. Значення закінчується в наступному CRLF або в кінці повідомлення.

- -

Традиційно заголовки класифікуються за категоріями, хоча ця класифікація більше не є частиною жодної специфікації:

- - - -

Основний запит в одним заголовком:

- -
GET /example.http HTTP/1.1
-Host: example.com
-
- -

Перенаправлення мають обов'язкові заголовки ({{HTTPHeader("Location")}}):

- -
302 Found
-Location: /NewPage.html
-
- -

Типовий набір заголовків:

- -
304 Not Modified
-Access-Control-Allow-Origin: *
-Age: 2318192
-Cache-Control: public, max-age=315360000
-Connection: keep-alive
-Date: Mon, 18 Jul 2016 16:06:00 GMT
-Server: Apache
-Vary: Accept-Encoding
-Via: 1.1 3dc30c7222755f86e824b93feb8b5b8c.cloudfront.net (CloudFront)
-X-Amz-Cf-Id: TOl0FEm6uI4fgLdrKJx0Vao5hpkKGZULYN2TWD2gAWLtr7vlNjTvZw==
-X-Backend-Server: developer6.webapp.scl3.mozilla.com
-X-Cache: Hit from cloudfront
-X-Cache-Info: cached
-
- - diff --git a/files/uk/glossary/hyperlink/index.html b/files/uk/glossary/hyperlink/index.html deleted file mode 100644 index 868551e6a8..0000000000 --- a/files/uk/glossary/hyperlink/index.html +++ /dev/null @@ -1,27 +0,0 @@ ---- -title: Гіперпосилання -slug: Glossary/Hyperlink -translation_of: Glossary/Hyperlink -original_slug: Glossary/Посилання ---- -

Гіперпосилання підключають веб-сторінки чи елементи даних один до одного. HTML елементи {{HTMLElement ("a")}} визначають гіперпосилання з місця на веб-сторінці (як-от текстовий рядок або зображення) на місце на іншій або на тій же сторінці.

- -

Дізнайся більше

- -

Загальні знання

- - - -

Технічна довідка

- -

HTML5 a - hyperlink - W3C

- -

Learn about it

- - diff --git a/files/uk/glossary/hypertext/index.html b/files/uk/glossary/hypertext/index.html deleted file mode 100644 index 80823e7c37..0000000000 --- a/files/uk/glossary/hypertext/index.html +++ /dev/null @@ -1,25 +0,0 @@ ---- -title: Гіпертекст -slug: Glossary/Hypertext -tags: - - Глосарій - - Мережа -translation_of: Glossary/Hypertext ---- -

Гіпертекст - це текст, який містить посилання на інші тексти, на відміну від одного лінійного потоку, як у романі.

- -

Термін ввів Тед Нельсон близько1965.

- -

Вивчити детальніше

- -

Загальні знання

- - - -

Technical reference

- - diff --git a/files/uk/glossary/ide/index.html b/files/uk/glossary/ide/index.html deleted file mode 100644 index 7b0b8b9c02..0000000000 --- a/files/uk/glossary/ide/index.html +++ /dev/null @@ -1,17 +0,0 @@ ---- -title: IDE -slug: Glossary/IDE -tags: - - CodingScripting - - Словник -translation_of: Glossary/IDE ---- -

Інтегроване Середовище Розробки (IDE) або Інтерактивне Середовище Розробки це програмне забезпечення що надає комплексні можливості для програмістів для розробки програмного забезпечення. IDE зазвичай складається з редактора вихідного коду, засобів автоматизації побудови та відладчика.

- -

Дізнатись більше

- -

Загальна інформація

- - diff --git a/files/uk/glossary/identifier/index.html b/files/uk/glossary/identifier/index.html deleted file mode 100644 index c673ce87e6..0000000000 --- a/files/uk/glossary/identifier/index.html +++ /dev/null @@ -1,20 +0,0 @@ ---- -title: Ідентифікатор -slug: Glossary/Identifier -tags: - - Початківець - - Словник -translation_of: Glossary/Identifier -original_slug: Glossary/ідентифікатор ---- -

Послідовність символів в коді, яка у недвозначний спосіб позначає (ідентифікує) {{glossary("variable", "змінну")}}, {{glossary("function", "функцію")}} або {{glossary("property", "властивість")}}, називається ідентифікатором.

- -

У {{glossary("JavaScript")}}, ідентифікатори можуть містити лише алфавітно-цифрові символи (а також "$" або "_"), і не можуть починатися з цифри. Ідентифікатор відрізняється від рядків тим, що рядок являє собою дані, натомість ідентифікатор є частиною коду. В JavaScript, немає можливості перетворити ідентифікатори в рядки, але іноді є можливість перетворити рядки у ідентифікатори.

- -

Дізнатись більше

- -

Загальні відомості

- - diff --git a/files/uk/glossary/iife/index.html b/files/uk/glossary/iife/index.html deleted file mode 100644 index ac1a957c33..0000000000 --- a/files/uk/glossary/iife/index.html +++ /dev/null @@ -1,62 +0,0 @@ ---- -title: IIFE -slug: Glossary/IIFE -tags: - - JavaScript - - Словник - - Шаблон проектування -translation_of: Glossary/IIFE ---- -

Негайно виконуваний функціональний вираз (IIFE, Immediately Invoked Function Expression) — {{glossary("function", "функція")}} у {{glossary("JavaScript")}}, яка виконується одразу після оголошення. 

- -
(function () {
-    statements
-})();
- -

Це шаблон проектування, також відомий як {{glossary("Self-Executing Anonymous Function","самовиконувана анонімна функція")}}, який складається з двох основних частин:

- -
    -
  1. Перша - це анонімна функція, чия лексична область видимості знаходиться всередині {{jsxref("Operators/Grouping", "оператора групування")}} (). Це запобігає доступу до змінних у ідіомі IIFE, а також забрудненню глобальної області видимості.
  2. -
  3. Друга частина створює негайно виконуваний функціональний вираз (), через який рушій JavaScript безпосередньо інтерпретуватиме функцію.
  4. -
- -

Приклади

- -

Функція стає функціональним виразом, який негайно виконується. Змінна всередині виразу недоступна за його межами.

- -
(function () {
-    var aName = "Баррі";
-})();
-// Змінна aName є недоступною з-поза меж області видимості
-aName // викидає "Uncaught ReferenceError: aName is not defined"
- -

Присвоєння IIFE змінній зберігає значення, яке повертає функція, а не саме визначення функції.

- -
var result = (function () {
-    var name = "Баррі";
-    return name;
-})();
-// Негайно створює результат:
-result; // "Баррі"
-
- - diff --git a/files/uk/glossary/index.html b/files/uk/glossary/index.html deleted file mode 100644 index 4fed9d13ad..0000000000 --- a/files/uk/glossary/index.html +++ /dev/null @@ -1,24 +0,0 @@ ---- -title: Словник -slug: Glossary -tags: - - Покажчик - - Початківець - - Словник -translation_of: Glossary ---- -
{{LearnBox({"title":"Вивчіть нове визначення:"})}}
- -

Веб технології містять довжелезний перелік різних визначень та скорочень, що використовуються в документації та написані коду. Цей словник надає визначення слів та скорочень, які вам потрібно знати, що розуміти та розвивати веб.

- -

{{GlossaryList({"split":"h3", "css":"multiColumnList"})}}

- -

Зробіть свій внесок

- -

Робота над словником це нескінченний процес. Ви можете допомогти покращити його додавши новий опис або покращивши наявний. Щоб розпочати просто натисніть на кнопку нижче або виберіть одне із запропонованих нижче визначень.

- -

Додати новий запис до словника

- -

{{GlossaryList({"terms":["character encoding","DMZ","event","HMAC","condition","modem","OVP","TTL","Unicode"], "filter":"notdefined", "css":"multiColumnList"})}}

- -

Якщо ви бажаєте дізнатись більше про те як зробити власний внесок у розвиток словника, ознайомтесь зі сторінкою стану документації словника.

diff --git a/files/uk/glossary/internet/index.html b/files/uk/glossary/internet/index.html deleted file mode 100644 index fa2f4a921f..0000000000 --- a/files/uk/glossary/internet/index.html +++ /dev/null @@ -1,20 +0,0 @@ ---- -title: Інтернет -slug: Glossary/Internet -tags: - - NeedsContent - - WWW - - Початківець - - Словник -translation_of: Glossary/Internet -original_slug: Glossary/Інтернет ---- -

Інтернет (також міжмере́жжя) — всесвітня мережа з мереж, яка використовує стіс {{glossary("protocol", "протоколів")}} {{glossary("TCP")}}/{{glossary("IPv6", "IP")}}.

- -

Дізнатись більше

- -

Навчання

- - diff --git a/files/uk/glossary/java/index.html b/files/uk/glossary/java/index.html deleted file mode 100644 index efdb878cfc..0000000000 --- a/files/uk/glossary/java/index.html +++ /dev/null @@ -1,18 +0,0 @@ ---- -title: Java -slug: Glossary/Java -tags: - - Java - - Мова Програмування - - Словник -translation_of: Glossary/Java ---- -

Java — це {{glossary("OOP", "об'єктно-орієнтована")}}, заснована на {{Glossary("class", "класах")}} переносна мова {{Glossary("computer programming", "комп'ютерного програмування")}}, створена з думкою про скорочення кількості залежностей реалізації.

- -

Дізнатись більше

- -

Загальні відомості

- - diff --git a/files/uk/glossary/javascript/index.html b/files/uk/glossary/javascript/index.html deleted file mode 100644 index 6cf672f231..0000000000 --- a/files/uk/glossary/javascript/index.html +++ /dev/null @@ -1,44 +0,0 @@ ---- -title: JavaScript -slug: Glossary/JavaScript -tags: - - JavaScript - - Словник -translation_of: Glossary/JavaScript ---- -

JavaScript (JS) — мова програмування, використовувана переважно для визначення поведінки динамічних веб-сторінок з клієнтського боку, але також досить часто вживана з боку {{Glossary("Server","сервера")}} в середовищах на кшталт node.js.

- -

Попри споріднені назви, JavaScript не пов'язаний з {{interwiki("wikipedia", "Java", "Java")}}. Обидві є товарними знаками компанії Oracle у США та інших країнах, але це геть різні мови програмування, що мають різні синтаксис та призначення.

- -

Задумана Бренданом Ейком (Brendan Eich), який потім став робітником Netscape Corporation, як серверна мова, JavaScript у вересні 1995 року увійшла до Netscape Navigator 2.0. JavaScript отримала негайне визнання, а {{glossary("Microsoft Internet Explorer", "Internet Explorer 3.0")}} запровадив підтримку JavaScript під назвою JScript в серпні 1996 року.

- -

У листопаді 1996 року Netscape розпочав співпрацю з ECMA International, щоб зробити JavaScript галузевим стандартом. Відтоді стандартизована JavaScript дістала назву ECMAScript (специфікація ECMA-262), остання (восьма) редакція якої доступна станом на червень 2017.

- -

JavaScript здебільшого використовується веб-переглядачами, надаючи розробникам можливості взаємодії із вмістом сторінок через {{Glossary("DOM")}}, орудування даними за допомогою {{Glossary("AJAX")}} та {{Glossary("IndexedDB")}}, малювання на {{Glossary("canvas", "полотні")}} та взаємодії через різні {{Glossary("API")}} з пристороєм, де запущено переглядач. JavaScript стала однією з найпоширеніших мов програмування завдяки примноженню різноманітних {{Glossary("API")}} в переглядачах та поліпшенню їх швидкодії.

- -

Останім часом, мова JavaScript набула навіть більшого поширення завдяки успіхам node.js — найпопулярнішого міжплатформового виконавчого середовища JavaScript, що працює поза переглядачем. Node.js дозволяє використовувати JavaScript як мову сценаріїв для автоматизації та створення повноцінного сервера з використаням протоколів {{Glossary("HTTP")}} та {{Glossary("WebSockets")}}.

- -

Дізнатись більше

- -

Загальні відомості

- - - -

Вивчення JavaScript

- - - -

Технічна довідка

- - diff --git a/files/uk/glossary/json/index.html b/files/uk/glossary/json/index.html deleted file mode 100644 index 54b2f515c9..0000000000 --- a/files/uk/glossary/json/index.html +++ /dev/null @@ -1,28 +0,0 @@ ---- -title: JSON -slug: Glossary/JSON -tags: - - JSON - - Вступ - - Словник -translation_of: Glossary/JSON ---- -

Об'єктний запис JavaScript (JSON, JavaScript Object Notation) — це формат подання даних. Всупереч назві, між JSON та форматом запису об'єктів у {{Glossary("JavaScript")}}, немає повної відповідності, а отже й сумісності. Втім, синтаксис дуже схожий. Й хоча підтримка JSON є у багатьох мовах програмування, найкраще придається він саме в застосунках, написаних мовою JavaScript, як-от web-сайти чи розширення {{Glossary("Browser", "переглядачів")}}.

- -

JSON може подавати числа, тип boolean, рядки, null, масиви (впорядковані послідовності значень), а також об'єкти (містять пари ключ-значення), які й собі можуть містити значення всіх наведених типів (зокрема, інші об'єкти чи масиви). Складніші дані, як-от {{Glossary("Функція", "функції")}}, {{Glossary("Regular_expression", "регулярні вирази")}} чи дати, в JSON неможливо подати як є — їх доведеться попередньо перетворювати на дані підтримуваних типів. Початково об'єкти Date перетворювано на рядок, що містить запис дати у форматі ISO, тож не всі відомості буде загублено. Втім, якщо є потреба зберігати у JSON деякі додаткові типи даних, доведеться виконати належні перетворення до серіалізування та після десеріалізування.

- -

Формат JSON, як і XML, уможливлює збереження ієрархічних даних, на відміну від більш традиційного CSV. Чимало інструментів надають можливість перетворення даних між цими двома форматами, як-от JSON to CSV Converter або ж JSON to CSV Converter.

- -

Довідатись більше

- -

Загальні відомості

- - - -

Технічна довідка

- - diff --git a/files/uk/glossary/ligature/index.html b/files/uk/glossary/ligature/index.html deleted file mode 100644 index 645e846c39..0000000000 --- a/files/uk/glossary/ligature/index.html +++ /dev/null @@ -1,18 +0,0 @@ ---- -title: Лігатура -slug: Glossary/Ligature -tags: - - CSS - - Дизайн - - Словник -translation_of: Glossary/Ligature ---- -

Лігатура - це об'єднання двох символів у єдиний друкований символ. Наприклад, у французській мові "œ" є лігатурою "oe".

- -

Ви можете застосовувати лігатури на веб-сторінці за допомогою {{cssxref("font-variant-ligatures")}}.

- - diff --git a/files/uk/glossary/loop/index.html b/files/uk/glossary/loop/index.html deleted file mode 100644 index b2e8ec9b12..0000000000 --- a/files/uk/glossary/loop/index.html +++ /dev/null @@ -1,79 +0,0 @@ ---- -title: Цикл -slug: Glossary/loop -tags: - - Програмування - - Словник - - потік керування -translation_of: Glossary/loop ---- -

Цикл - це послідовність інструкцій, яка безперервно повторюється, поки не буде виконана певна умова у {{Glossary("computer programming","комп'ютерному програмуванні")}}. Прикладом може бути процес отримання елементу даних або його зміна, з перевіркою, що певна {{Glossary("conditional","умова")}} виконана, наприклад, що лічильник досяг прописаного значення.

- -

Приклади

- -

Цикл for

- -

Синтаксис: 

- -
for (інструкція 1; інструкція 2; інструкція 3){
- блок коду для виконання
-}
- - - -

Приклад:

- -
for(var i = 0; i < 10; i++){
-    console.log(i) 
-} 
-//Цей цикл виведе числа 0-9, зупиниться, коли буде виконана умова (i = 10)
-
- -

Для наведеного вище прикладу, синтаксис наступний: 

- - - -

Цикл while

- -

Синтаксис:

- -
while (умова){
- блок коду для виконання
-}
-
- - - -

Приклад:

- -
var i = 0;
-while(i < 5){
-    console.log(i)
-    i++
-}
-//Цей цикл виведе числа 0-4, зупиниться, коли умова дорівнюватиме false (i >= 5)
-
- -

Для наведеного вище прикладу синтаксис наступний: 

- - - -

Дізнатись більше

- -

Загальні відомості

- - diff --git a/files/uk/glossary/method/index.html b/files/uk/glossary/method/index.html deleted file mode 100644 index 976f480f8f..0000000000 --- a/files/uk/glossary/method/index.html +++ /dev/null @@ -1,39 +0,0 @@ ---- -title: Метод -slug: Glossary/Method -tags: - - JavaScript - - Словник - - Функція -translation_of: Glossary/Method -original_slug: Glossary/Метод ---- -

Метод — це {{glossary("function", "функція")}}, яка є {{glossary("property", "властивістю")}} {{glossary("object", "об'єкта")}}. Існує два види методів: Примірниковий метод, який можна викликати лише за наявності об'єкта, або {{Glossary("static method", "Статичний метод")}}, який можна викликати безпосередньо на конструкторі об'єкта.

- -
-

Заувага: У JavaScript сама функція є об'єктом, а тому метод, насправді є {{glossary("object reference", "посиланням на об'єкт")}} функції.

-
- -

Дізнатись більше

- -

Загальні відомості

- - - -

Технічна довідка

- - diff --git a/files/uk/glossary/mozilla_firefox/index.html b/files/uk/glossary/mozilla_firefox/index.html deleted file mode 100644 index 3963108137..0000000000 --- a/files/uk/glossary/mozilla_firefox/index.html +++ /dev/null @@ -1,28 +0,0 @@ ---- -title: Mozilla Firefox -slug: Glossary/Mozilla_Firefox -tags: - - Firefox - - Mozilla - - Mozilla Firefox - - Переглядач - - Словник -translation_of: Glossary/Mozilla_Firefox ---- -

Mozilla Firefox це безкоштовний переглядач з відкритим кодом, розробку якого здійснює корпорація Mozilla. Firefox працює на Windows, OS X, Linux, та Android.

- -

Вперше випущений у листопаді 2004 року, Firefox повністю настроюється за допомогою тем, плагінів та додатків.  Firefox використовує Gecko для відображення веб-сторінок і реалізує як поточні, так і майбутні Веб-стандарти.

- -

Дізнатись більше

- -

Загальні відомості

- - - -

Технічна довідка

- - diff --git a/files/uk/glossary/nan/index.html b/files/uk/glossary/nan/index.html deleted file mode 100644 index 3f4b24b2af..0000000000 --- a/files/uk/glossary/nan/index.html +++ /dev/null @@ -1,28 +0,0 @@ ---- -title: NaN -slug: Glossary/NaN -tags: - - JavaScript - - NaN - - Обчислення -translation_of: Glossary/NaN ---- -

NaN (Not a Number) належить до числового {{Glossary("Type", "типу даних")}} та означає невизначений результат або таке значення, яке неможливо подати. Переважно це результати операцій над числами з рухомою комою.

- -

Наприклад, NaN може представляти нескінченність, результат ділення на нуль, відсутнє значення, або квадратний корінь від'ємного числа (бо то уявне число, а числа з рухомою комою є дійсними).

- -

Як це виглядає на практиці? Результат математичної операції в {{glossary("JavaScript")}} може бути NaN, що в JavaScript означає "невизначений". Така операція може зіпсувати результати обчислень і поведінку програми в цілому. Більш того, якщо йдеться про один із проміжних результатів складного обчислення, знайти помилку може буде непросто. На щастя, результат NaN красномовно свідчить про те, що операція здійснюється над неприйнятними значеннями. А те, що результатом всякої математичної операції над NaN завжди лишається NaN, дозволяє значно легше відстежити походження помилкового значення.

- -

Дізнатись більше

- -

Загальні відомості

- - - -

Технічна інформація

- - diff --git a/files/uk/glossary/node.js/index.html b/files/uk/glossary/node.js/index.html deleted file mode 100644 index cb4a59aa94..0000000000 --- a/files/uk/glossary/node.js/index.html +++ /dev/null @@ -1,27 +0,0 @@ ---- -title: Node.js -slug: Glossary/Node.js -tags: - - JavaScript - - node.js - - Інфраструктура - - Словник -translation_of: Glossary/Node.js ---- -

Node.js — міжплатформове виконавче середовище {{Glossary("JavaScript")}}, що уможливлює створення серверних та мережевих застосунків за допомогою JavaScript.

- -

Дізнатись більше

- -

Загальні відомості

- - - -

Технічна довідка

- - diff --git a/files/uk/glossary/null/index.html b/files/uk/glossary/null/index.html deleted file mode 100644 index 74bb9e6b61..0000000000 --- a/files/uk/glossary/null/index.html +++ /dev/null @@ -1,25 +0,0 @@ ---- -title: 'Null' -slug: Glossary/Null -tags: - - Словник -translation_of: Glossary/Null ---- -

У комп'ютерних науках величина null представляє собою посилання, що вказує, як правило, навмисно, на неіснуючий або недійсний {{glossary("object", "об'єкт")}} чи адресу. Значення null-посилання різниться у реалізаціях різних мов.

- -

У мові {{Glossary("JavaScript")}} null є однією з {{Glossary("Primitive", "простих величин")}}.

- -

Дізнатись більше

- -

Загальні поняття

- - - -

Технічна довідка

- - diff --git a/files/uk/glossary/number/index.html b/files/uk/glossary/number/index.html deleted file mode 100644 index 4d3431e705..0000000000 --- a/files/uk/glossary/number/index.html +++ /dev/null @@ -1,26 +0,0 @@ ---- -title: Number -slug: Glossary/Number -tags: - - JavaScript - - Словник -translation_of: Glossary/Number ---- -

У {{Glossary("JavaScript")}}, Number є числовим типом даних, 64-бітним значенням подвійної точності формату IEEE 754. У інших програмних мовах можуть існувати інші числові типи, наприклад: Integer, Float, Double або Bignum.

- -

Дізнатись більше

- -

Загальні відомості

- - - -

Технічна довідка

- - diff --git a/files/uk/glossary/object/index.html b/files/uk/glossary/object/index.html deleted file mode 100644 index 264b184892..0000000000 --- a/files/uk/glossary/object/index.html +++ /dev/null @@ -1,18 +0,0 @@ ---- -title: Об'єкт -slug: Glossary/Object -tags: - - Об'єкт -translation_of: Glossary/Object ---- -

Об'єкт являє собою структуру, що містить власне дані та інструкції для обробки даних. Часом об'єкти стосуються справжніх речей, як-от авто чи мапа у грі в автомобільні перегони. Прикладами {{glossary("OOP", "об'єктно-орієнтованих мов програмування")}} є {{glossary("JavaScript")}}, Java, C++, Python, Ruby тощо.

- -

Дізнатись більше

- -

Загальні відомості

- - diff --git a/files/uk/glossary/object_reference/index.html b/files/uk/glossary/object_reference/index.html deleted file mode 100644 index aaba46f1e6..0000000000 --- a/files/uk/glossary/object_reference/index.html +++ /dev/null @@ -1,50 +0,0 @@ ---- -title: Посилання на об'єкт -slug: Glossary/Object_reference -tags: - - Посилання - - Словник -translation_of: Glossary/Object_reference ---- -

Посилання на об'єкт (англ. object reference) — це певний ключ, призначений для опосередкованого доступу до об'єкта. Залежно від мови програмування то може бути адреса об'єкта в пам'яті, чи будь-який неповторний ключ (рядок або число) в асоціативному масиві абощо.

- -

В таких мовах програмування, як C/C++, розрізняють три різновиди змінних: вказівник (англ. pointer), посилання (англ. reference) та, власне, значення. Це рівною мірою стосується як {{Glossary("Primitive", "простих типів даних")}}, так і {{Glossary("object", "об'єктів")}}. Натомість в Java, JavaScript та багатьох інших мовах розрізняють лише значення (за значенням зберігаються та передаються лише прості величини) та посилання (об'єкти завжди передаються та зберігаються за посиланням).

- -

Приклади

- -

Збагнути різницю між значенням та посиланням легко з порівняння двох прикладів.

- -

Пості величини завжди зберігаються як значення, а тому копіювання означає створення незалежної копії самого значення:

- -
var origin = 5;
-var clone = origin;
-
-console.log(origin);  // виводить 5
-console.log(clone);   // виводить 5
-
-origin++;
-
-console.log(origin);  // виводить 6
-console.log(clone);   // виводить 5
- -

Втім змінна ніколи не зберігає сам об'єкт, а лише посилання на нього. Звідси випливає те, що копіювання змінної, що посилається на об'єкт, створює не копію об'єкта, а копію посилання, а отже обидві змінні посилаються на одне й те саме:

- -
var origin = {x: 5};
-var clone = origin;
-
-console.log(origin.x);  // виводить 5
-console.log(clone.x);   // виводить 5
-
-origin.x++;
-
-console.log(origin.x);  // виводить 6
-console.log(clone.x);   // виводить 6
-
- -

Дізнатись більше

- -

Загальні відомості

- - diff --git a/files/uk/glossary/oop/index.html b/files/uk/glossary/oop/index.html deleted file mode 100644 index c6e1e6a182..0000000000 --- a/files/uk/glossary/oop/index.html +++ /dev/null @@ -1,22 +0,0 @@ ---- -title: OOP (Об'єктно-орієнтоване програмування) -slug: Glossary/OOP -tags: - - Об'єкт - - Парадигма - - Програмування -translation_of: Glossary/OOP -original_slug: Glossary/ООП ---- -

OOP (об'єктно-орієнтоване програмування) є підходом у програмуванні, який передбачає, що дані сховано всередині об'єктів, а операції здійснюються радше над {{glossary("object", "об'єктами")}}, ніж над їх складовими.

- -

{{glossary("JavaScript")}} є значною мірою об'єктно-орієнтованою мовою. Вона пропонує модель даних засновану на прототипах (на противагу моделі, заснованій на класах).

- -

Дізнатись більше

- -

Загальні відомості

- - diff --git a/files/uk/glossary/operator/index.html b/files/uk/glossary/operator/index.html deleted file mode 100644 index 3b592f879c..0000000000 --- a/files/uk/glossary/operator/index.html +++ /dev/null @@ -1,24 +0,0 @@ ---- -title: Оператор -slug: Glossary/Operator -tags: - - Оператори - - Словник -translation_of: Glossary/Operator -original_slug: Glossary/Оператор ---- -

Зарезервований вираз, що позначається знаком пунктуації чи буквенно-цифровим символом, що забезпечує вбудований функціонал, що може варіюватись в залежності від мови. Наприклад, в JavaScript оператор додавання ("+") може додавати числа та, крім цього, виконувати конкатинацію(злиття) рядків; оператор "not" (позн. "!") надає виразу протилежного значення, наприклад, вираз зі значенням true повертатиме false.

- -

Learn more

- -

General knowledge

- - - -

Technical reference

- - diff --git a/files/uk/glossary/polyfill/index.html b/files/uk/glossary/polyfill/index.html deleted file mode 100644 index 8172a1e8db..0000000000 --- a/files/uk/glossary/polyfill/index.html +++ /dev/null @@ -1,21 +0,0 @@ ---- -title: Polyfill -slug: Glossary/Polyfill -tags: - - polyfill - - Словник -translation_of: Glossary/Polyfill ---- -

Поліфіл (англ. polyfill) — це програмний код (зазвичай мовою JavaScript), який використовується як запасний варіант реалізації певних функцій в старих {{glossary("Browser", "переглядачах")}}, які тих функцій не підтримують.

- -

Для прикладу, поліфіл може бути використаний для того, щоб відтворити функціонал HTML-елементу <canvas> у переглядачі Internet Explorer 7 використовуючи плагін Silverlight, підтримку подоби rem величин в CSS, або ж {{cssxref("text-shadow")}} тощо.

- -

Слід розуміти, що з технічних причин поліфіл не завжди може повною мірою відтворити можливості, що відсутні у старих переглядачах. Деякі функції можна відтворити лише частково, а для деяких створення запасного варіанту є геть неможливим.

- -

Дізнатися більше

- -

Загальні відомості

- - diff --git a/files/uk/glossary/primitive/index.html b/files/uk/glossary/primitive/index.html deleted file mode 100644 index 1029704199..0000000000 --- a/files/uk/glossary/primitive/index.html +++ /dev/null @@ -1,35 +0,0 @@ ---- -title: Простий тип даних -slug: Glossary/Primitive -tags: - - JavaScript - - Словник -translation_of: Glossary/Primitive ---- -

Примітив (проста величина, простий тип даних) являє собою дані, що не є {{glossary("object", "об'єктом")}} та не мають {{glossary("method","методів")}}. В JavaScript є шість простих типів даних: {{glossary("string")}}, {{glossary("number")}}, {{glossary("boolean")}}, {{glossary("null")}}, {{glossary("undefined")}} та {{glossary("symbol")}} (з'явився в {{glossary("ECMAScript")}} 2015).

- -

Зазвичай, прості величини подаються безпосередньо як є на найнижчому рівні реалізації мови програмування.

- -

Всі прості типи даних є незмінними (англ. immutable).

- -

Об'єкти-обгортки в JavaScript

- -

За винятком {{jsxref("Global_Objects/null", "null")}} та {{jsxref("Global_Objects/undefined", "undefined")}}, всі прості типи даних мають відповідники серед класів, що являють собою обгортки для простих величин:

- - - -

Метод valueOf() класу-обгортки вертає просту величину.

- -

Дізнатись більше

- -

Загальні відомості

- - diff --git a/files/uk/glossary/property/css/index.html b/files/uk/glossary/property/css/index.html deleted file mode 100644 index f39a86f9e1..0000000000 --- a/files/uk/glossary/property/css/index.html +++ /dev/null @@ -1,37 +0,0 @@ ---- -title: Властивість (CSS) -slug: Glossary/property/CSS -tags: - - Словник -translation_of: Glossary/property/CSS ---- -

Властивість CSS - це характеристика (як колір), чия величина визначає один аспект того, як веб-переглядач має відображати елемент.

- -

Ось приклад правила CSS:

- -
/* "div" - це селектор, який вказує, що всі елементи div */
-/* у документі матимуть стиль згідно з цим правилом */
-div {
-  /* Властивість "color" з величиною "black" вказує */
-  /* що текст матиме чорний колір */
-  color: black;
-
-  /* Властивість "background-color" з величиною "white" вказує */
-  /* що елементи матимуть білий колір фону */
-  background-color: white;
-}
- -

Дізнатись більше

- -

Загальні відомості

- - - -

Технічна довідка

- - diff --git a/files/uk/glossary/property/index.html b/files/uk/glossary/property/index.html deleted file mode 100644 index 93791d64fe..0000000000 --- a/files/uk/glossary/property/index.html +++ /dev/null @@ -1,10 +0,0 @@ ---- -title: Властивість -slug: Glossary/property -tags: - - Словник -translation_of: Glossary/property ---- -

Термін властивість може мати декілька значень в залежності від контексту. Він може означати:

- -

{{GlossaryDisambiguation}}

diff --git a/files/uk/glossary/property/javascript/index.html b/files/uk/glossary/property/javascript/index.html deleted file mode 100644 index 3bb124fa01..0000000000 --- a/files/uk/glossary/property/javascript/index.html +++ /dev/null @@ -1,26 +0,0 @@ ---- -title: Властивість (JavaScript) -slug: Glossary/property/JavaScript -tags: - - Словник -translation_of: Glossary/property/JavaScript ---- -

Властивість у JavaScript - це характеристика об'єкта, що часто описує атрибути, пов'язані зі структурою даних.

- -

Існує два види властивостей: 

- - - -

У властивості є ім'я ({{glossary("string","рядок")}}) та значення ({{glossary("primitive","проста величина")}}, {{glossary("method","метод")}}, або {{glossary("object reference","посилання на об'єкт")}}). Зауважте, що, коли ми кажемо "властивість містить об'єкт", це скорочення від "властивість містить посилання на об'єкт". Ця відмінність важлива, тому що сам об'єкт лишається незмінним, коли ви змінюєте значення властивості.

- -

Дізнатись більше

- -

Загальні відомості

- - diff --git a/files/uk/glossary/protocol/index.html b/files/uk/glossary/protocol/index.html deleted file mode 100644 index 59422c2f7d..0000000000 --- a/files/uk/glossary/protocol/index.html +++ /dev/null @@ -1,21 +0,0 @@ ---- -title: Протокол -slug: Glossary/Protocol -tags: - - Інфраструктура - - Протоколи - - Словник -translation_of: Glossary/Protocol ---- -

Протокол — система правил, що визначає, як відбувається обмін даними всередині чи між компʼютерами. Звʼязок між пристроями потребує узгодженого формату даних, що передаються. Низка правил, які визначають цей формат, називається протоколом.

- -

Дізнатись більше

- -

Загальні відомості

- - - -

 

diff --git a/files/uk/glossary/prototype-based_programming/index.html b/files/uk/glossary/prototype-based_programming/index.html deleted file mode 100644 index e2f4b74a19..0000000000 --- a/files/uk/glossary/prototype-based_programming/index.html +++ /dev/null @@ -1,16 +0,0 @@ ---- -title: Prototype-based programming -slug: Glossary/Prototype-based_programming -translation_of: Glossary/Prototype-based_programming ---- -

Прототип-базоване програмування є стилем {{Glossary("OOP", "object-oriented programming")}}, у якому {{Glossary('Class', 'classes')}} не визначені чітко, а виникають шляхом додавання властивостей і методів до екземпляра іншого класу або, рідше, додавання їх до порожнього об'єкта.
-
- Простими словами, цей тип стилю програмування дозволяє створити {{Glossary('Object', 'object')}} не визначивши його {{Glossary('Class', 'class')}}.

- -

Дізнатись більше

- -

Загальні знання

- - diff --git a/files/uk/glossary/proxy_server/index.html b/files/uk/glossary/proxy_server/index.html deleted file mode 100644 index 2083a0639b..0000000000 --- a/files/uk/glossary/proxy_server/index.html +++ /dev/null @@ -1,24 +0,0 @@ ---- -title: Проксі-сервер -slug: Glossary/Proxy_server -tags: - - Глосарій - - Проксі - - Сервер -translation_of: Glossary/Proxy_server ---- -

Проксі-сервер — це проміжна програма або комп’ютер, що використовується під час переміщення по різних мережах Інтернету. Вони полегшують доступ до вмісту у всесвітній мережі. Проксі перехоплює запити та обслуговує відповіді; він може пересилати запити або ні (наприклад, у випадку кешем), а також може змінювати їх (наприклад, змінити заголовки на межі двох мереж).

- -

Проксі може знаходитись на локальному комп'ютері користувача або будь-де між комп'ютером користувача та сервером призначення в Інтернеті. Загалом існує два основних типи проксі-серверів:

- - - -

Дізнайся більше

- - diff --git a/files/uk/glossary/recursion/index.html b/files/uk/glossary/recursion/index.html deleted file mode 100644 index 7474a56209..0000000000 --- a/files/uk/glossary/recursion/index.html +++ /dev/null @@ -1,43 +0,0 @@ ---- -title: Рекурсія -slug: Glossary/Recursion -tags: - - Словник -translation_of: Glossary/Recursion -original_slug: Glossary/Рекурсія ---- -

Рекурсія — це виклик функцією самої себе. Рекурсію застосовують, коли розв'язувана задача містить подібні до себе підзадачі. Залежно від вхідних даних розрізняють кінцевий виклик (розв'язує найпростішу задачу) та проміжний (має підзадачі, тож передбачає щонайменше один рекурсивний виклик).

- -

Типовим прикладом застосування рекурсії є обчислення факторіалу:

- -
function f(n) {
-  if (n > 1) {
-    return n * f(n - 1);
-  }
-  return 1;
-}
- -

Слід завважити, що будь-який алгоритм можна втілити без застосування рекурсії, але для вирішення певних задач її застосування спрощує та увиразнює код. Для прикладу розгляньмо обчислення факторіалу без рекурсії:

- -
function f(n) {
-  var value = 1;
-
-  while (n > 1) {
-    value *= n;
-    n--;
-  }
-
-  return value;
-}
-
- -

Водночас для деяких алгоритмів перевага рекурсивного втілення буде навіть суттєвішою.

- -

Дізнатись більше

- -

Загальні відомості

- - diff --git a/files/uk/glossary/regular_expression/index.html b/files/uk/glossary/regular_expression/index.html deleted file mode 100644 index 0e58dacbd3..0000000000 --- a/files/uk/glossary/regular_expression/index.html +++ /dev/null @@ -1,36 +0,0 @@ ---- -title: Регулярний вираз -slug: Glossary/Regular_expression -tags: - - Regular Expression - - Регулярний вираз - - Словник -translation_of: Glossary/Regular_expression ---- -

Регулярний вираз (англ. regular expression або regex) — це записаний формальною мовою (що називається мовою регулярних виразів) рядок, що описує множину (подеколи нескінченну) послідовностей символів, що їх слід шукати.

- -

Регулярні вирази використовуються для:

- - - -

{{Glossary("Algorithm", "Алгоритми")}} пошуку за регулярними виразами впроваджені у багатьох мовах програмування, але найбільшого поширення набула реалізація з Perl, яка згодом зросла до окремої від мови Perl множини сумісних реалізацій, що зветься PCRE (Perl Compatible Regular Expression). Втім {{glossary("JavaScript")}} надає через клас {{jsxref("RegExp")}} інший варіант реалізації.

- -

Дізнатись більше

- -

Загальні відомості

- - - -

Технічна довідка

- - diff --git a/files/uk/glossary/rest/index.html b/files/uk/glossary/rest/index.html deleted file mode 100644 index 7dca92dbd0..0000000000 --- a/files/uk/glossary/rest/index.html +++ /dev/null @@ -1,31 +0,0 @@ ---- -title: REST -slug: Glossary/REST -tags: - - HTTP - - Rest - - Архітектура - - Словник -translation_of: Glossary/REST ---- -

Передача репрезентативного стану (англ. Representational State Transfer, REST) - це набір архітектурних обмежень, які утворюють ефективні, надійні та масштабовані розподілені системи. Система називається RESTful, коли дотримується цих обмежень.

- -

Головна ідея REST полягає в тому, що ресурс, наприклад, документ, передається разом зі своїм станом та зв'язками (гіпертекстом) за допомогою чітко визначених, стандартизованих операцій та форматів. Часто {{Glossary("API","API")}} або сервіси називають себе RESTful, коли прямо змінюють тип документа, як протилежність запуску команд в іншому місці.

- -

Через те, що {{Glossary("HTTP")}}, стандартний протокол {{glossary("World Wide Web","Web")}}, також передає документи та гіпертекстові посилання, прості HTTP API іноді називають RESTful API, RESTful сервісами, або просто REST сервісами, хоча вони не обов'язково дотримуються усіх обмежень REST. Початківці можуть припустити, що REST API означає HTTP-сервіс, який можна викликати за допомогою стандартних веб-бібліотек та інструментів.

- -

Дізнатися більше

- -

Дізнатися про це більше

- - - -

Загальні поняття

- - diff --git a/files/uk/glossary/rss/index.html b/files/uk/glossary/rss/index.html deleted file mode 100644 index 79c2d9b299..0000000000 --- a/files/uk/glossary/rss/index.html +++ /dev/null @@ -1,29 +0,0 @@ ---- -title: RSS -slug: Glossary/RSS -tags: - - Atom - - RSS - - Оновлення - - Поширення - - Словник - - Стрічка -translation_of: Glossary/RSS ---- -

RSS (Really Simple Syndication) позначає декілька заснованих на {{Glossary("XML")}} форматів, створених для поширення інформації про зміни на веб-сторінках. Клієнтський додаток, читач RSS отримує своєчасні оновлення зі сторінок, на які налаштовано підписку, та подає їх у вигляді стрічки (англ. RSS feed). Це звільняє користувача від потреби самостійно перевіряти оновлення на всіх сторінках.

- -

Слід зауважити, що для забезпечення роботи цієї технології необхідна підтримка RSS кожним окремим сайтом.

- -

Дізнатись більше

- -

Загальні відомості

- - - -

Технічна інформація

- - diff --git a/files/uk/glossary/scope/index.html b/files/uk/glossary/scope/index.html deleted file mode 100644 index 9a683908fe..0000000000 --- a/files/uk/glossary/scope/index.html +++ /dev/null @@ -1,20 +0,0 @@ ---- -title: Область видимості -slug: Glossary/Scope -tags: - - Словник -translation_of: Glossary/Scope ---- -

Область видимості (англ. scope) — це чинний для поточного контексту виконання простір імен. Цей контекст характеризується множиною «видимих» {{Glossary("Variable", "змінних")}}, {{Glossary("Function", "функцій")}} ({{Glossary("Method", "методів")}}) та будь-яких інших оголошуваних сутностей.

- -

Якщо змінна, функція абощо перебуває поза областю видимості певних рядків коду, вона є недоступною для використання цим кодом. Більш того, сутності з однаковими іменами можуть одночасно співіснувати в різних областях видимості. Області видимості нашаровуються одне на одне відповідно до ієрархії, тож область-нащадок може мати доступ до області-пращура, але не навпаки. В разі збігу імен сутність, що належить до області-нащадка, заступає ту, що належить до області-пращура.

- -

У {{Glossary("JavaScript")}} функція працює як {{Glossary("Closure", "замикання")}}, створючи власну область видимості, тож, наприклад, оголошена всередині функції змінна є недосяжною ззовні чи з інших функцій.

- -

Дізнатись більше

- -

Загальні відомості

- - diff --git a/files/uk/glossary/self-executing_anonymous_function/index.html b/files/uk/glossary/self-executing_anonymous_function/index.html deleted file mode 100644 index 74fd0e93fd..0000000000 --- a/files/uk/glossary/self-executing_anonymous_function/index.html +++ /dev/null @@ -1,10 +0,0 @@ ---- -title: Самовиконувана анонімна функція -slug: Glossary/Self-Executing_Anonymous_Function -tags: - - Словник -translation_of: Glossary/Self-Executing_Anonymous_Function ---- -

Це {{glossary("function","функція")}} {{glossary("JavaScript")}}, яка запускається одразу після того, як була визначена. Також відома як {{glossary("IIFE")}} (Негайно виконуваний функціональний вираз).

- -

Дивіться більш детальну інформацію на сторінці IIFE, наведеній вище.

diff --git a/files/uk/glossary/server/index.html b/files/uk/glossary/server/index.html deleted file mode 100644 index cfe0f145e9..0000000000 --- a/files/uk/glossary/server/index.html +++ /dev/null @@ -1,25 +0,0 @@ ---- -title: Сервер -slug: Glossary/Server -tags: - - Інфраструктура - - Глосарій - - Мережа - - Сервер - - протокол -translation_of: Glossary/Server ---- -

Апаратний сервер являє собою загальний компʼютер в мережі, який надає сервіси клієнтам. Сервер, в програмному забезпеченні – програма, яка надає сервіси програмам-клієнтам.

- -

Зазвичай сервіси надаються в межах локальної або глобальної мереж. Програма-клієнт та сервер традиційно зʼєднуються між собою та обмінюються повідомленнями закодованими за допомогою {{glossary("protocol", "протокол")}}у.

- -

Найпоширенішими серверами в локальній мережі є файлові сервери, сервери імен, поштові сервери, сервери друку та сервери надсилання та приймання факс-повідомлень. Інший приклад – Веб-сервери, зʼєднані з Інтернетом. Мінікомпʼютери, мейнфрейми, суперкомпʼютери в дата-центрах також є серверами.

- -

Дізнатись більше

- -

Загальні відомості

- - diff --git a/files/uk/glossary/shim/index.html b/files/uk/glossary/shim/index.html deleted file mode 100644 index baa8d5aca6..0000000000 --- a/files/uk/glossary/shim/index.html +++ /dev/null @@ -1,16 +0,0 @@ ---- -title: Shim -slug: Glossary/Shim -tags: - - Словник -translation_of: Glossary/Shim ---- -

Шим (shim - прошарок, англ.) - це код, що використовується для виправлення поведінки кода, який вже існує, зазвичай, додаванням нового API, який дозволяє обійти проблему. Це відрізняє його від {{Glossary("polyfill", "поліфіла")}}, що впроваджує новий API, який не підтримується переглядачем початково.

- -

Дізнатись більше

- -

Загальні поняття

- - diff --git a/files/uk/glossary/statement/index.html b/files/uk/glossary/statement/index.html deleted file mode 100644 index 83801fd6b3..0000000000 --- a/files/uk/glossary/statement/index.html +++ /dev/null @@ -1,34 +0,0 @@ ---- -title: Інструкція -slug: Glossary/Statement -tags: - - Beginner - - CodingScripting - - Глосарій -translation_of: Glossary/Statement -original_slug: Glossary/Інструкція ---- -

В комп'ютерній мові програмування інструкція - це рядок коду, який виконує завдання. Кожна програма складається з послідовності інструкцій.

- -

Дізнатись більше

- -

Загальні знання

- - - -

Технічна довідка

- - - - - -
-
- -
-
diff --git a/files/uk/glossary/static_method/index.html b/files/uk/glossary/static_method/index.html deleted file mode 100644 index f81086819e..0000000000 --- a/files/uk/glossary/static_method/index.html +++ /dev/null @@ -1,48 +0,0 @@ ---- -title: Статичний метод -slug: Glossary/Static_method -tags: - - JavaScript - - Словник - - Статичний - - метод -translation_of: Glossary/Static_method ---- -

Статичний метод (чи статична функція) - це {{Glossary("method","метод")}}, визначений як член {{Glossary("object","об'єкта")}}, але доступний безпосередньо з конструктора об'єкта API, а не з екземпляра об'єкта, створеного конструктором.

- -

У Web API статичний метод - це метод, визначений інтерфейсом, який натомість можна викликати без попереднього створення екземпляра об'єкта цього типу.

- -

Методи, які викликаються на екземплярах об'єкта, називаються методами екземпляра.

- -

Приклади

- -

В інтерфейсі Notifications API  метод {{domxref("Notification.requestPermission()")}} викликається на самому конструкторі {{domxref("Notification")}} — це статичний метод:

- -
let promise = Notification.requestPermission();
- -

З іншого боку, метод {{domxref("Notification.close()")}} є методом екземпляра — він викликається на конкретному екземплярі об'єкта сповіщення, щоб закрити сповіщення, яке він представляє:

- -
let myNotification = new Notification('Це моє сповіщення');
-
-myNotification.close();
- - diff --git a/files/uk/glossary/string/index.html b/files/uk/glossary/string/index.html deleted file mode 100644 index 9ff37d062a..0000000000 --- a/files/uk/glossary/string/index.html +++ /dev/null @@ -1,21 +0,0 @@ ---- -title: String -slug: Glossary/String -tags: - - String - - Словник - - рядок -translation_of: Glossary/String ---- -

У будь-якій мові програмування рядок - це послідовність {{Glossary("character","символів")}}, які утворюють текст.

- -

У {{Glossary("JavaScript")}} рядок є однією з {{Glossary("Primitive", "простих величин")}}, а об'єкт {{jsxref("String")}} є {{Glossary("wrapper","обгорткою")}} для рядкового примітива.

- -

Дізнатись більше

- -

Загальні відомості

- - diff --git a/files/uk/glossary/svg/index.html b/files/uk/glossary/svg/index.html deleted file mode 100644 index a95edae93a..0000000000 --- a/files/uk/glossary/svg/index.html +++ /dev/null @@ -1,36 +0,0 @@ ---- -title: SVG -slug: Glossary/SVG -tags: - - SVG - - Глосарій - - Графіка - - Початківцям -translation_of: Glossary/SVG ---- -

Scalable Vector Graphics (SVG, масштабована векторна графіка) — це формат для двовимірної векторної графіки, що базується на синтаксисі {{Glossary("XML")}}. Група {{Glossary("W3C")}} почала працювати над SVG наприкінці дев'яностих, але SVG здобув популярність лише коли було випущено {{Glossary("Microsoft Internet Explorer", "Internet Explorer")}} 9 із підтримкою SVG. Всі головні {{Glossary("browser","браузери")}} зараз підтримують SVG.

- -

Завтяки тому, що SVG базується на синтаксисі {{Glossary("XML")}}, його можна стилізувати за допомогою {{Glossary("CSS")}} та надавати йому інтерактивності, використовуючи {{Glossary("JavaScript")}}. HTML5 зараз дозволяє напряму включати SVG {{Glossary("Tag","теги")}} у документ {{Glossary("HTML")}}.

- -

Так як SVG — це векторний формат графіки, те, що він може маштабуватися без втрати даних, робить його неоціненним у адаптивному {{Glossary("responsive design", "веб-дизайні")}}, тому що він дає можливість створювати елементи інтерфейсу, що можуть маштабуватися для будь-якого розміру екрана. Також SVG включає в себе корисні інструменти, такі як відсікання, маскування, фільтри та анімації.

- -

Довідатись більше

- -

Загальні поняття

- - - -

Вивчати SVG

- - - -

Технічна інформація

- - diff --git a/files/uk/glossary/symbol/index.html b/files/uk/glossary/symbol/index.html deleted file mode 100644 index da8ea9c366..0000000000 --- a/files/uk/glossary/symbol/index.html +++ /dev/null @@ -1,109 +0,0 @@ ---- -title: Символ -slug: Glossary/Symbol -tags: - - ECMAScript2015 - - JavaScript - - Sharing - - Символ - - Словник - - Тип даних -translation_of: Glossary/Symbol -original_slug: Glossary/Символ ---- -

У {{Glossary("JavaScript")}}, символ (Symbol) є {{Glossary("Primitive", "простим типом даних")}}.

- -

Значення типу символ також називають "Символьним значенням". У середовищі виконання JavaScript символьне значення створюється викликом функції {{jsxref("Symbol")}}, яка динамічно створює анонімне, унікальне значення. Символ можна використовувати як властивість об'єкта.

- -

Символ може мати необов'язковий опис, але тільки для відлагодження.

- -

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

- -
// Ось два символи з однаковим описом,
-let Sym1 = Symbol("Sym");
-let Sym2 = Symbol("Sym");
-
-console.log(Sym1 == Sym2); // повертає "false"
-// Символи гарантовано є унікальними.
-// Навіть якщо ми створимо багато символів з тим самим описом,
-// вони будуть різними значеннями.
- -
-

Заувага: Якщо ви знайомі з Ruby чи іншою мовою, що має свій аналог “символів” – будь ласка, не плутайте. Символи JavaScript інші.

-
- -

Символьний тип - це новий функціонал у ECMAScript 2015, і він не має еквіваленту у ECMAScript 5.

- -

У деяких мовах програмування символьний тип даних також називається "атом".

- -

Символи не мають автоматичного перетворення у рядки

- -

Більшість значень у JavaScript підтримують неявне перетворення у рядки. Наприклад, ми можемо викликати alert майже з будь-яким значенням, і це спрацює. Символи особливі. Вони не перетворюються автоматично.

- -

Наприклад,

- -
let Sym = Symbol("Sym");
-alert(Sym); // TypeError: Cannot convert a Symbol value to a string
- -

Це “мовний захист” від плутанини, тому що рядки та символи є фундаментально різними, і не повинні випадково перетворюватись один на одного.

- -

Якщо нам дуже потрібно вивести символ, треба викликати на ньому метод .toString().

- -
let Sym = Symbol("Sym");
-
-alert(Sym.toString()); // Symbol(Sym), тепер це працює
- -

Або ми можемо скористатись властивістю символу symbol.description, щоб дістати його опис, наприклад,

- -
let _Sym = Symbol("Sym");
-
-alert(_Sym.description); // Sym
- -

Добревідомі символи

- -

Клас {{jsxref("Symbol")}} має константи для так званих добревідомих символів (well-known symbols). Ці символи дозволяють налаштовувати взаємодію JS з об'єктом, використовуючи їх в якості ключів.

- -

Прикладами добревідомих символів є: {{jsxref("Symbol.iterator")}} для подібних до масивів об'єктів, або {{jsxref("Symbol.search")}} для рядкових об'єктів.

- -

Вони наведені у таблиці специфікації Добревідомі символи:

- - - -

Глобальний реєстр символів

- -

Методами, що мають доступ до глобального реєстру символів, є {{jsxref("Symbol.for()")}} і {{jsxref("Symbol.keyFor()")}}; це посередники між глобальною таблицею (або "реєстром") символів та середовищем виконання. Реєстр символів переважно збудований інфраструктурою компілятора Javascript, а вміст реєстру символів не доступний для інфраструктури виконання Javascript, окрім як за допомогою цих методів.

- -

Метод Symbol.for(tokenString) повертає символьне значенняз реєстру, а Symbol.keyFor(symbolValue) повертає рядковий токен з реєстру; ці функції зворотні одна одній, тому наступне є істиною:

- -
Symbol.keyFor(Symbol.for("tokenString")) === "tokenString" // true
- -

Дізнайтеся більше

- -

Загальні знання

- - - - diff --git a/files/uk/glossary/synchronous/index.html b/files/uk/glossary/synchronous/index.html deleted file mode 100644 index e70f25554d..0000000000 --- a/files/uk/glossary/synchronous/index.html +++ /dev/null @@ -1,22 +0,0 @@ ---- -title: Синхронність -slug: Glossary/Synchronous -tags: - - Веб - - Словник -translation_of: Glossary/Synchronous ---- -

Синхронність означає комунікацію в реальному часі, в якій кожна сторона отримує (а також, за необхідності, обробляє та відповідає) повідомлення миттєво (або настільки швидко, наскільки це можливо).

- -

Прикладом є телефон — під час телефонної розмови ви намагаєтесь відповідати іншій людині одразу.

- -

Багато команд програмування є синхронними — наприклад, коли ви вводите дані для обчислення, середовище поверне вам результат миттєво, якщо тільки ви не запрограмували його не робити цього.

- -

Дізнайтесь більше

- -

Технічна довідка

- - diff --git a/files/uk/glossary/truthy/index.html b/files/uk/glossary/truthy/index.html deleted file mode 100644 index a89d30a922..0000000000 --- a/files/uk/glossary/truthy/index.html +++ /dev/null @@ -1,52 +0,0 @@ ---- -title: Truthy -slug: Glossary/Truthy -tags: - - JavaScript - - Словник -translation_of: Glossary/Truthy ---- -

У мові {{Glossary("JavaScript")}}, правдиве (truthy) значення - це значення, яке дорівнює true у контексті {{Glossary("Boolean")}}. Всі величини є правдивими, крім тих, які визначені як {{Glossary("Falsy", "хибні")}} (тобто, крім false, 0, -0, 0n, "", null, undefined та NaN).

- -

Мова {{Glossary("JavaScript")}} використовує неявне {{Glossary("Type_Conversion", "перетворення типів")}} у контексті Boolean.

- -

Приклади правдивих значень у JavaScript (які будуть неявно приведені до true у контексті boolean, і, таким чином, виконають блок if):

- -
if (true)
-if ({})
-if ([])
-if (42)
-if ("0")
-if (new Date())
-if (-42)
-if (12n)
-if (3.14)
-if (-3.14)
-if (Infinity)
-if (-Infinity)
-
- -

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

- - - - - - - - - - - - -
Специфікація
{{SpecName("ESDraft", "#sec-toboolean", "ToBoolean abstract operation")}}
- -

Див. також

- - - -
{{QuickLinksWithSubpages("/uk/docs/Glossary")}}
diff --git a/files/uk/glossary/type/index.html b/files/uk/glossary/type/index.html deleted file mode 100644 index 0d9fde0060..0000000000 --- a/files/uk/glossary/type/index.html +++ /dev/null @@ -1,24 +0,0 @@ ---- -title: Тип -slug: Glossary/Type -tags: - - JavaScript - - Змінна - - Значення - - Словник - - Тип -translation_of: Glossary/Type -original_slug: Glossary/Тип ---- -

Тип (або тип даних) є характеристикою {{glossary("value", "значення")}}, що визначає формат його зберігання та способи обробки. Скажімо, ціле число можна помножити на дробове, але не на текстовий рядок.

- -

Крім того, кожен тип даних передбачає обмежену форматом зберігання множину значень. Наприклад, тип {{domxref("Boolean")}} у JavaScript може містити лише значення true та false, натомість тип {{domxref("String")}} містить текстові рядки, а {{domxref("Number")}} — цілі числа та десяткові дроби тощо.

- -

Дізнатись більше

- -

Загальні відомості

- - diff --git a/files/uk/glossary/type_coercion/index.html b/files/uk/glossary/type_coercion/index.html deleted file mode 100644 index 972aad0ebc..0000000000 --- a/files/uk/glossary/type_coercion/index.html +++ /dev/null @@ -1,42 +0,0 @@ ---- -title: Примусове приведення типів -slug: Glossary/Type_coercion -tags: - - Coercion - - JavaScript - - перетворення - - приведення типів -translation_of: Glossary/Type_coercion ---- -

Примусове приведення типів (type coercion - англ.) - це автоматичне або неявне перетворення значень з одного типу даних у інший (наприклад, рядки у числа). {{Glossary("Type conversion","Перетворення типів")}} схоже на примусове приведення типів, тому що обидва перетворюють значення з одного типу даних у інший, з однією ключовою різницею — примусове приведення є неявним, в той час, як перетворення типів може бути неявним або явним.

- -

Приклади

- -
const value1 = '5';
-const value2 = 9;
-let sum = value1 + value2;
-
-console.log(sum);
- -

У наведеному прикладі, JavaScript примусово перетворює 9 з числа у рядок, а після цього поєднує два значення, отримуючи в результаті рядок 59. JavaScript мав вибір між рядком та числом, та прийняв рішення використовувати рядок.

- -

Компілятор міг перетворити 5 у число та повернути суму 14, але не зробив цього. Щоб повернути цей результат, вам довелось би явно перетворити 5 у число за допомогою методу {{jsxref("Global_Objects/Число", "Number()")}}:

- -
sum = Number(value1) + value2;
- - diff --git a/files/uk/glossary/type_conversion/index.html b/files/uk/glossary/type_conversion/index.html deleted file mode 100644 index d91d2a1ef4..0000000000 --- a/files/uk/glossary/type_conversion/index.html +++ /dev/null @@ -1,27 +0,0 @@ ---- -title: Перетворення типів -slug: Glossary/Type_Conversion -tags: - - Словник - - перетворення типів - - приведення типів -translation_of: Glossary/Type_Conversion ---- -

Перетворення (або приведення) типів означає переведення даних з одного типу даних в інший. Неявне перетворення відбувається, коли компілятор автоматично призначає типи даних, але програмний код також може явно вимагати, щоб відбулось перетворення. Наприклад, у інструкції 5+2.0 число з рухомою крапкою 2.0 неявно приводиться до цілого, а в інструкції Number("0x11"), рядок "0x11" явно приводиться до числа 17.

- - diff --git a/files/uk/glossary/undefined/index.html b/files/uk/glossary/undefined/index.html deleted file mode 100644 index d817f047cf..0000000000 --- a/files/uk/glossary/undefined/index.html +++ /dev/null @@ -1,23 +0,0 @@ ---- -title: undefined -slug: Glossary/undefined -tags: - - Проста величина - - Словник -translation_of: Glossary/undefined ---- -

Значення undefined є {{Glossary("Primitive", "простою величиною")}}, яка призначається щойно оголошеним змінним (якщо початкового значення не вказано) та формальним {{Glossary("Argument", "арґументам")}}, які під час виклику {{Glossary("Function", "функції")}} ({{Glossary("Method", "метода")}}) не було передано. Крім того, значення undefined матиме всяка видалена чи просто відсутня {{Glossary("Property", "властивість")}} об'єкта.

- -

Дізнатись більше

- -

Загальні відомості

- - - -

Технічна довідка

- - diff --git a/files/uk/glossary/uri/index.html b/files/uk/glossary/uri/index.html deleted file mode 100644 index 240c4f9c2a..0000000000 --- a/files/uk/glossary/uri/index.html +++ /dev/null @@ -1,23 +0,0 @@ ---- -title: URI (Уніфікований ідентифікатор ресурсів) -slug: Glossary/URI -tags: - - HTTP - - URI - - URL - - Пошук - - Словник -translation_of: Glossary/URI ---- -

URI (англ. Uniform Resource Identifier, укр. Уніфікований ідентифікатор ресурсів) це рядок, який посилається на ресурс. Найбільш поширеними є {{Glossary("URL","URLs")}}, які ідентифікують ресурс, надаючи його місцезнаходження в Інтернеті. {{Glossary("URN","URNs")}}, навпаки, посилаються на ресурс за назвою, в даному просторі імен, так як ISBN книги.

- -

Дізнатись більше

- -

Загальні поняття

- - diff --git a/files/uk/glossary/url/index.html b/files/uk/glossary/url/index.html deleted file mode 100644 index 33c37dfaf0..0000000000 --- a/files/uk/glossary/url/index.html +++ /dev/null @@ -1,27 +0,0 @@ ---- -title: URL -slug: Glossary/URL -tags: - - Інфраструктура - - Словник -translation_of: Glossary/URL ---- -

Уніфікований локатор ресурсів (англ. Uniform Resource Locator, скорочено URL) — текстовий рядок, що є адресою певного ресурсу в Інтернеті та вможливлює прямий доступ до нього.

- -

У контексті {{Glossary("HTTP")}}, URL називають «веб-адресою» або «посиланням». Ваш веб-переглядач подає у адресовому рядку URL-адресу поточної сторінки, наприклад, https://developer.mozilla.org

- -

Втім, URL стосується не лише протоколу {{Glossary("HTTP")}}. URL-адреси також використовуються для передачі файлів ({{Glossary("FTP")}}) , електронної пошти ({{Glossary("SMTP")}}), та інших потреб.

- -

Дізнатись більше

- -

Загальні відомості

- - - -

Докладніше

- - diff --git a/files/uk/glossary/urn/index.html b/files/uk/glossary/urn/index.html deleted file mode 100644 index 108e7aad48..0000000000 --- a/files/uk/glossary/urn/index.html +++ /dev/null @@ -1,19 +0,0 @@ ---- -title: URN (Незмінне ім'я ресурсу) -slug: Glossary/URN -tags: - - urn - - Вступ - - Навігація - - Словник -translation_of: Glossary/URN ---- -

URN (англ. Uniform Resource Name, укр. Незмінне ім'я ресурсу) це {{Glossary("URI")}} у стандартному форматі, який посилається на ресурс без посилання на його місцезнаходження або його існування. Цей приклад походить з RFC3986: urn:oasis:names:specification:docbook:dtd:xml:4.1.2

- -

Дізнатись більше

- -

Загальні поняття

- - diff --git a/files/uk/glossary/utf-8/index.html b/files/uk/glossary/utf-8/index.html deleted file mode 100644 index c55476db9e..0000000000 --- a/files/uk/glossary/utf-8/index.html +++ /dev/null @@ -1,22 +0,0 @@ ---- -title: UTF-8 -slug: Glossary/UTF-8 -tags: - - HTML - - JavaScript - - Utf-8 - - Словник -translation_of: Glossary/UTF-8 ---- -

UTF-8 (англ. UCS Transformation Format 8 - формат перетворення Юнікоду) - це найбільш вживане {{Glossary("Character encoding", "кодування символів")}} у Всесвітній мережі. Кожний символ представлений послідовністю від одного до чотирьох байтів. UTF-8 зворотно сумісний з {{Glossary("ASCII")}} і може відобразити будь-який стандартний символ Юнікоду.

- -

Перші 128 символів UTF-8 повністю співпадають з першими 128 символами ASCII (пронумеровані 0-127). Це означає, що існуючий текст ASCII вже є коректним текстом UTF-8. Усі інші символи використовують від двох до чоритьох байтів. Кожен байт має кілька бітів, зарезервованих для цілей кодування. Оскільки символи, що не належать до ASCII, потребують більше одного байту для зберігання, вони ризикують бути пошкодженими у випадку, якщо байти були розділені та не поєднані знову.

- -

Дізнатись більше

- -

Загальні відомості

- - diff --git a/files/uk/glossary/ux/index.html b/files/uk/glossary/ux/index.html deleted file mode 100644 index 395f32a69a..0000000000 --- a/files/uk/glossary/ux/index.html +++ /dev/null @@ -1,22 +0,0 @@ ---- -title: ДК -slug: Glossary/UX -tags: - - Дизайн - - Доступність - - Навігація - - Словник -translation_of: Glossary/UX -original_slug: Glossary/ДК ---- -

ДК — це акронім від слів досвід користування. Це дослідження взаємодії користувачів і системи. Його мета - зробити систему легкою в взаємодії з точки зору користувача.

- -

Система може бути будь-яким продуктом або додатком, з яким кінцевий користувач має взаємодіяти. Наприклад, дослідження ДК, проведені на веб-сторінці, можуть продемонструвати, чи легко зрозуміти сторінку, перейти до різних областей та виконувати загальні завдання, а також, де такі процеси можуть мати менше труднощів.

- -

Вчіть більше

- -

Загальні знання

- - diff --git a/files/uk/glossary/value/index.html b/files/uk/glossary/value/index.html deleted file mode 100644 index 36c4f46d87..0000000000 --- a/files/uk/glossary/value/index.html +++ /dev/null @@ -1,36 +0,0 @@ ---- -title: Значення -slug: Glossary/Value -tags: - - Значення - - Посилання - - Проста величина - - Словник -translation_of: Glossary/Value -original_slug: Glossary/Значення ---- -

Кажучи про дані або {{Glossary("Wrapper", "обгортку")}} для тих даних, значення являє собою {{Glossary("Primitive","просту величину")}}, яка міститься в об'єкті-обгортці. Натомість, кажучи про {{Glossary("Variable","змінну")}} чи {{Glossary("Property","властивість")}}, значенням можуть називати як просту величину, так і {{Glossary("Object reference","посилання на об'єкт")}}.

- -

Приклади

- -
// Значенням змінної x є число 5
-var x = 5;
-
-// Значенням змінної y є рядок (проста величина) 'Затівка'
-var y = 'Затівка';
-
-// Значенням змінної z є посилання на об'єкт типу String, а значенням того об'єкта є рядок (проста величина) 'Затівка'
-var z = new String(y);
-
-console.log(x.valueOf() === 5);  // виводить true
-console.log(y.valueOf() === y);  // виводить true
-console.log(z.valueOf() === z);  // виводить false
-console.log(z.valueOf() === y);  // виводить true
- -

Дізнатись більше

- -

Загальні відомості

- - diff --git a/files/uk/glossary/variable/index.html b/files/uk/glossary/variable/index.html deleted file mode 100644 index 6fe5d7721c..0000000000 --- a/files/uk/glossary/variable/index.html +++ /dev/null @@ -1,25 +0,0 @@ ---- -title: Змінна -slug: Glossary/Variable -tags: - - JavaScript - - Програмування -translation_of: Glossary/Variable -original_slug: Glossary/Змінна ---- -

Змінна — це {{glossary("Identifier", "найменована")}} ділянка пам'яті, де зберігається {{Glossary("Value", "значення")}}. Таким чином заздалегідь відоме ім'я уможливлює доступ до значення, яке може бути довільним на момент доступу.

- -

Дізнатись більше

- -

Загальні відомості

- - - -

Технічна довідка

- - diff --git a/files/uk/glossary/viewport/index.html b/files/uk/glossary/viewport/index.html deleted file mode 100644 index 224cd9a6dd..0000000000 --- a/files/uk/glossary/viewport/index.html +++ /dev/null @@ -1,24 +0,0 @@ ---- -title: Вікно перегляду -slug: Glossary/Viewport -tags: - - Графіка - - Словник -translation_of: Glossary/Viewport -original_slug: Glossary/Вікно_перегляду ---- -

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

- -

Дізнатись більше

- -

Загальні відомості

- - - -

Технічна довідка

- - diff --git a/files/uk/glossary/w3c/index.html b/files/uk/glossary/w3c/index.html deleted file mode 100644 index cd7ed94d0c..0000000000 --- a/files/uk/glossary/w3c/index.html +++ /dev/null @@ -1,32 +0,0 @@ ---- -title: W3C -slug: Glossary/W3C -tags: - - W3C - - Інтернет - - Глосарій - - Мережа - - Правила - - Спільнота - - всесвітня - - консорціум - - павутина - - стандарт - - терміни - - інтро -translation_of: Glossary/W3C ---- -

World Wide Web Консорціум (W3C) є міжнародним органом, що підтримує {{Glossary("World Wide Web", "Web-пов'язані")}} правила та робочі рамки.

- -

Вона складається з більш ніж 350 організацій-членів, які спільно розробляють веб-стандарти , запускають аутріч-програми, і підтримують відкритий форум для обговорення Web-мережі. W3C координує компанії в галузі, щоб переконатися, що вони реалізують однакові стандарти W3C.

- -

Кожен стандарт проходить через чотири етапи зрілості: Робочий Проект (WD), Рекомендація Кандидата (CR), Запропонована Рекомендація (PR) та W3C Рекомендація (REC).

- -

Learn more

- -

General knowledge

- - diff --git a/files/uk/glossary/webgl/index.html b/files/uk/glossary/webgl/index.html deleted file mode 100644 index ceda2aa4bd..0000000000 --- a/files/uk/glossary/webgl/index.html +++ /dev/null @@ -1,33 +0,0 @@ ---- -title: WebGL -slug: Glossary/WebGL -tags: - - WebGL - - Веб-графіка - - Глоссарій - - Словник -translation_of: Glossary/WebGL ---- -

WebGL (Web Graphics Library) - це {{Glossary("JavaScript")}} {{Glossary("API")}}, який відображає інтерактивну 2D і 3D графіку.

- -

Khronos Group підтримує WebGL, який базується на {{Glossary("OpenGL")}} ES 2.0.

- -

Ви можете викликати WebGL в межах елементу {{Glossary("HTML")}} {{HTMLElement("canvas")}}, який слугує, як поверхня відображення.

- -

Всі основні {{Glossary("Browser","веб-переглядачі")}} зараз підтримують WebGL, але його підтримка також залежить від зовнішніх факторів (наприклад, підтримка графічним процесором пристрою).

- -

Дізнайтесь більше

- -

Загальні знання

- - - -

Технічна стаття

- - diff --git a/files/uk/glossary/websockets/index.html b/files/uk/glossary/websockets/index.html deleted file mode 100644 index 3e9ac2a54c..0000000000 --- a/files/uk/glossary/websockets/index.html +++ /dev/null @@ -1,35 +0,0 @@ ---- -title: WebSockets -slug: Glossary/WebSockets -tags: - - Connection - - Networking - - Інфраструктура - - Протоколи - - Словник -translation_of: Glossary/WebSockets ---- -

WebSocket — це {{Glossary("protocol", "протокол")}}, який передбачає тривале {{Glossary("TCP")}}-з'єдання між {{Glossary("Server", "сервером")}} та клієнтом, що можуть за потреби здійснювати обмін даними будь-якої миті.

- -

Протокол WebSocket зазвичай використовують веб-сервер та {{Glossary("Browser", "переглядач")}}, втім він доступний для всякого клієнського чи серверного застосунка. Через постійно утримуване з'єднання WebSocket сервер може надсилати дані без попереднього запиту з боку клієнта, що уможливлює постійне та вчасне оновлення вмісту.

- -

Дізнатись більше

- -

Загальні відомості

- - - -

Технічна довідка

- - - -

Вивчення WebSocket

- - diff --git a/files/uk/glossary/whitespace/index.html b/files/uk/glossary/whitespace/index.html deleted file mode 100644 index cf288acd04..0000000000 --- a/files/uk/glossary/whitespace/index.html +++ /dev/null @@ -1,44 +0,0 @@ ---- -title: Пробільний символ -slug: Glossary/Whitespace -tags: - - Словник - - пробільний символ -translation_of: Glossary/Whitespace ---- -

Пробільні символи - це набір {{Glossary("Character", "символів")}}, які використовуються для відображення горизонтальної або вертикальної відстані між іншими символами. Вони часто використовуються для розмежування токенів у {{Glossary("HTML")}}, {{Glossary("CSS")}}, {{Glossary("JavaScript")}} та інших комп'ютерних мовах. Пробільні символи та їхнє використання відрізняються у різних мовах.

- -

У HTML

- -

HTML Living Standard визначає 5 символів у якості пробільних символів ASCII: U+0009 TAB, U+000A LF, U+000C FF, U+000D CR та U+0020 SPACE. У тексті вони поводяться як звичайні знаки пробілів, а послідовні пробільні символи у багатьох випадках згортаються у єдиний пробіл (цю поведінку можна змінити властивістю CSS {{cssxref("white-space")}}). Вони також використовуються в якості роздільника імені елемента і його параметрів, імен класів і т. д.

- -

У JavaScript

- -

Специфікація мови ECMAScript® 2015 визначає в Юнікоді декілька кодів символів в якості пробільних символів: U+0009 Символ табуляції <TAB>, U+000B Вертикальна табуляція <VT>, U+000C Кінець сторінки <FF>, U+0020 Пробіл <SP>, U+00A0 Нерозривний пробіл <NBSP>, U+FEFF Нерозривний пробіл нульової ширини <ZWNBSP> та категорія Інше, “Zs”, будь-який інший код символа Юнікоду “Роздільник, пробіл” <USP>. Ці символи зазвичай непотрібні для функціональності коду.

- - diff --git a/files/uk/glossary/world_wide_web/index.html b/files/uk/glossary/world_wide_web/index.html deleted file mode 100644 index 4bbdfb2ed2..0000000000 --- a/files/uk/glossary/world_wide_web/index.html +++ /dev/null @@ -1,41 +0,0 @@ ---- -title: Всесвітня мережа -slug: Glossary/World_Wide_Web -tags: - - WWW - - Інфраструктура - - Словник -translation_of: Glossary/World_Wide_Web -original_slug: Glossary/Тенета ---- -

Всесві́тня мережа (англ. World Wide Web, скорочено: WWW, W3 чи просто Web), павутиннятене́та, або веб — це всесвітня система відкритих документів і сторінок, доступних в мережі {{Glossary("Internet", "Інтернет")}}. Мережа — це не те саме, що й Інтернет: Мережа є лише одним із численних застосувань Інтернету та використовує останній як середовище передачі даних.

- -

Тім Бернерз-Лі запропонував архітектуру, яка стала відома під назвою Всесвітня мережа. Саме він в 1990-му році створив найперший веб-{{Glossary("Server", "сервер")}}, {{Glossary("Browser", "переглядач")}} та веб-сторінку на власному комп'ютері в лабораторії фізичних досліджень у ЦЕРН. В 1991-му він оголосив про своє творіння в групі новин alt.hypertext, позначивши мить, коли Мережу вперше було оприлюднено.

- -

Те, що нині відоме, як Тене́та або Мережа, має декілька складових:

- - - -

Зв'язування сторінок за допомогою {{Glossary("Hyperlink", "гіперпосилань")}} є ключовою можливістю, яка власне і дає можливість називати Тенета множиною пов'язаних документів.

- -

Невдовзі після створення Тенет, Тім Бернерз-Лі заснував об'єднання {{Glossary("W3C")}} (англ. World Wide Web Consortium — Консорціум World Wide Web) для стандартизації та подальшого розвитку мережі. Цей консорціум складається з основних цільових веб-груп, таких як розробники переглядачів, державні установи, дослідники та університети. Його місія включає освіту та поширення.

- -

Дізнатись більше

- -

Навчання

- - - -

Загальні відомості

- - diff --git a/files/uk/glossary/wrapper/index.html b/files/uk/glossary/wrapper/index.html deleted file mode 100644 index c256511fae..0000000000 --- a/files/uk/glossary/wrapper/index.html +++ /dev/null @@ -1,19 +0,0 @@ ---- -title: Wrapper -slug: Glossary/Wrapper -tags: - - Обгортка - - Словник -translation_of: Glossary/Wrapper -original_slug: Glossary/Обгортка ---- -

У таких мовах програмування, як JavaScript, розрізняють два значення поняття обгортка: це або {{glossary("Function", "функція")}}, призначена викликати одну або кілька інших функцій (лише для зручності або задля пристосування їх до використання з дещо іншою метою, ніж передбачалося раніше), або {{glossary("Object", "об'єкт")}} (та {{glossary("Class", "клас")}}, до якого він належить), який містить (огортає) {{glossary("Primitive", "просту величину")}} та надає відповідні {{glossary("Method", "методи")}} для здійснення операцій над нею.

- -

Дізнатись більше

- -

Загальні відомості

- - diff --git a/files/uk/glossary/xml/index.html b/files/uk/glossary/xml/index.html deleted file mode 100644 index 3883574f72..0000000000 --- a/files/uk/glossary/xml/index.html +++ /dev/null @@ -1,18 +0,0 @@ ---- -title: XML -slug: Glossary/XML -tags: - - XML - - Глосарій - - Мова розмітки -translation_of: Glossary/XML ---- -

Розширювана мова розмітки (Extensible Markup Language, скорочено XML) — загальна мова розмітки, встановлена W3C. Галузь інформаційних технологій використовує для опису даних чимало мов, що базуються на XML.

- -

Теги XML подібні до тегів HTML, але XML значно гнучкіший, оскільки дозволяє користувачам впроваджувати власні теги. Таким чином, XML є мета-мовою та використовується для визначення інших мов, таких як {{Glossary("RSS")}}. До того ж, HTML є мовою розмітки, тоді як XML — мова опису даних. Це означає, що сфера застосування XML істотно ширша за Web. Наприклад, веб-сервіси можуть використовувати XML для обміну запитами та відповідями.

- -

Довідатись більше

- - diff --git a/files/uk/learn/accessibility/index.html b/files/uk/learn/accessibility/index.html deleted file mode 100644 index 2e721693f3..0000000000 --- a/files/uk/learn/accessibility/index.html +++ /dev/null @@ -1,76 +0,0 @@ ---- -title: Доступність -slug: Learn/Accessibility -translation_of: Learn/Accessibility -original_slug: Learn/Доступність ---- -
{{LearnSidebar}}
- -

Learning some HTML, CSS, and JavaScript is useful if you want to become a web developer. Beyond mechanical use, it's important to learn how to use these technologies responsibly so that all readers might use your creations on the web. To help you achieve this, this module will cover general best practices (which are demonstrated throughout the HTML, CSS, and JavaScript topics), cross browser testing, and some tips on enforcing accessibility from the start. We'll cover accessibility in special detail.

- -

Overview

- -

When someone describes a site as "accessible," they mean that any user can use all its features and content, regardless of how the user accesses the web — even and especially users with physical or mental impairments.

- - - -

By default, HTML is accessible, if used correctly. Web accessibility involves ensuring that content remains accessible, regardless of who and how the web is accessed.

- -

The Firefox Accessibility Inspector is a very useful tool for checking out accessibility issues on web pages. The following video provides a nice introduction to it:

- -

{{EmbedYouTube("7mqqgIxX_NU")}}

- -
-

Looking to become a front-end web developer?

- -

We have put together a course that includes all the essential information you need to work towards your goal.

- -

Get started

-
- -

Prerequisites

- -

To get the most out of this module, it would be a good idea to either work through at least the first two modules of the HTML, CSS, and JavaScript topics, or perhaps even better, work through the relevant parts of the accessibility module as you work through the related technology topics.

- -
-

Note: If you are working on a computer/tablet/other devices where you don't have the ability to create your own files, you can try out most of the code examples in an online coding program such as JSBin or Glitch.

-
- -

Guides

- -
-
What is accessibility?
-
This article starts off the module with a good look at what accessibility is — this includes what groups of people we need to consider and why, what tools different people use to interact with the web, and how we can make accessibility part of our web development workflow.
-
HTML: A good basis for accessibility
-
A great deal of web content can be made accessible just by making sure the correct HTML elements are always used for the correct purpose . This article looks in detail at how HTML can be used to ensure maximum accessibility.
-
CSS and JavaScript accessibility best practices
-
CSS and JavaScript, when used properly, also have the potential to allow for accessible web experiences, but if misused they can significantly harm accessibility. This article outlines some CSS and JavaScript best practices that should be considered to ensure that even complex content is as accessible as possible.
-
WAI-ARIA basics
-
Following on from the previous article, sometimes making complex UI controls that involve unsemantic HTML and dynamic JavaScript-updated content can be difficult. WAI-ARIA is a technology that can help with such problems by adding in further semantics that browsers and assistive technologies can recognize and use to let users know what is going on. Here we'll show how to use it at a basic level to improve accessibility.
-
Accessible multimedia
-
Another category of content that can create accessibility problems is multimedia — video, audio, and image content need to be given proper textual alternatives, so they can be understood by assistive technologies and their users. This article shows how.
-
Mobile accessibility
-
With web access on mobile devices being so popular, and popular platforms such as iOS and Android having fully-fledged accessibility tools, it is important to consider the accessibility of your web content on these platforms. This article looks at mobile-specific accessibility considerations.
-
- -

Assessments

- -
-
Accessibility troubleshooting
-
-

In the assessment for this module, we present to you a simple site with several accessibility issues that you need to diagnose and fix.

-
-
- -

See also

- - diff --git a/files/uk/learn/common_questions/index.html b/files/uk/learn/common_questions/index.html deleted file mode 100644 index cef04ddf9c..0000000000 --- a/files/uk/learn/common_questions/index.html +++ /dev/null @@ -1,133 +0,0 @@ ---- -title: Поширені питання -slug: Learn/Common_questions -tags: - - Інфраструктура - - Мережа - - Механізми мережі - - Навчання - - Написання сценаріїв -translation_of: Learn/Common_questions ---- -
{{LearnSidebar}}
- -

Цей розділ надає відповіді на поширені питання, які проте не обов'язково є частиною основного матеріалу для вивчення (як-от статті по HTML чи CSS.) Ці статті надані для самостійного опрацювання.

- -

Як працює мережа

- -

Розділ розкриває механізм мережі - це питання, що відносяться до загальних знань про екосистему мережі та принципу її роботи.

- -
-
-

Як працює Інтернет?

-
-
Інтернет - це основа мережі, технічна інфраструктура, завдяки якій вона можлива. В найпростішому вигляді - це велика мережа комп'ютерів, що спілкуються один з одним. В цій статті розглядається принцип його роботи на базовому рівні.
-
-

Яка різниця між веб-сторінкою, сайтом, веб-сервером та пошуковою системою?

-
-
У цій статті ви дізнаєтесь про різні веб-поняття: веб-сторінки, веб-сайти, веб-сервери та пошукові системи. Нові користувачі Інтернету часто плутають  або використовуються неправильно ці терміни. Давайте дізнаємося, що вони означають!
-
-

Що таке URL?

-
-
Поряд з {{Glossary("Hypertext","гіпертекстом")}} та {{Glossary("HTTP")}}, URL - одне з ключових понять мережі. Це механізм, який використовують {{Glossary("Browser","переглядачі")}} для отримання будь-яких доступних  в мережі ресурсів.
-
-

Що таке доменне ім'я?

-
-
Доменні імена є ключовою частиною інфраструктури Інтернету. Вони надають адресу для будь-якого веб-сервера, доступного в Інтернеті, у вигляді, що легко читається людиною
-
-

Що таке веб-сервер?

-
-
Термін "веб-сервер" може означати обладнання або програмне забезпечення, яке обслуговує веб-сайти клієнтів в Інтернеті, а також обидві частини, що працюють разом. У цій статті ми розглянемо, як працюють веб-сервери, та чому вони важливі.
-
-

Що таке гіперпосилання?

-
-
В цій статті ми розглянемо, що таке {{Glossary("Hyperlinks","гіперпосилання")}}, та чому вони мають значення. 
-
- -

Інструменти та налаштування

- -

Питання, що пов'язані з інструментами/програмами, які ви можете використати для створення сайтів.

- -
-
-

Скільки коштує щось зробити в мережі?

-
-
Коли ви запускаєте сайт, це може вам нічого не коштувати або ваші витрати можуть бути захмарні. В статті ми вияснимо скільки що коштуватиме, та що ви матимете за плату чи даром.
-
-

Які програми потрібні для створення сайту?

-
-
Ця стаття про програмні компоненти, що необхідні вам для редагування, вивантаження чи перегляду сайту.
-
-

Які є текстові редактори?

-
-
В статті окреслено  деякі речі, про які потрібно замислитися перед вибором та встановленням текстового редактора для веб-розробки.
-
-

Що таке "Інструменти розробника" в браузері?

-
-
Кожен браузер має набір інструментів розробника для налагодження HTML, CSS та іншого веб-коду. Дізнайтесь, як використовувати їхні основні функції.
-
-

Як переконаєтись, що сайт працює належним чином?

-
-
Ви оприлюднили сайт в Інтернеті — чудово! Та чи впевнені ви, що він працює належним чином? Дізнайтеся про кілька основних способів усунення несправностей.
-
-

Як налаштувати локальний сервер для тестування?

-
-
-
-

Стаття про налаштовування, на вашому комп'ютері, простого локального сервера для  тестування та основи його використання.

-
-
-
-

Як вивантажити файли на веб-сервер?

-
-
Як оприлюднити сайт в Інтернеті, щоб люди мала доступ до нього з їхніх комп'ютерів? Зробимо це за допомогою одого з найпоширеніших способів — інструментів FTP
-
-

Як користуватись GitHub сторінками ?

-
-
Ця стаття містить загальний посібник по публікації вмісту за допомогою gh-сторінок GitHub.
-
-

Як розмістити свій сайт на Google App Engine?

-
-
Шукаєте місце для розміщення вашого веб-сайту? Це покроковий посібник по розміщенню вашого сайту на Google App Engine.
-
-

Які є інструменти для налагодження та підвищення ефективності сайту?

-
-
В наборі статей показано, як використовувати інструменти розробника в Firefox для налагодження та підвищення ефективності сайту. А саме — інструментів для перевірки використання пам'яті, дерева викликів JavaScript, кількості виділених версій DOM та інших.
-
- -

Дизайн та доступність 

- -

У розділі перелічені питання, пов'язані з естетикою, структурою сторінки, методами  досягнення доступності тощо.

- -
-
-

Як почати розробку сайту?

-
-
Стаття про найважливіший перший крок кожного проекту: визначте, що ви хочете цим досягти.
-
-

Що містять поширені веб-макети?

-
-
При проектуванні сторінок сайту, добре мати уявлення про найпоширеніші макети. Ця стаття про декілька типових веб-макетів та їх окремі компоненти.
-
-

Що таке доступність?

-
-
Стаття містить основні поняття, що визначають доступність сайтів.
-
-

Як ми можемо спроектувати сайт для різноманітних користувачів?

-
-
Стаття містить основні методи, які допоможуть вам розробляти сайти для будь-яких користувачів — переваги швидкого доступу та подібні речі.
-
-

Які особливості HTML сприяють доступності?

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

Питання з HTML, CSS та JavaScript

- -

Про поширені вирішеня проблем в HTML/CSS/JavaScript читайте в наступних статтях:

- - diff --git a/files/uk/learn/common_questions/set_up_a_local_testing_server/index.html b/files/uk/learn/common_questions/set_up_a_local_testing_server/index.html deleted file mode 100644 index 5ebd96246f..0000000000 --- a/files/uk/learn/common_questions/set_up_a_local_testing_server/index.html +++ /dev/null @@ -1,95 +0,0 @@ ---- -title: Як налаштувати локальний тестовий сервер? -slug: Learn/Common_questions/set_up_a_local_testing_server -translation_of: Learn/Common_questions/set_up_a_local_testing_server ---- -
-

 Стаття про те, як налаштувати на вашому комп'ютері простий локальний тестовий сервер та основи його використання.

-
- - - - - - - - - - - - -
Передумови:Вам потрібно спочатку дізнатись, як працює інтернет і що таке веб-сервер.
Мета:Ви дізнаєтеся, як налаштувати локальний тестовий сервер.
- -

Локальні файли порівняно з віддаленими

- -

Протягом більшої частини вивчення зони навчання ми пропонуємо вам просто відкрити свої приклади безпосередньо в браузері. Це можна зробити двічі клацнувши файл HTML, перетягнувши його в вікно браузера або вибравши «Файл»> «Відкрити ...» та знайти файл HTML. Є ще багато способів це зробити.

- -

Якщо шлях веб-адреси починається з file://, а потім йде шлях до файлу на локальному жорсткому диску, використовується локальний файл. На відміну від цього, якщо ви переглядаєте один з наших прикладів, розміщених на GitHub (або приклад на якомусь іншому віддаленому сервері), веб-адреса почнеться з http:// або https://, щоб показати, що файл буде отримано через HTTP .

- -

Проблема з тестуванням локальних файлів

- -

Деякі приклади не працюватимуть, якщо ви відкриєте їх як локальні файли. Це може бути з різних причин, найбільш імовірно:

- - - -

Запуск простого локального HTTP-сервера

- -

Щоб подолати проблему з асинхронними запитами, та перевірити такі приклади, ми повинні запустити їх на локальному веб-сервері. Для наших цілей одним з найпростіших способів зробити це — використати модуль Python SimpleHTTPServer.

- -

Як це зробити:

- -
    -
  1. -

    Встановити Python. Якщо ви використовуєте Linux або Mac OS X, він вже має бути доступним у вашій системі. Якщо ви користувач Windows, ви можете отримати інсталятор з домашньої сторінки Python та дотримуватесь інструкцій, щоб встановити його:

    - -
      -
    • Перейдіть до python.org
    • -
    • Натисніть кнопку «Download» віберіть «Windows».
    • -
    • У списку виберіть виконавчий файл Windows x86 executable installer або Windows x86-64 executable installer та завантажте його. 
    • -
    • Після завантаження запустіть його.
    • -
    • На першій сторінці встановлення переконайтеся, що відмітили "Додати Python 3.xxx до PATH".
    • -
    • Натисніть кнопку «Встановити», а після завершення інсталяції — «Закрити».
    • -
    -
  2. -
  3. -

    Відкрийте командний рядок (Windows) або термінал (OS X/Linux). Щоб перевірити, чи встановлено Python, введіть таку команду:

    - -
    python -V
    -
  4. -
  5. -

    Ви маєте отриматити номер версії. Якщо це так, то перейдіть до каталогу, в якому ваш приклад, за допомогою команди cd.

    - -
    # include the directory name to enter it, for example
    -cd Desktop
    -# use two dots to jump up one directory level if you need to
    -cd ..
    -
  6. -
  7. -

    Щоб запустити сервер у цьому каталозі, введіть команду:

    - -
    # If Python version returned above is 3.X
    -python -m http.server
    -# If Python version returned above is 2.X
    -python -m SimpleHTTPServer
    -
  8. -
  9. -

    Зазвичай він буде запускати вміст каталогу на локальному веб-сервері по порту 8000. Ви можете перейти на цей сервер, зайшовши на адресу localhost: 8000 у своєму переглядачі. Ви побачите там вміст вказаного каталогу — натисніть файл HTML, який ви хочете запустити.

    -
  10. -
- -
-

Примітка: Якщо у вас вже щось працює по порту 8000, ви можете вибрати інший, запустивши команду сервера з іншим номером порту, як-от python -m http.server 7800 (Python 3.x) або python -m SimpleHTTPServer 7800 (Python 2.x). Після цього ви можете отримати доступ до свого вмісту по localhost:7800.

-
- -

Запуск мов серверної частини локально

- -

Модуль Python SimpleHTTPServer (python 2.0) http.server (python 3.0) корисний, але він не знає як запустити код написаний на таких мовах як Python, PHP чи JavaScript. To handle that you'll need something more — exactly what you'll need depends on the server-side language you are trying to run. Here are a few examples:

- - diff --git a/files/uk/learn/css/building_blocks/cascade_and_inheritance/index.html b/files/uk/learn/css/building_blocks/cascade_and_inheritance/index.html deleted file mode 100644 index 5444f5713a..0000000000 --- a/files/uk/learn/css/building_blocks/cascade_and_inheritance/index.html +++ /dev/null @@ -1,337 +0,0 @@ ---- -title: Cascade and inheritance -slug: Learn/CSS/Building_blocks/Cascade_and_inheritance -translation_of: Learn/CSS/Building_blocks/Cascade_and_inheritance ---- -
{{LearnSidebar}}{{NextMenu("Learn/CSS/Building_blocks/Selectors", "Learn/CSS/Building_blocks")}}
- -

Мета  цього уроку - розвинути розуміння найфундаментальніших концептів CSS — каскадності (cascade), специфічності (specificity), і наслідування (inheritance) — ці принципи контролюють те, як  CSS застосовується до елементів HTML і як вирішуються конфлікти між правилами CSS.

- -

Опрацювання цього уроку може здатися не настільки актуальним на даному етапі і занадто академічним порівняно з іншими частинами курсу, однак розуміння цих концепцій збереже вам багато часу в майбутньому. Ми заохочуємо вас опрацювати цю частину курсу уважно і впевнитися, що ви розумієте ці концепти перед тим, як рухатися далі. 

- - - - - - - - - - - - -
Prerequisites:Basic computer literacy, basic software installed, basic knowledge of working with files, HTML basics (study Introduction to HTML), and an idea of how CSS works (study CSS first steps.)
Objective:To learn about the cascade and specificity, and how inheritance works in CSS.
- -

Правила CSS, що конфліктують між собою

- -

CSS означає Cascading Style Sheets (Каскадні Таблиці Стилів), і розуміння першого слова каскадний є надзвичайно важливим — спосіб поведінки каскадів це ключ до розуміння CSS.

- -

Рано чи пізно, ви будете працювати над проектом і потрапите в ситуацію, коли правила CSS, які повинні були б застосуватися до якогось певного HTML елемента, не працюють.  Як правило, проблема полягатиме в тому, що ви створили два різних СSS правила, які можуть потенційно застосуватися до одного і того самого елемента. Каскад (cascade), так само як і тісно пов*язаний із ним концепт специфічності - це механізми, які контролюють те, яке саме із CSS правил застосується в випадку такого конфлікту. Правило, яке застосується до вашого елементу може бути далеко не тим, на котре ви очікували. Для того, щоб уникнути таких ситуацій, потрібно зрозуміти, як саме працюють ці механізми. 

- -

Так само важливим є і концепт наслідування (inheritance), який полягає в тому, що деякі CSS властивості (CSS properties) по замовчуванню наслідують ознаки своїх батьківських елементів (parent elements), а деякі ні. Це так само може призвести до неочікуваних ситуацій.

- -

Для початку, поглянемо на концепції із якими ми матимемо справу в загальному, а потім розберемо кожну із них по черзі, щоб побачити те, як вони співпрацюють між собою і іншими правилами CSS, які ви написали. Зрозуміти ці концепти може бути непросто спочатку, однак в процесі написання і практикування з CSS, вам буде все легше і легше  розуміти і те, як саме воно працює. 

- -

Каскад (cascade)

- -

Каскад — на найпростішому рівні, цей принцип полягає в тому, що порядок CSS правил має значення. В випадках, коли можна застосувати одне із двох різних правил із однаковою специфічністю, вибирається те правило, яке зазначене останнім. 

- -

В нашому прикладі ми маємо два правила, що могли б бути застосовані до елемента  h1. Елемент h1 в кінцевому результаті виявиться синім — ці два правила мають ідентичний селектор, і, як результат, однакову специфічність, а тому той, який іде останнім по порядку, "перемагає".

- -

{{EmbedGHLiveSample("css-examples/learn/cascade/cascade-simple.html", '100%', 400)}} 

- -

Специфічність (specificity)

- -

Принцип специфічності полягає в тому, як саме браузер вирішує те, яке із CSS правил застосувати тоді, коли різні правила відносяться до різних селеторів, але все одно можуть бути застосовані до одного і того самого елемента. В певному сенсі це міра того, наскільки специфічним буде вибір селектора.

- - - -

Час для прикладу: ми знову бачимо 2 правила, що можуть бути застосовані до елемента  h1. В кінцквому результаті  h1 стає червоним — селектор по класу надає своєму правилу більшої специфічності,  а тому браузер застосує саме його, не зважаючи на те, що по порядку він йде другим.

- -

{{EmbedGHLiveSample("css-examples/learn/cascade/specificity-simple.html", '100%', 500)}} 

- -

Ми пояснимо розрахунок специфічності далі у цій статті. 

- -

Inheritance

- -

Inheritance also needs to be understood in this context — some CSS property values set on parent elements are inherited by their child elements, and some aren't.

- -

For example, if you set a color and font-family on an element, every element inside it will also be styled with that color and font, unless you've applied different color and font values directly to them.

- -

{{EmbedGHLiveSample("css-examples/learn/cascade/inheritance-simple.html", '100%', 550)}} 

- -

Some properties do not inherit — for example if you set a {{cssxref("width")}} of 50% on an element, all of its descendants do not get a width of 50% of their parent's width. If this was the case, CSS would be very frustrating to use!

- -
-

Note: On MDN CSS property reference pages you can find a technical information box, usually at the bottom of the specifications section, which lists a number of data points about that property, including whether it is inherited or not. See the color property Specifications section, for example.

-
- -

Understanding how the concepts work together

- -

These three concepts together control which CSS applies to what element; in the below sections we'll see how they work together. It can sometimes seem a little bit complicated, but you will start to remember them as you get more experienced with CSS, and you can always look up the details if you forget! Even experienced developers don't remember all the details.

- -

Understanding inheritance

- -

We'll start with inheritance. In the example below we have a {{cssxref("ul")}}, with two levels of unordered lists nested inside it. We have given the outer <ul> a border, padding, and a font color.

- -

The color has applied to the direct children, but also the indirect children — the immediate child <li>s, and those inside the first nested list. We have then added a class of special to the second nested list and applied a different color to it. This then inherits down through its children.

- -

{{EmbedGHLiveSample("css-examples/learn/cascade/inheritance.html", '100%', 700)}} 

- -

Things like widths (as mentioned above), margins, padding, and borders do not inherit. If a border were to be inherited by the children of our list, every single list and list item would gain a border — probably not an effect we would ever want!

- -

Which properties are inherited by default and which aren't is largely down to common sense.

- -

Controlling inheritance

- -

CSS provides four special universal property values for controlling inheritance. Every CSS property accepts these values.

- -
-
{{cssxref("inherit")}}
-
Sets the property value applied to a selected element to be the same as that of its parent element. Effectively, this "turns on inheritance".
-
{{cssxref("initial")}}
-
Sets the property value applied to a selected element to be the same as the value set for that element in the browser's default style sheet. If no value is set by the browser's default style sheet and the property is naturally inherited, then the property value is set to inherit instead.
-
{{cssxref("unset")}}
-
Resets the property to its natural value, which means that if the property is naturally inherited it acts like inherit, otherwise it acts like initial.
-
- -
-

Note: There is also a newer value, {{cssxref("revert")}}, which has limited browser support.

-
- -
-

Note: See {{SectionOnPage("/en-US/docs/Web/CSS/Cascade", "Origin of CSS declarations")}} for more information on each of these and how they work.

-
- -

We can look at a list of links and explore how the universal values work. The live example below allows you to play with the CSS and see what happens when you make changes. Playing with code really is the best way to get to grips with HTML and CSS.

- -

For example:

- -
    -
  1. The second list item has the class my-class-1 applied. This sets the color of the a element nested inside to inherit. If you remove the rule how does it change the color of the link?
  2. -
  3. Do you understand why the third and fourth links are the color that they are? Check the description of the values above if not.
  4. -
  5. Which of the links will change color if you define a new color for the <a> element — for example a { color: red; }?
  6. -
- -

{{EmbedGHLiveSample("css-examples/learn/cascade/keywords.html", '100%', 700)}} 

- -

Resetting all property values

- -

The CSS shorthand property all can be used to apply one of these inheritance values to (almost) all properties at once. Its value can be any one of the inheritance values (inherit, initial, unset, or revert). It's a convenient way to undo changes made to styles so that you can get back to a known starting point before beginning new changes.

- -

In the below example we have two blockquotes. The first has styling applied to the blockquote element itself, the second has a class applied to the blockquote which sets the value of all to unset.

- -

{{EmbedGHLiveSample("css-examples/learn/cascade/all.html", '100%', 700)}} 

- -

Try setting the value of all to some of the other available values and observe what the difference is.

- -

Розуміння каскадів

- -

Ми тепер розуміємо, чому параграф, що знаходиться всередині структури HTML документа, має такий самий коляр як і той, що вказаний в CSS для елементу  <body>. З початкових уроків ми розуміємо також  from the introductory lessons we have an understanding of how to change the CSS applied to something at any point in the document — whether by assigning CSS to an element or creating a class. We will now take a proper look at how the cascade defines which CSS rules apply when more than one thing could style an element.

- -

There are three factors to consider, listed here in decreasing order of importance. Earlier ones overrule later ones:

- -
    -
  1. Importance
  2. -
  3. Specificity
  4. -
  5. Source order
  6. -
- -

We will look at these from the bottom up, to see how browsers figure out exactly what CSS should be applied.

- -

Source order

- -

We have already seen how source order matters to the cascade. If you have more than one rule, which has exactly the same weight, then the one that comes last in the CSS will win. You can think of this as rules which are nearer the element itself overwriting early ones until the last one wins and gets to style the element.

- -

Specificity

- -

Once you understand the fact that source order matters, at some point you will run into a situation where you know that a rule comes later in the stylesheet, but an earlier, conflicting, rule is applied. This is because that earlier rule has a higher specificity — it is more specific, and therefore is being chosen by the browser as the one that should style the element.

- -

As we saw earlier in this lesson, a class selector has more weight than an element selector, so the properties defined on the class will override those applied directly to the element.

- -

Something to note here is that although we are thinking about selectors, and the rules that are applied to the thing they select, it isn't the entire rule which is overwritten, only the properties which are the same.

- -

This behavior helps avoid repetition in your CSS. A common practice is to define generic styles for the basic elements, and then create classes for those which are different. For example, in the stylesheet below we have defined generic styles for level 2 headings, and then created some classes which change only some of the properties and values. The values defined initially are applied to all headings, then the more specific values are applied to the headings with the classes.

- -

{{EmbedGHLiveSample("css-examples/learn/cascade/mixing-rules.html", '100%', 700)}} 

- -

Let's now have a look at how the browser will calculate specificity. We already know that an element selector has low specificity and can be overwritten by a class. Essentially a value in points is awarded to different types of selectors, and adding these up gives you the weight of that particular selector, which can then be assessed against other potential matches.

- -

The amount of specificity a selector has is measured using four different values (or components), which can be thought of as thousands, hundreds, tens and ones — four single digits in four columns:

- -
    -
  1. Thousands: Score one in this column if the declaration is inside a {{htmlattrxref("style")}} attribute, aka inline styles. Such declarations don't have selectors, so their specificity is always simply 1000.
  2. -
  3. Hundreds: Score one in this column for each ID selector contained inside the overall selector.
  4. -
  5. Tens: Score one in this column for each class selector, attribute selector, or pseudo-class contained inside the overall selector.
  6. -
  7. Ones: Score one in this column for each element selector or pseudo-element contained inside the overall selector.
  8. -
- -
-

Note: The universal selector (*), combinators (+, >, ~, ' '), and negation pseudo-class (:not) have no effect on specificity.

-
- -

The following table shows a few isolated examples to get you in the mood. Try going through these, and making sure you understand why they have the specificity that we have given them. We've not covered selectors in detail yet, but you can find details of each selector on the MDN  selectors reference.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
SelectorThousandsHundredsTensOnesTotal specificity
h100010001
h1 + p::first-letter00030003
li > a[href*="en-US"] > .inline-warning00220022
#identifier01000100
No selector, with a rule inside an element's {{htmlattrxref("style")}} attribute10001000
- -

Before we move on, let's look at an example in action.

- -

{{EmbedGHLiveSample("css-examples/learn/cascade/specificity-boxes.html", '100%', 700)}} 

- -

So what's going on here? First of all, we are only interested in the first seven rules of this example, and as you'll notice, we have included their specificity values in a comment before each one.

- - - -
    -
- -
-

Note: This has only been an approximate example for ease of understanding. In actuality, each selector type has its own level of specificity that cannot be overwritten by selectors with a lower specificity level. For example, a million class selectors combined would not be able to overwrite the rules of one id selector.

- -

A more accurate way to evaluate specificity would be to score the specificity levels individually starting from highest and moving on to lowest when necessary. Only when there is a tie between selector scores within a specificity level do you need to evaluate the next level down; otherwise, you can disregard the lower specificity level selectors since they can never overwrite the higher specificity levels.

-
- -

!important

- -

There is a special piece of CSS that you can use to overrule all of the above calculations, however you should be very careful with using it — !important. This is used to make a particular property and value the most specific thing, thus overriding the normal rules of the cascade.

- -

Take a look at this example where we have two paragraphs, one of which has an ID.

- -

{{EmbedGHLiveSample("css-examples/learn/cascade/important.html", '100%', 700)}} 

- -

Let's walk through this to see what's happening — try removing some of the properties to see what happens if you are finding it hard to understand:

- -
    -
  1. You'll see that the third rule's {{cssxref("color")}} and {{cssxref("padding")}} values have been applied, but the {{cssxref("background-color")}} hasn't. Why? Really all three should surely apply, because rules later in the source order generally override earlier rules.
  2. -
  3. However, The rules above it win, because class selectors have higher specificity than element selectors.
  4. -
  5. Both elements have a {{htmlattrxref("class")}} of better, but the 2nd one has an {{htmlattrxref("id")}} of winning too. Since IDs have an even higher specificity than classes (you can only have one element with each unique ID on a page, but many elements with the same class — ID selectors are very specific in what they target), the red background color and the 1 pixel black border should both be applied to the 2nd element, with the first element getting the gray background color, and no border, as specified by the class.
  6. -
  7. The 2nd element does get the red background color, but no border. Why? Because of the !important declaration in the second rule — including this after border: none means that this declaration will win over the border value in the previous rule, even though the ID has higher specificity.
  8. -
- -
-

Note: The only way to override this !important declaration would be to include another !important declaration on a declaration with the same specificity later in the source order, or one with a higher specificity.

-
- -

It is useful to know that !important exists so that you know what it is when you come across it in other people's code. However, we strongly recommend that you never use it unless you absolutely have to. !important changes the way the cascade normally works, so it can make debugging CSS problems really hard to work out, especially in a large stylesheet.

- -

One situation in which you may have to use it is when you are working on a CMS where you can't edit the core CSS modules, and you really want to override a style that can't be overridden in any other way. But really, don't use it if you can avoid it.

- -

The effect of CSS location

- -

Finally, it is also useful to note that the importance of a CSS declaration depends on what stylesheet it is specified in — it is possible for users to set custom stylesheets to override the developer's styles, for example the user might be visually impaired, and want to set the font size on all web pages they visit to be double the normal size to allow for easier reading.

- -

To summarize

- -

Conflicting declarations will be applied in the following order, with later ones overriding earlier ones:

- -
    -
  1. Declarations in user agent style sheets (e.g. the browser's default styles, used when no other styling is set).
  2. -
  3. Normal declarations in user style sheets (custom styles set by a user).
  4. -
  5. Normal declarations in author style sheets (these are the styles set by us, the web developers).
  6. -
  7. Important declarations in author style sheets
  8. -
  9. Important declarations in user style sheets
  10. -
- -

It makes sense for web developers' stylesheets to override user stylesheets, so the design can be kept as intended, but sometimes users have good reasons to override web developer styles, as mentioned above — this can be achieved by using !important in their rules.

- -

Active learning: playing with the cascade

- -

In this active learning, we'd like you to experiment with writing a single new rule that will override the color and background color that we've applied to the links by default. Can you use one of the special values we looked at in the {{anch("Controlling inheritance")}} section to write a declaration in a new rule that will reset the background color back to white, without using an actual color vff

- -

If you make a mistake, you can always reset it using the Reset button. If you get really stuck, take a look at the solution here.

- -

{{EmbedGHLiveSample("css-examples/learn/cascade/task.html", '100%', 700)}}

- -

What's next

- -

If you understood most of this article, then well done — you've started getting familiar with the fundamental mechanics of CSS. Next up, we'll look at selectors in detail.

- -

If you didn't fully understand the cascade, specificity, and inheritance, then don't worry! This is definitely the most complicated thing we've covered so far in the course, and is something that even professional web developers sometimes find tricky. We'd advise that you return to this article a few times as you continue through the course, and keep thinking about it.

- -

Refer back here if you start to come across strange issues with styles not applying as expected. It could be a specificity issue.

- -

{{NextMenu("Learn/CSS/Building_blocks/Selectors", "Learn/CSS/Building_blocks")}}

- -

In this module

- -
    -
  1. Cascade and inheritance
  2. -
  3. CSS selectors - -
  4. -
  5. The box model
  6. -
  7. Backgrounds and borders
  8. -
  9. Handling different text directions
  10. -
  11. Overflowing content
  12. -
  13. Values and units
  14. -
  15. Sizing items in CSS
  16. -
  17. Images, media, and form elements
  18. -
  19. Styling tables
  20. -
  21. Debugging CSS
  22. -
  23. Organizing your CSS
  24. -
diff --git a/files/uk/learn/css/building_blocks/index.html b/files/uk/learn/css/building_blocks/index.html deleted file mode 100644 index 39839cd182..0000000000 --- a/files/uk/learn/css/building_blocks/index.html +++ /dev/null @@ -1,90 +0,0 @@ ---- -title: Будівельні блоки CSS -slug: Learn/CSS/Building_blocks -tags: - - Beginner - - CSS - - Learn - - NeedsTranslation - - TopicStub - - building blocks -translation_of: Learn/CSS/Building_blocks ---- -
{{LearnSidebar}}
- -

This module carries on where CSS first steps left off — now you've gained familiarity with the language and its syntax, and got some basic experience with using it, its time to dive a bit deeper. This module looks at the cascade and inheritance, all the selector types we have available, units, sizing, styling backgrounds and borders, debugging, and lots more.

- -

The aim here is to provide you with a toolkit for writing competent CSS and help you understand all the essential theory, before moving on to more specific disciplines like text styling and CSS layout.

- -

Prerequisites

- -

Before starting this module, you should have:

- -
    -
  1. Basic familiarity with using computers, and using the Web passively (i.e. just looking at it, consuming the content.)
  2. -
  3. A basic work environment set up as detailed in Installing basic software, and an understanding of how to create and manage files, as detailed in Dealing with files.
  4. -
  5. Basic familiarity with HTML, as discussed in the Introduction to HTML module.
  6. -
  7. An understanding of the basics of CSS, as discussed in the CSS first steps module.
  8. -
- -
-

Note: If you are working on a computer/tablet/other device where you don't have the ability to create your own files, you could try out (most of) the code examples in an online coding program such as JSBin or Thimble.

-
- -

Guides

- -

This module contains the following articles, which cover the most essential parts of the CSS language. Along the way you'll come across plenty of exercises to allow you to test your understanding.

- -
-
Cascade and inheritance
-
The aim of this lesson is to develop your understanding of some of the most fundamental concepts of CSS — the cascade, specificity, and inheritance — which control how CSS is applied to HTML and how conflicts are resolved.
-
CSS selectors
-
There are a wide variety of CSS selectors available, allowing for fine-grained precision when selecting elements to style. In this article and its sub-articles we'll run through the different types in great detail, seeing how they work. The sub-articles are as follows: - -
-
The box model
-
Everything in CSS has a box around it, and understanding these boxes is key to being able to create layouts with CSS, or to align items with other items. In this lesson we will take a proper look at the CSS Box Model, in order that you can move onto more complex layout tasks with an understanding of how it works and the terminology that relates to it.
-
Backgrounds and borders
-
In this lesson we will take a look at some of the creative things you can do with CSS backgrounds and borders. From adding gradients, background images, and rounded corners, backgrounds and borders are the answer to a lot of styling questions in CSS.
-
Handling different text directions
-
In recent years, CSS has evolved in order to better support different directionality of content, including right-to-left but also top-to-bottom content (such as Japanese) — these different directionalities are called writing modes. As you progress in your study and begin to work with layout, an understanding of writing modes will be very helpful to you, therefore we will introduce them in this article.
-
Overflowing content
-
In this lesson we will look at another important concept in CSS — overflow. Overflow is what happens when there is too much content to be contained comfortably inside a box. In this guide you will learn what it is and how to manage it.
-
CSS values and units
-
Every property used in CSS has a value or set of values that are allowed for that property. In this lesson we will take a look at some of the most common values and units in use.
-
Sizing items in CSS
-
In the various lessons so far you have come across a number of ways to size items on a web page using CSS. Understanding how big the different features in your design will be is important, and in this lesson we will summarize the various ways elements get a size via CSS and define a few terms around sizing that will help you in the future.
-
Images, media, and form elements
-
In this lesson we will take a look at how certain special elements are treated in CSS. Images, other media, and form elements behave a little differently in terms of your ability to style them with CSS than regular boxes. Understanding what is and isn't possible can save some frustration, and this lesson will highlight some of the main things that you need to know.
-
Styling tables
-
Styling an HTML table isn't the most glamorous job in the world, but sometimes we all have to do it. This article provides a guide to making HTML tables look good, with some specific table styling techniques highlighted.
-
Debugging CSS
-
Sometimes when writing CSS you will encounter an issue where your CSS doesn't seem to be doing what you expect. This article will give you guidance on how to go about debugging a CSS problem, and show you how the DevTools included in all modern browsers can help you find out what is going on.
-
Organizing your CSS
-
As you start to work on larger stylesheets and big projects you will discover that maintaining a huge CSS file can be challenging. In this article we will take a brief look at some best practices for writing your CSS to make it easily maintainable, and some of the solutions you will find in use by others to help improve maintainability.
-
- -

Assessments

- -

Want to test your CSS skills? The following assessments will test your understanding of the CSS covered in the guides above.

- -
-
Fundamental CSS comprehension
-
This assessment tests your understanding of basic syntax, selectors, specificity, box model, and more.
-
Creating fancy letterheaded paper
-
If you want to make the right impression, writing a letter on nice letterheaded paper can be a really good start. In this assessment, we'll challenge you to create an online template to achieve such a look.
-
A cool looking box
-
Here you'll get some practice in using background and border styling to create an eye-catching box.
-
- -

See also

- -
-
Advanced styling effects
-
This article acts as a box of tricks, providing an introduction to some interesting advanced styling features such as box shadows, blend modes, and filters.
-
diff --git a/files/uk/learn/css/css_layout/index.html b/files/uk/learn/css/css_layout/index.html deleted file mode 100644 index ed65a3192e..0000000000 --- a/files/uk/learn/css/css_layout/index.html +++ /dev/null @@ -1,71 +0,0 @@ ---- -title: CSS розмітка -slug: Learn/CSS/CSS_layout -translation_of: Learn/CSS/CSS_layout -original_slug: Learn/CSS/CSS_розмітка ---- -
{{LearnSidebar}}
- -

At this point we've already looked at CSS fundamentals, how to style text, and how to style and manipulate the boxes that your content sits inside. Now it's time to look at how to place your boxes in the right place in relation to the viewport, and one another. We have covered the necessary prerequisites so we can now dive deep into CSS layout, looking at different display settings, modern layout tools like flexbox, CSS grid, and positioning, and some of the legacy techniques you might still want to know about.

- -
-

Looking to become a front-end web developer?

- -

We have put together a course that includes all the essential information you need to work towards your goal.

- -

Get started

-
- -

Prerequisites

- -

Before starting this module, you should already:

- -
    -
  1. Have basic familiarity with HTML, as discussed in the Introduction to HTML module.
  2. -
  3. Be comfortable with CSS fundamentals, as discussed in Introduction to CSS.
  4. -
  5. Understand how to style boxes.
  6. -
- -
-

Note: If you are working on a computer/tablet/other device where you don't have the ability to create your own files, you could try out (most of) the code examples in an online coding program such as JSBin or Glitch.

-
- -

Guides

- -

These articles will provide instruction on the fundamental layout tools and techniques available in CSS. At the end of the lessons is an assessment to help you check your understanding of layout methods, by laying out a webpage.

- -
-
Introduction to CSS layout
-
This article will recap some of the CSS layout features we've already touched upon in previous modules — such as different {{cssxref("display")}} values — and introduce some of the concepts we'll be covering throughout this module.
-
Normal flow
-
Elements on webpages lay themselves out according to normal flow - until we do something to change that. This article explains the basics of normal flow as a grounding for learning how to change it.
-
Flexbox
-
Flexbox is a one-dimensional layout method for laying out items in rows or columns. Items flex to fill additional space and shrink to fit into smaller spaces. This article explains all the fundamentals. After studying this guide you can test your flexbox skills to check your understanding before moving on.
-
Grids
-
CSS Grid Layout is a two-dimensional layout system for the web. It lets you lay content out in rows and columns, and has many features that make building complex layouts straightforward. This article will give you all you need to know to get started with page layout, then test your grid skills before moving on.
-
Floats
-
Originally for floating images inside blocks of text, the {{cssxref("float")}} property became one of the most commonly used tools for creating multiple column layouts on webpages. With the advent of Flexbox and Grid it has now returned to its original purpose, as this article explains.
-
Positioning
-
Positioning allows you to take elements out of the normal document layout flow, and make them behave differently, for example sitting on top of one another, or always remaining in the same place inside the browser viewport. This article explains the different {{cssxref("position")}} values, and how to use them.
-
Multiple-column layout
-
The multiple-column layout specification gives you a method of laying content out in columns, as you might see in a newspaper. This article explains how to use this feature.
-
Responsive design
-
As more diverse screen sizes have appeared on web-enabled devices, the concept of responsive web design (RWD) has appeared: a set of practices that allows web pages to alter their layout and appearance to suit different screen widths, resolutions, etc. It is an idea that changed the way we design for a multi-device web, and in this article we'll help you understand the main techniques you need to know to master it.
-
Beginner's guide to media queries
-
The CSS Media Query gives you a way to apply CSS only when the browser and device environment matches a rule that you specify, for example "viewport is wider than 480 pixels". Media queries are a key part of responsive web design, as they allow you to create different layouts depending on the size of the viewport, but they can also be used to detect other things about the environment your site is running on, for example whether the user is using a touchscreen rather than a mouse. In this lesson you will first learn about the syntax used in media queries, and then move on to use them in a worked example showing how a simple design might be made responsive.
-
Legacy layout methods
-
Grid systems are a very common feature used in CSS layouts, and before CSS Grid Layout they tended to be implemented using floats or other layout features. You imagine your layout as a set number of columns (e.g. 4, 6, or 12), and then fit your content columns inside these imaginary columns. In this article we'll explore how these older methods work, in order that you understand how they were used if you work on an older project.
-
Supporting older browsers
-
-

In this module we recommend using Flexbox and Grid as the main layout methods for your designs. However there will be visitors to your site who use older browsers, or browsers which do not support the methods you have used. This will always be the case on the web — as new features are developed, different browsers will prioritise different things. This article explains how to use modern web techniques without locking out users of older technology.

-
-
Assessment: Fundamental layout comprehension
-
An assessment to test your knowledge of different layout methods by laying out a webpage.
-
- -

See also

- -
-
Practical positioning examples
-
This article shows how to build some real world examples to illustrate what kinds of things you can do with positioning.
-
diff --git a/files/uk/learn/css/first_steps/how_css_works/index.html b/files/uk/learn/css/first_steps/how_css_works/index.html deleted file mode 100644 index 7a21625871..0000000000 --- a/files/uk/learn/css/first_steps/how_css_works/index.html +++ /dev/null @@ -1,115 +0,0 @@ ---- -title: What is CSS? -slug: Learn/CSS/First_steps/How_CSS_works -translation_of: Learn/CSS/First_steps/How_CSS_works -translation_of_original: Web/Guide/CSS/Getting_started/What_is_CSS -original_slug: Web/Guide/CSS/Getting_started/What_is_CSS ---- -
{{CSSTutorialTOC}}
- -

{{previousPage("/en-US/docs/Web/Guide/CSS/Getting_Started", "Getting started")}} This first section of the CSS Getting Started tutorial briefly explains Cascading Style Sheets (CSS). You'll also create a simple document to use for CSS exercises in subsequent sections.

- -

Інформація: Що таке CSS?

- -

Каскадні таблиці стилів (англ. - Cascading Style Sheets  CSS) - мова, що визначає як вміст сторінки буде візуально офрмлений та представлений користувачам. Складові документу ж описують мовою розмітки, на зразок HTML.

- -

Документ являє собою інформацію, структуровану для подання з використанням мови розмітки.

- -

Presenting a document to a user means converting it into a usable form for your audience. Browsers, like Firefox, Chrome or Internet Explorer, are designed to present documents visually, for example, on a computer screen, projector or printer.

- -
-

Приклади

- - -
- -

In this tutorial, boxes captioned Детальніше like the one below contain optional information and links to more resources on a concept or topic covered in a section. Read them as you see them, follow the links, or skip these boxes and return to read them later.

- -
-
Детальніше
- -

Документ- це не те ж саме, що і файл. Втім, ти можеш зберегти документ у файлі.

- -

Документ, який ти зараз читаєш не збережений окремим файлом. Коли твій веб-браузер переходить на цю сторінку, сервер робить запит до бази данних та генерує документ, зібравши частини документу з різних фалів. Однак, в цьому уроці ти будеш працювати також і з  документами, збереженими у файлах.

- -

Більше інформації про документи та мови розміток ти можеш знайти в фнших розділах цього веб-сайту:

- - - - - - - - - - - - - - - - - - - - -
HTMLдля веб-сторінок
XMLдля структурованих документів в загальному
SVGдля графіки
XULдля інтерфейсів користувачів у браузері Mozilla
- -

У другій частині ціього навчального посібника ти знайдеш приклади цих мов розміток.

-
- -
-
Детальніше
- -

In formal CSS terminology, the program that presents a document to a user is called a user agent (UA). A browser is just one kind of UA. CSS is not just for browsers or visual presentation, but for Part I of this tutorial, you'll only work with CSS in a browser.

- -

For formal definitions of terminology relating to CSS, see Definitions in the CSS Specification from the World Wide Web Consortium (W3C), an international community that sets open standards for the web.

-
- -

До роботи: Створення документу

- -
    -
  1. Створи нову паку на своєму комп'ютері для того, щоб зберігати та упорядковувати вправи з наших уроків.
  2. -
  3. Open your text editor and create a new text file. This file will contain the document for the next few tutorial exercises.
  4. -
  5. Copy and paste the HTML shown below. Save the file using the name doc1.html -
    <!DOCTYPE html>
    -<html>
    -  <head>
    -  <meta charset="UTF-8">
    -  <title>Sample document</title>
    -  </head>
    -
    -  <body>
    -    <p>
    -      <strong>C</strong>ascading
    -      <strong>S</strong>tyle
    -      <strong>S</strong>heets
    -    </p>
    -  </body>
    -</html>
    - -

    {{ LiveSampleLink('Action_Creating_a_document', 'View above Demo') }}

    -
  6. -
  7. Open a new tab or a new window in your browser, then open the file you just created. -

    You should see the text with the initial letters bold, like this:

    - - - - - - - -
    Cascading Style Sheets
    - -

    What you see in your browser might not look exactly the same because of settings in your browser and in this wiki. Some differences in the font, spacing and colors are not important.

    -
  8. -
- -

Що далі?

- -

{{nextPage("/en-US/docs/Web/Guide/CSS/Getting_Started/Why_use_CSS", "Why use CSS?")}}Your document does not yet use CSS. In the next section you'll use CSS to style your document.

diff --git a/files/uk/learn/css/first_steps/index.html b/files/uk/learn/css/first_steps/index.html deleted file mode 100644 index 30aa7f0214..0000000000 --- a/files/uk/learn/css/first_steps/index.html +++ /dev/null @@ -1,53 +0,0 @@ ---- -title: Перші кроки у CSS -slug: Learn/CSS/First_steps -tags: - - CSS - - Модулі - - Навчання - - Перші кроки - - Посадка - - Початок -translation_of: Learn/CSS/First_steps ---- -
{{LearnSidebar}}
- -

CSS (Cascading Style Sheets) використовується для стилювання та розміщення веб-сторінок - наприклад, для зміни шрифту, кольору, розміру та інтервалу вашого вмісту, розділення його на кілька стовпців або додавання анімації та інших декоративних функцій. Цей модуль забезпечує легкий початок вашого шляху до оволодіння CSS основами того, як він працює, як виглядає синтаксис і як ви можете почати використовувати його для додавання стилю до HTML.

- -

Передумови

- -

Перш ніж запустити цей модуль, ви повинні мати:

- -
    -
  1. Основне ознайомлення з використанням комп'ютерів та пасивним використанням Інтернету (тобто перегляд його, споживання вмісту.)
  2. -
  3. Основне робоче середовище, створене, як детально описано в Встановлення базового програмного забезпечення, і розуміння того, як створювати файли та керувати ними, як детально описано у розділі «Робота з файлами».
    - Основне ознайомлення з HTML, як обговорювалося в модулі Вступ до HTML .
  4. -
- -
-

Примітка. Якщо ви працюєте на комп'ютері / планшеті / іншому пристрої, де у вас немає можливості створювати власні файли, ви можете спробувати (більшість) прикладів коду в онлайн-програмі кодування, наприклад JSBin або Thimble.

-
- -

Посібники

- -

Цей модуль містить наступні статті, які допоможуть вам ознайомитись з усією базовою теорією CSS та нададуть вам можливість перевірити деякі навички.

- -
-
Що таке CSS?
-
{{Glossary("CSS")}} (Каскадні таблиці стилів) дозволяє створювати чудові веб-сторінки, але як це працює під кришкою? Ця стаття пояснює, що таке CSS, на прикладі простого синтаксису, а також висвітлює деякі ключові терміни про мову.
-
Початок роботи з CSS
-
У цій статті ми візьмемо простий HTML-документ і застосуємо до нього CSS, вивчивши деякі практичні речі щодо мови.
-
Яка структура CSS
-
Тепер, коли ви маєте уявлення про те, що таке CSS та основи його використання, саме час трохи заглибитись у структуру самої мови. Ми вже зустріли багато обговорених тут концепцій; ви можете повернутися до цього, щоб скласти резюме, якщо ви знайдете якісь пізніші поняття заплутані.
-
Як працює CSS
-
Ми вивчили основи CSS, для чого він потрібен та як писати прості таблиці стилів. У цьому уроці ми розглянемо, як браузер приймає CSS та HTML і перетворює їх у веб-сторінку.
-
Використовуючи свої нові знання
-
З того, що ви вивчили на останніх кількох уроках, ви повинні виявити, що ви можете форматувати прості текстові документи за допомогою CSS, щоб додати до них свій власний стиль. Ця стаття дає вам шанс це зробити.
-
- -

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

- -
-
Проміжна веб-грамотність 1: Вступ до CSS
-
Чудовий курс від Mozilla foundation, який вивчає та перевіряє багато навичок, про які говорилося в модулі «Вступ до CSS». Дізнайтеся про стилізацію HTML-елементів на веб-сторінці, селекторах CSS, атрибутах та значеннях.
-
diff --git a/files/uk/learn/css/first_steps/what_is_css/index.html b/files/uk/learn/css/first_steps/what_is_css/index.html deleted file mode 100644 index 18a74a4f44..0000000000 --- a/files/uk/learn/css/first_steps/what_is_css/index.html +++ /dev/null @@ -1,130 +0,0 @@ ---- -title: Що таке CSS? -slug: Learn/CSS/First_steps/What_is_CSS -tags: - - CSS - - Вступ до CSS - - Модулі - - Навчання - - Синтаксис - - Специфікація - - новачок -translation_of: Learn/CSS/First_steps/What_is_CSS -original_slug: Learn/CSS/First_steps/Що_таке_CSS ---- -
{{LearnSidebar}}
- -
{{NextMenu("Learn/CSS/First_steps/Getting_started", "Learn/CSS/First_steps")}}
- -

{{Glossary("CSS")}} (Каскадні таблиці стилів) дозволяє створювати чудові веб-сторінки, але як це працює під кришкою? Ця стаття пояснює, що таке CSS, на прикладі простого синтаксису, а також висвітлює деякі ключові терміни про мову.

- - - - - - - - - - - - -
Передумови:Основна комп'ютерна грамотність, встановлено базове програмне забезпечення, основні знання про робота з файлами, та HTML базовий (вивчыть Вступ до HTML)
-

Мета:

- - -
To learn what CSS is.
- -

У вступі до модуля HTML ми розглянули, що таке HTML, і як він використовується для розмітки документів. Ці документи можна прочитати у веб-браузері. Заголовки виглядатимуть більше, ніж звичайний текст, абзаци перериваються на новий рядок і мають пробіл між ними. Посилання кольорові та підкреслені, щоб відрізняти їх від решти тексту. Що ви бачите, це стилі браузера за замовчуванням - дуже основні стилі, які браузер застосовує до HTML, щоб переконатися, що він буде в основному читабельним, навіть якщо автор сторінки не вказав явного стилю.

- -

The default styles used by a browser

- -

Однак Інтернет був би нудним місцем, якби всі веб-сайти виглядали так. За допомогою CSS ви можете точно контролювати, як виглядають елементи HTML у браузері, представляючи свою розмітку, використовуючи будь-який дизайн, який вам подобається.

- -

Для чого CSS?

- -

Як ми вже згадували раніше, CSS - це мова, яка визначає, як документи подаються користувачам - як вони оформляються, викладаються тощо.A document is usually a text file structured using a markup language — {{Glossary("HTML")}} is the most common markup language, but you may also come across other markup languages such as {{Glossary("SVG")}} or {{Glossary("XML")}}.

- -

Подання документа користувачеві означає перетворення його в форму, яку можна використовувати вашій аудиторії. {{Глосарій ("браузер", "Браузери")}}, як {{Глосарій ("Mozilla Firefox", "Firefox")}}, {{Глосарій ("Google Chrome", "Chrome")}} або { {Глосарій ("Microsoft Edge", "Edge")}} призначений для візуального представлення документів, наприклад, на екрані комп'ютера, проекторі чи принтері.

- -
-

Примітка: Іноді браузер називається {{Glossary ("Агент користувача", "Агент користувача")}}, що в основному означає комп'ютерну програму, яка представляє людину всередині комп'ютерної системи. Браузери - це основний тип агента користувача, про який ми думаємо, коли говоримо про CSS, однак, це не єдиний. Доступні й інші користувацькі агенти - такі, які перетворюють документи HTML та CSS у PDF-файли для друку.

-
- -

CSS можна використовувати для дуже базового стилю тексту документа - наприклад, для зміни кольору та розміру заголовків та посилань. Його можна використовувати для створення макета - наприклад, перетворення одного стовпця тексту в макет з основною областю вмісту та бічною панеллю для пов'язаної інформації. Його навіть можна використовувати для таких ефектів, як анімація. Перегляньте посилання в цьому пункті для конкретних прикладів.

- -

Синтаксис CSS

- -

CSS є мовою на основі правил - ви визначаєте правила, що визначають групи стилів, які слід застосовувати до певних елементів або груп елементів на вашій веб-сторінці. Наприклад, "Я хочу, щоб основний заголовок на моїй сторінці відображався як великий червоний текст".

- -

У наведеному нижче коді показано дуже просте правило CSS, яке дозволило б досягти описаного вище стилю:

- -
h1 {
-    color: red;
-    font-size: 5em;
-}
- -

Правило відкривається за допомогою {{Глосарій ("CSS Selector", "Selector")}}. Це вибирає HTML-елемент, який ми будемо стилювати. У цьому випадку ми створюємо заголовки рівня першого рівня ({{htmlelement ("h1")}}).

- -

Потім у нас є набір фігурних брекетів { }. Всередині буде одна чи кілька декларацій, які мають форму властивостей і значень пар. Кожна пара визначає властивість елемента (-ів), який ми вибираємо, а потім значення, яке ми хотіли б надати властивості.

- -

Перед двокрапкою ми маємо властивість, а після двокрапки - значення. CSS {{Глосарій ("властивість / CSS", "властивості")}} мають різні допустимі значення, залежно від того, яке властивість задано. У нашому прикладі ми маємо властивість кольору, яка може приймати різні значення кольорів. У нас також є  font-size влыстивість. Ця властивість може приймати різні розмір одиниць.

- -

Таблиця стилів CSS міститиме багато таких правил, написаних один за одним.

- -
h1 {
-    color: red;
-    font-size: 5em;
-}
-
-p {
-    color: black;
-}
- -

Ви побачите, що швидко засвоюєте деякі значення, тоді як інші вам потрібно буде шукати. Окремі сторінки властивостей на MDN дають вам швидкий спосіб пошуку властивостей та їх значень, коли ви забудете, або хочете знати, що ще можна використовувати як значення.

- -
-

Примітка: Ви можете знайти посилання на всі сторінки властивостей CSS (разом з іншими функціями CSS), перелічені в розділі MDN CSS reference. Крім того, вам слід звикнути до пошуку "mdn css-feature-name" у своїй улюбленій пошуковій системі, коли вам потрібно дізнатися більше інформації про функцію CSS. Наприклад, спробуйте шукати "mdn color" і "mdn font-size"!

-
- -

CSS Модулі

- -

Оскільки існує так багато речей, які можна стилювати за допомогою CSS, мова розбивається на модулі. Ви побачите посилання на ці модулі під час вивчення MDN та багато сторінок документації, організованих навколо певного модуля. Наприклад, ви можете ознайомитися з посиланням на MDN на модуль "Фони та межі", щоб дізнатися, яке його призначення, а також які різні властивості та інші особливості він містить. Ви також знайдете посилання на специфікацію CSS, яка визначає технологію (див. Нижче).

- -

На цьому етапі вам не потрібно занадто хвилюватися про структурування CSS, однак це може полегшити пошук інформації, якщо, наприклад, ви знаєте, що певне властивість, можливо, знайдеться серед інших подібних речей і є тому, ймовірно, в тій же специфікації.

- -

Для конкретного прикладу повернемося до модуля «Фони та межі» - ви можете подумати, що це має логічний сенс для background-color та border-color властивості, що визначаються в цьому модулі. І ти будеш прав.

- -

CSS специфікація

- -

Усі технології веб-стандартів (HTML, CSS, JavaScript тощо) визначені в гігантських документах, що називаються специфікаціями (або просто "специфікаціями"), які публікуються організаціями зі стандартів (наприклад, {{глосарій ("W3C")}}, {{глосарій ("WHATWG")}}, {{глосарій ("ECMA")}} або {{глосарій ("Хронос")}}) і точно визначте, як повинні поводитися ці технології.

- -

CSS не відрізняється - він розроблений групою в межах W3C під назвою CSS Робоча група. Ця група складається з представників постачальників браузерів та інших компаній, які мають інтерес до CSS. Є й інші люди, відомі як запрошені експерти, які виступають незалежними голосами; вони не пов'язані з організацією-членом.

- -

Робоча група CSS розробляє або уточнює нові функції CSS. Іноді тому, що конкретний браузер зацікавлений у певних можливостях, інший раз через те, що веб-дизайнери та розробники просять про функцію, а іноді тому, що сама Робоча група визначила вимогу. CSS постійно розвивається, доступні нові функції. Однак, головне в CSS - це те, що всі дуже наполегливо працюють, щоб ніколи не змінювати речі таким чином, щоб зламати старі веб-сайти. Веб-сайт, побудований у 2000 році, використовуючи доступний тоді обмежений CSS, і сьогодні повинен використовуватись у веб-переглядачі!

- -

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

- -

Підтримка браузера

- -

Після того, як CSS буде визначено, він може бути корисним для нас лише при розробці веб-сторінок, якщо один або кілька браузерів реалізували його. Це означає, що код написаний, щоб перетворити інструкцію з нашого CSS-файлу на щось, що може бути виведене на екран. Ми розглянемо цей процес докладніше на уроці Як працює CSS. Всі браузери незвично одночасно реалізовувати функцію, тому зазвичай існує розрив, де можна використовувати частину CSS в деяких браузерах, а не в інших. З цієї причини корисність перевірити стан реалізації. На кожній сторінці властивостей на MDN ви можете побачити статус об’єкта, який вас цікавить, тож ви можете сказати, чи зможете ви ним користуватися на веб-сайті.

- -

Далі йде таблиця даних compat для властивості CSS font-family .

- -

{{Compat("css.properties.font-family")}}

- -

Що далі

- -

Тепер, коли ви зрозуміли, що таке CSS, перейдемо до Початок роботи з CSS де ви можете почати самостійно писати деякі CSS.

- -

{{NextMenu("Learn/CSS/First_steps/Getting_started", "Learn/CSS/First_steps")}}

- -

In this module

- -
    -
  1. Що таке CSS?
  2. -
  3. Початок роботи з CSS
  4. -
  5. Як структурується CSS
  6. -
  7. Як працює CSS
  8. -
  9. Використовуйте свої нові знання
  10. -
diff --git a/files/uk/learn/css/index.html b/files/uk/learn/css/index.html deleted file mode 100644 index c4fd0dedfc..0000000000 --- a/files/uk/learn/css/index.html +++ /dev/null @@ -1,68 +0,0 @@ ---- -title: Learn to style HTML using CSS -slug: Learn/CSS -tags: - - Beginner - - CSS - - CodingScripting - - Debugging - - Landing - - NeedsContent - - NeedsTranslation - - Style - - Topic - - TopicStub - - length - - specificity -translation_of: Learn/CSS ---- -
{{LearnSidebar}}
- -

Cascading Stylesheets — або {{glossary("CSS")}} — це перша технологія, яку слід почати вивчати після {{glossary("HTML")}}. Хоча HTML використовується для визначення структури та семантики вашого вмісту, CSS використовується для його стилізації та викладки. Наприклад, ви можете використовувати CSS, щоб змінити шрифт, колір, розмір та інтервал вашого вмісту, розділити його на кілька стовпців або додати анімацію та інші декоративні функції.

- -

Шляхи навчання

- -

Ви повинні вивчити основи HTML, перш ніж спробувати будь-який CSS. Рекомендуємо спочатку опрацювати наш Вступ до модуля HTML. У цьому модулі ви дізнаєтесь про:

- - - -

Після того, як ви зрозумієте основи HTML, рекомендуємо вам вивчити HTML і CSS одночасно, рухаючись вперед і назад між двома темами. Це тому, що HTML набагато цікавіше і набагато цікавіше вчитися, коли ви застосовуєте CSS, і ви не можете навчитися CSS, не знаючи HTML.

- -

Перш ніж розпочати цю тему, ви також повинні ознайомитись з використанням комп’ютерів та пасивним використанням Інтернету (тобто, просто переглянувши його, споживаючи вміст). Ви повинні мати базове робоче середовище, налаштоване як детально
- в Встановлення базового програмного забезпечення та зрозуміти, як створити та керувати файлами, як це детально описано в Робота з файлами — обидва вони є нашими частинами Початок роботи з Інтернетом повний модуль для початківців.

- -

Рекомендується опрацювати Початок роботи з Інтернетом перш ніж перейти до цієї теми. Однак це не зовсім необхідне, оскільки значна частина того, що розглядається в статті про основи CSS, також висвітлено в нашому модулі Вступ до CSS, хоча і набагато детальніше.

- -

Модулі

- -

Ця тема містить наступні модулі в запропонованому порядку для роботи над ними. Ви обов'язково повинні почати з першого.

- -
-
Вступ до CSS
-
Цей модуль розпочинає роботу з основами роботи CSS, включаючи використання селекторів та властивостей; написання правил CSS; застосування CSS до HTML; визначення довжини, кольору та інших одиниць у CSS; контроль каскаду та успадкування; розуміння основ моделі коробки; та налагодження CSS.
-
Стилізація тексту
-
Тут ми розглядаємо основи стилізації тексту, включаючи встановлення шрифту, жирності та курсиву; інтервал між рядками та літерами; і скидання тіней та інших функцій тексту. Ми округляємо модуль, дивлячись на застосування спеціальних шрифтів до вашої сторінки та стилістичні списки та посилання.
-
Стильні коробки
-
Далі ми розглянемо вікна стилізації, один із основних кроків щодо створення веб-сторінки. У цьому модулі ми резюмуємо модель коробки, потім переглядаємо керування макетами коробки, встановлюючи накладки, межі та поля, встановлюючи власні кольори фону, зображення та фантазійні функції, такі як тіні для крапель та фільтри на коробках.
-
CSS макет
-
На даний момент ми вже розглядали основи CSS, як стилювати текст та як стилізувати та маніпулювати полями, у яких розміщений ваш вміст. Тепер прийшов час розглянути, як розташувати вікна в потрібному місці по відношенню до вікна перегляду та один до одного. Ми забезпечили необхідні передумови, тому тепер ми можемо зануритися в глиб CSS-макета, переглядаючи різні налаштування дисплея, сучасні інструменти компонування, такі як flexbox, CSS-сітка та позиціонування, а також деякі застарілі методи, про які ви все ще можете знати.
-
Чуйний дизайн (TBD)
-
Завдяки такій кількості різних типів пристроїв, які сьогодні можуть переглядати Інтернет, чуйний веб-дизайн (RWD) стала основним навиком веб-розробки. Цей модуль буде охоплювати основні принципи та інструменти роботи RWD; поясніть, як застосувати різні CSS до документа залежно від функцій пристрою, таких як ширина екрана, орієнтація та роздільна здатність; та вивчити технології, доступні для обслуговування різних відео та зображень залежно від таких функцій.
-
- -

Вирішення поширених проблем CSS

- -

Використовуйте CSS для вирішення загальних проблем надає посилання на розділи вмісту, що пояснюють, як використовувати CSS для вирішення дуже поширених проблем під час створення веб-сторінки.

- -

Ви спочатку застосовуватимете кольори до елементів HTML та їх фонів; зміни розміру, форми та положення елементів; і додавати та визначати межі елементів. Але не так багато, що ти не зможеш зробити, коли добре зрозумієш навіть основи CSS. Одна з найкращих речей щодо вивчення CSS - це те, що, як тільки ви знаєте основи, зазвичай у вас є гарне відчуття того, що можна, а чого не можна зробити, навіть якщо ви ще не знаєте, як це зробити!

- -

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

- -
-
CSS в MDN
-
Основна точка входу для CSS-документації на MDN, де ви знайдете детальну довідкову документацію щодо всіх функцій мови CSS. Хочете знати всі цінності, які може спричинити властивість? Це гарне місце.
-
diff --git a/files/uk/learn/css/styling_text/index.html b/files/uk/learn/css/styling_text/index.html deleted file mode 100644 index 46c343f406..0000000000 --- a/files/uk/learn/css/styling_text/index.html +++ /dev/null @@ -1,57 +0,0 @@ ---- -title: Стилізація тексту -slug: Learn/CSS/Styling_text -tags: - - Beginner - - CSS - - CodingScripting - - Fonts - - Landing - - Links - - Module - - NeedsTranslation - - Text - - TopicStub - - font - - letter - - line - - lists - - shadow - - web fonts -translation_of: Learn/CSS/Styling_text ---- -
{{LearnSidebar}}
- -

With the basics of the CSS language covered, the next CSS topic for you to concentrate on is styling text — one of the most common things you'll do with CSS. Here we look at text styling fundamentals, including setting font, boldness, italics, line and letter spacing, drop shadows and other text features. We round off the module by looking at applying custom fonts to your page, and styling lists and links.

- -

Prerequisites

- -

Before starting this module, you should already have basic familiarity with HTML, as discussed in the Introduction to HTML module, and be comfortable with CSS fundamentals, as discussed in Introduction to CSS.

- -
-

Note: If you are working on a computer/tablet/other device where you don't have the ability to create your own files, you could try out (most of) the code examples in an online coding program such as JSBin, CodePen or Thimble.

-
- -

Guides

- -

This module contains the following articles, which will teach you all of the essentials behind styling HTML text content.

- -
-
Fundamental text and font styling
-
In this article we go through all the basics of text/font styling in detail, including setting font weight, family and style, font shorthand, text alignment and other effects, and line and letter spacing.
-
Styling lists
-
Lists behave like any other text for the most part, but there are some CSS properties specific to lists that you need to know about, and some best practices to consider. This article explains all.
-
Styling links
-
When styling links, it is important to understand how to make use of pseudo-classes to style link states effectively, and how to style links for use in common varied interface features such as navigation menus and tabs. We'll look at all these topics in this article.
-
Web fonts
-
Here we will explore web fonts in detail — these allow you to download custom fonts along with your web page, to allow for more varied, custom text styling.
-
- -

Assessments

- -

The following assessments will test your understanding of the text styling techniques covered in the guides above.

- -
-
Typesetting a community school homepage
-
In this assessment we'll test your understanding of styling text by getting you to style the text for a community school's homepage.
-
diff --git a/files/uk/learn/css/styling_text/styling_lists/index.html b/files/uk/learn/css/styling_text/styling_lists/index.html deleted file mode 100644 index c47c3888c6..0000000000 --- a/files/uk/learn/css/styling_text/styling_lists/index.html +++ /dev/null @@ -1,395 +0,0 @@ ---- -title: Стилі списків -slug: Learn/CSS/Styling_text/Styling_lists -tags: - - CSS - - Початківець - - Спискі - - Стаття - - Стилі - - Текст -translation_of: Learn/CSS/Styling_text/Styling_lists -original_slug: Learn/CSS/Styling_text/Стилі_списків ---- -
{{LearnSidebar}}
- -
{{PreviousMenuNext("Learn/CSS/Styling_text/Fundamentals", "Learn/CSS/Styling_text/Styling_links", "Learn/CSS/Styling_text")}}
- -

Здебільшого Списки ведуть себе як будь-який інший текст, але є деякі властивості CSS, специфічні для списків, які вам потрібно знати, а також деякі найкращі способи розгляду. Ця стаття пояснює все.

- - - - - - - - - - - - -
Передумови:Основна комп'ютерна грамотність, основи HTML (вивчення Вступу до HTML), основи CSS (вивчення Вступу до CSS), Основи тексту та шрифтів CSS.
Мета:Познайомитися з найкращими практиками та властивостями, пов'язаними зі списками стилів.
- -

Простий приклад списку

- -

Почнемо з того, давайте подивимося на приклад простого списку. У цій статті ми розглянемо списки неупорядкованих, упорядкованих та опису - у всіх є стилістичні функції, схожі на деякі,  що є характерними для їхнього типу списку. Неперевершений приклад доступний на Github ( також перевірте цей код)

- -

Приклад HTML для нашого списку виглядає так:

- -
<h2>Shopping (unordered) list</h2>
-
-<p>Paragraph for reference, paragraph for reference, paragraph for reference,
-paragraph for reference, paragraph for reference, paragraph for reference.</p>
-
-<ul>
-  <li>Humous</li>
-  <li>Pitta</li>
-  <li>Green salad</li>
-  <li>Halloumi</li>
-</ul>
-
-<h2>Recipe (ordered) list</h2>
-
-<p>Paragraph for reference, paragraph for reference, paragraph for reference,
-paragraph for reference, paragraph for reference, paragraph for reference.</p>
-
-<ol>
-  <li>Toast pitta, leave to cool, then slice down the edge.</li>
-  <li>Fry the halloumi in a shallow, non-stick pan, until browned on both sides.</li>
-  <li>Wash and chop the salad.</li>
-  <li>Fill pitta with salad, humous, and fried halloumi.</li>
-</ol>
-
-<h2>Ingredient description list</h2>
-
-<p>Paragraph for reference, paragraph for reference, paragraph for reference,
-paragraph for reference, paragraph for reference, paragraph for reference.</p>
-
-<dl>
-  <dt>Humous</dt>
-  <dd>A thick dip/sauce generally made from chick peas blended with tahini, lemon juice, salt, garlic, and other ingredients.</dd>
-  <dt>Pitta</dt>
-  <dd>A soft, slightly leavened flatbread.</dd>
-  <dt>Halloumi</dt>
-  <dd>A semi-hard, unripened, brined cheese with a higher-than-usual melting point, usually made from goat/sheep milk.</dd>
-  <dt>Green salad</dt>
-  <dd>That green healthy stuff that many of us just use to garnish kebabs.</dd>
-</dl>
- -

Якщо ви зараз перейдете до живого прикладу та вивчіть елементи списку, що використовують інструменти розробника браузера, ви помітите пара стилів по замовчуванням:

- - - -

Обробка списку інтервалів

- -

При складанні списків стилів потрібно настроїти свої стилі, щоб вони мали однакові вертикальні відстані як їх оточуючі елементи (такі як абзаци та зображення, іноді їх називають вертикальним ритмом) і однакові між собою горизонтальні відстані (ви можете побачити  закінчений стиль приклад  в Github, і знайти вихідний код також.)

- -

CSS, який використовується для стилізації тексту та інтервалу, виглядає наступним чином:

- -
/* General styles */
-
-html {
-  font-family: Helvetica, Arial, sans-serif;
-  font-size: 10px;
-}
-
-h2 {
-  font-size: 2rem;
-}
-
-ul,ol,dl,p {
-  font-size: 1.5rem;
-}
-
-li, p {
-  line-height: 1.5;
-}
-
-/* Description list styles */
-
-
-dd, dt {
-  line-height: 1.5;
-}
-
-dt {
-  font-weight: bold;
-}
-
-dd {
-  margin-bottom: 1.5rem;
-}
- - - -

List-specific styles

- -

Now we've looked at general spacing techniques for lists, let's explore some list-specific properties. There are three properties you should know about to start with, which can be set on {{htmlelement("ul")}} or {{htmlelement("ol")}} elements:

- - - -

Bullet styles

- -

As mentioned above, the {{cssxref("list-style-type")}} property allows you to set what type of bullet to use for the bullet points. In our example, we've set the ordered list to use uppercase roman numerals, with:

- -
ol {
-  list-style-type: upper-roman;
-}
- -

Це дає нам такий вигляд:

- -

an ordered list with the bullet points set to appear outside the list item text.

- -

You can find a lot more options by checking out the {{cssxref("list-style-type")}} reference page.

- -

Bullet position

- -

The {{cssxref("list-style-position")}} property sets whether the bullets appear inside the list items, or outside them before the start of each item. The default value is outside, which causes the bullets to sit outside the list items, as seen above.

- -

If you set the value to inside, the bullets will sit inside the lines:

- -
ol {
-  list-style-type: upper-roman;
-  list-style-position: inside;
-}
- -

an ordered list with the bullet points set to appear inside the list item text.

- -

Using a custom bullet image

- -

The {{cssxref("list-style-image")}} property allows you to use a custom image for your bullet. The syntax is pretty simple:

- -
ul {
-  list-style-image: url(star.svg);
-}
- -

However, this property is a bit limited in terms of controlling the position, size, etc. of the bullets. You are better off using the {{cssxref("background")}} family of properties, which you'll learn a lot more about in the Styling boxes module. For now, here's a taster!

- -

In our finished example, we have styled the unordered list like so (on top of what you've already seen above):

- -
ul {
-  padding-left: 2rem;
-  list-style-type: none;
-}
-
-ul li {
-  padding-left: 2rem;
-  background-image: url(star.svg);
-  background-position: 0 0;
-  background-size: 1.6rem 1.6rem;
-  background-repeat: no-repeat;
-}
- -

Here we've done the following:

- - - -

This gives us the following result:

- -

an unordered list with the bullet points set as little star images

- -

list-style shorthand

- -

The three properties mentioned above can all be set using a single shorthand property, {{cssxref("list-style")}}. For example, the following CSS:

- -
ul {
-  list-style-type: square;
-  list-style-image: url(example.png);
-  list-style-position: inside;
-}
- -

Could be replaced by this:

- -
ul {
-  list-style: square url(example.png) inside;
-}
- -

The values can be listed in any order, and you can use one, two or all three (the default values used for the properties that are not included are disc, none, and outside). If both a type and an image are specified, the type is used as a fallback if the image can't be loaded for some reason.

- -

Controlling list counting

- -

Sometimes you might want to count differently on an ordered list — e.g. starting from a number other than 1, or counting backwards, or counting in steps of more than 1. HTML and CSS have some tools to help you here.

- -

start

- -

The {{htmlattrxref("start","ol")}} attribute allows you to start the list counting from a number other than 1. The following example:

- -
<ol start="4">
-  <li>Toast pitta, leave to cool, then slice down the edge.</li>
-  <li>Fry the halloumi in a shallow, non-stick pan, until browned on both sides.</li>
-  <li>Wash and chop the salad.</li>
-  <li>Fill pitta with salad, humous, and fried halloumi.</li>
-</ol>
- -

Gives you this output:

- -

{{ EmbedLiveSample('start', '100%', 150) }}

- -

reversed

- -

The {{htmlattrxref("reversed","ol")}} attribute will start the list counting down instead of up. The following example:

- -
<ol start="4" reversed>
-  <li>Toast pitta, leave to cool, then slice down the edge.</li>
-  <li>Fry the halloumi in a shallow, non-stick pan, until browned on both sides.</li>
-  <li>Wash and chop the salad.</li>
-  <li>Fill pitta with salad, humous, and fried halloumi.</li>
-</ol>
- -

Gives you this output:

- -

{{ EmbedLiveSample('reversed', '100%', 150) }}

- -

value

- -

The {{htmlattrxref("value","ol")}} attribute allows you to set your list items to specific numerical values. The following example:

- -
<ol>
-  <li value="2">Toast pitta, leave to cool, then slice down the edge.</li>
-  <li value="4">Fry the halloumi in a shallow, non-stick pan, until browned on both sides.</li>
-  <li value="6">Wash and chop the salad.</li>
-  <li value="8">Fill pitta with salad, humous, and fried halloumi.</li>
-</ol>
- -

Gives you this output:

- -

{{ EmbedLiveSample('value', '100%', 150) }}

- -
-

Note: Even if you are using a non-number {{cssxref("list-style-type")}}, you still need to use the equivalent numerical values in the value attribute.

-
- -

Active learning: Styling a nested list

- -

In this active learning session, we want you to take what you've learned above and have a go at styling a nested list. We've provided you with the HTML, and we want you to:

- -
    -
  1. Give the unordered list square bullets.
  2. -
  3. Give the unordered list items and the ordered list items a line height of 1.5 of their font-size.
  4. -
  5. Give the ordered list lower alphabetical bullets.
  6. -
  7. Feel free to play with the list example as much as you like, experimenting with bullet types, spacing, or whatever else you can find.
  8. -
- -

If you make a mistake, you can always reset it using the Reset button. If you get really stuck, press the Show solution button to see a potential answer.

- - - -

{{ EmbedLiveSample('Playable_code', 700, 800) }}

- -

See also

- -

CSS counters provide advanced tools for customizing list counting and styling, but they are quite complex. We recommend looking into these if you want to stretch yourself. See:

- - - -

Summary

- -

Lists are relatively easy to get the hang of styling once you know a few associated basic principles and specific properties. In the next article we'll get on to link styling techniques.

- -

{{PreviousMenuNext("Learn/CSS/Styling_text/Fundamentals", "Learn/CSS/Styling_text/Styling_links", "Learn/CSS/Styling_text")}}

- -

 

- -

In this module

- - - -

 

diff --git a/files/uk/learn/forms/index.html b/files/uk/learn/forms/index.html deleted file mode 100644 index 9525484787..0000000000 --- a/files/uk/learn/forms/index.html +++ /dev/null @@ -1,78 +0,0 @@ ---- -title: Веб-форми -slug: Learn/Forms -translation_of: Learn/Forms -original_slug: Learn/HTML/Forms ---- -
{{LearnSidebar}}
- -

Цей модуль містить низку статей, що допоможуть Вам освоїти форми в  HTML. HTML форми  дуже потужний інструмент для взаємодії з користувачами, хоча з історичних та технічних проблем є не завжди очевидним, як повністю використовувати їхній потенціал.  В цьому путівнику ми розкриємо усі аспекти HTML форм, починаючи від структури до стилів, від обробки даних до віджетів користувачів.

- -

Передумови

- -

Перед початком цього модуля Вам необхідно щонайменше пройти Вступ до HTML.

- -
-

Нотатка: Якщо Ви працюєте на компьютері/планшеті/іншому пристрої на якому Ви не маєте можливості створити власні файли, Ви можете спробувати онлайн редактори для написання коду такі як JSBin чи Thimble.

-
- -

Основні інструкції

- -

В наступних посібниках Ви зможете вивчити основи HTML форм і пізніше освоїти дещо складніші теми.

- -

Ваша перша HTML форма

- -

Перша стаття з нашої серії надасть Вам необхідний досвід в створенні HTML  форми, включаючи проектування простої форми, реалізацїю її використовуючи правильні HTML елементи, додавання деяких дуже простих стілів за допомогою CSS  і відправлення даних на сервер.

- -

Як структурувати HTML форму

- -

Спираючись на основи, тепер ми більш детально поглянемо на елементи, які використовуються для забезпечення структури і значення різних частин форми.

- -
-
Рідні віджети форми
-
-
Тепер ми поглянемо на функціональність різних віджетів форм більш детально, розглянувши які налаштування доступні для одержання різних видів інформації.
-
-
Надсилання даних форми
-
В цій статті розглянемо, що відбувається, коли корисувач надсилає форму — куди надходить інформація, і як ми її обробляємо коли вона туди потрапляє? Ми також розглянемо деякі проблеми безпеки, пов'язані з надсиланням даних форми.
-
Підтвердження даних форми
-
Надсилання даних недостатньо — нам також потрібно впевнитися, що дані, надані користувачем у формі, коректні для їх успішної подальшої обробки і вони не нашкодять нашій програмі. Ми також хочемо допомогти нашим користувачам заповнити наші форми правильно і не розчаруватися під час спроби використання наших додатків. Відправлення форми забезпечує виконання поставлених перед нами цілей - ця стання донесе Вам те, що Ви маєте знати.
-
- -

Розширені інструкції

- -

Ці інструкції дозволять поглянути на більш розширені варіанти форм, які Ви знайдете корисними після освоєння основ застосування форм.

- -
-
Як створювати користувацькі віджети форм
-
Ви стикнетесь з випадками, в яких стандартні віджети форм не зможуть забезпечити Вам всього, чого Ви потребуєте через невідповідний стиль чи недостатню функціональність. В таких випадках Вам потрібно буде створити власний віджет форми використовуючи чистий HTML. У цій статті пояснюється як Ви можете зробити це та що потрібно при цьому знати із практичними прикладами.
-
Надсилання форми використовуючи JavaScript
-
Ця стання покаже Вам шляхиThis article looks at ways to use a form to assemble an HTTP request and send it via custom JavaScript, rather than standard form submission. It also looks at why you'd want to do this, and the implications of doing so. (See also Using FormData objects.)
-
HTML forms in legacy browsers
-
Article covering feature detection, etc. This should be redirected to the cross browser testing module, as the same stuff is covered better there.
-
HTML5 form updates
-
This article provides a reference to the new additions we saw added to HTML forms by the HTML5 spec.
-
- -

Form styling guides

- -

These guides to styling forms with CSS really belong in the CSS Learning Area topic, but we are keeping them here for now until we find the time to move them.

- -
-
Styling HTML forms
-
This article provides an introduction to styling forms with CSS, including all the basics you might need to know for basic styling tasks.
-
Advanced styling for HTML forms
-
Here we look at some more advanced form styling techniques that need to be used when trying to deal with some of the more difficult-to-style elements.
-
Property compatibility table for form widgets
-
This last article provides a handy reference allowing you to look up what CSS properties are compatible with what form elements.
-
- -

Assessments

- -

TBD

- -

See also

- - diff --git a/files/uk/learn/forms/your_first_form/index.html b/files/uk/learn/forms/your_first_form/index.html deleted file mode 100644 index e5be790eff..0000000000 --- a/files/uk/learn/forms/your_first_form/index.html +++ /dev/null @@ -1,299 +0,0 @@ ---- -title: Your first form -slug: Learn/Forms/Your_first_form -translation_of: Learn/Forms/Your_first_form -original_slug: Learn/HTML/Forms/Your_first_form ---- -
{{LearnSidebar}}{{NextMenu("Learn/Forms/How_to_structure_a_web_form", "Learn/Forms")}}
- -

Першa стаття в нашій серії допоможе вам у створенні власної першої інтернет-форми, включаючи розробку простої форми, реалізуючи її за допомогою використання елементів керування формою в HTML і інших HTML елементів, добавляючи деякі дуже прості стилі в CSS, і обписуючи як дані надсилаються на сервер. В цьому модулі ми розгорнемо кожну з вищенаведених тем.

- - - - - - - - - - - - -
Вимоги:Загальна комп'ютерна грамотність, і базове розуміння HTML.
Мета:Зрозуміти, що таке інтернет-форми, для чого вони використовується, як обдумувати їхнє оформлення, і основні HTML елементи, які потрібні в нескладних випадках
- -

Що таке інтернет-форми?

- -

Web forms are one of the main points of interaction between a user and a web site or application. Forms allow users to enter data, which is generally sent to a web server for processing and storage (see Sending form data later in the module), or used on the client-side to immediately update the interface in some way (for example, add another item to a list, or show or hide a UI feature).

- -

A web form's HTML is made up of one or more form controls (sometimes called widgets), plus some additional elements to help structure the overall form — they are often referred to as HTML forms. The controls can be single or multi-line text fields, dropdown boxes, buttons, checkboxes, or radio buttons, and are mostly created using the {{htmlelement("input")}} element, although there are some other elements to learn about too.

- -

Form controls can also be programmed to enforce specific formats or values to be entered (form validation), and paired with text labels that describe their purpose to both sighted and blind users.

- -

Designing your form

- -

Before starting to code, it's always better to step back and take the time to think about your form. Designing a quick mockup will help you to define the right set of data you want to ask your user to enter. From a user experience (UX) point of view, it's important to remember that the bigger your form, the more you risk frustrating people and losing users. Keep it simple and stay focused: ask only for the data you absolutely need.

- -

Designing forms is an important step when you are building a site or application. It's beyond the scope of this article to cover the user experience of forms, but if you want to dig into that topic you should read the following articles:

- - - -

In this article, we'll build a simple contact form. Let's make a rough sketch.

- -

The form to build, roughly sketch

- -

Our form will contain three text fields and one button. We are asking the user for their name, their e-mail and the message they want to send. Hitting the button will send their data to a web server.

- -

Active learning: Implementing our form HTML

- -

Ok, let's have a go at creating the HTML for our form. We will use the following HTML elements: {{HTMLelement("form")}}, {{HTMLelement("label")}}, {{HTMLelement("input")}}, {{HTMLelement("textarea")}}, and {{HTMLelement("button")}}.

- -

Before you go any further, make a local copy of our simple HTML template — you'll enter your form HTML into here.

- -

The {{HTMLelement("form")}} element

- -

All forms start with a {{HTMLelement("form")}} element, like this:

- -
<form action="/my-handling-form-page" method="post">
-
-</form>
- -

This element formally defines a form. It's a container element like a {{HTMLelement("section")}} or {{HTMLelement("footer")}} element, but specifically for containing forms; it also supports some specific attributes to configure the way the form behaves. All of its attributes are optional, but it's standard practice to always set at least the action and method attributes:

- - - -
-

Note: We'll look at how those attributes work in our Sending form data article later on.

-
- -

For now, add the above {{htmlelement("form")}} element into your HTML {{htmlelement("body")}}.

- -

The {{HTMLelement("label")}}, {{HTMLelement("input")}}, and {{HTMLelement("textarea")}} elements

- -

Our contact form is not complex: the data entry portion contains three text fields, each with a corresponding {{HTMLelement("label")}}:

- - - -

In terms of HTML code we need something like the following to implement these form widgets:

- -
<form action="/my-handling-form-page" method="post">
- <ul>
-  <li>
-    <label for="name">Name:</label>
-    <input type="text" id="name" name="user_name">
-  </li>
-  <li>
-    <label for="mail">E-mail:</label>
-    <input type="email" id="mail" name="user_mail">
-  </li>
-  <li>
-    <label for="msg">Message:</label>
-    <textarea id="msg" name="user_message"></textarea>
-  </li>
- </ul>
-</form>
- -

Update your form code to look like the above.

- -

The {{HTMLelement("li")}} elements are there to conveniently structure our code and make styling easier (see later in the article). For usability and accessibility, we include an explicit label for each form control. Note the use of the for attribute on all {{HTMLelement("label")}} elements, which takes as its value the id of the form control with which it is associated — this is how you associate a form with its label.

- -

There is great benefit to doing this — it associates the label with the form control, enabling mouse, trackpad, and touch device users to click on the label to activate the corresponding control, and it also provides an accessible name for screen readers to read out to their users. You'll find further details of form labels in How to structure a web form.

- -

On the {{HTMLelement("input")}} element, the most important attribute is the type attribute. This attribute is extremely important because it defines the way the {{HTMLelement("input")}} element appears and behaves. You'll find more about this in the Basic native form controls article later on.

- - - -

Last but not least, note the syntax of <input> vs. <textarea></textarea>. This is one of the oddities of HTML. The <input> tag is an empty element, meaning that it doesn't need a closing tag. {{HTMLElement("textarea")}} is not an empty element, meaning it should be closed it with the proper ending tag. This has an impact on a specific feature of forms: the way you define the default value. To define the default value of an {{HTMLElement("input")}} element you have to use the value attribute like this:

- -
<input type="text" value="by default this element is filled with this text">
- -

On the other hand,  if you want to define a default value for a {{HTMLElement("textarea")}}, you put it between the opening and closing tags of the {{HTMLElement("textarea")}} element, like this:

- -
<textarea>
-by default this element is filled with this text
-</textarea>
- -

The {{HTMLelement("button")}} element

- -

The markup for our form is almost complete; we just need to add a button to allow the user to send, or "submit", their data once they have filled out the form. This is done by using the {{HTMLelement("button")}} element; add the following just above the closing </form> tag:

- -
<li class="button">
-  <button type="submit">Send your message</button>
-</li>
- -

The {{htmlelement("button")}} element also accepts a type attribute — this accepts one of three values: submit, reset, or button.

- - - -
-

Note: You can also use the {{HTMLElement("input")}} element with the corresponding type to produce a button, for example <input type="submit">. The main advantage of the {{HTMLelement("button")}} element is that the {{HTMLelement("input")}} element only allows plain text in its label whereas the {{HTMLelement("button")}} element allows full HTML content, allowing more complex, creative button content.

-
- -

Basic form styling

- -

Now that you have finished writing your form's HTML code, try saving it and looking at it in a browser. At the moment, you'll see that it looks rather ugly.

- -
-

Note: If you don't think you've got the HTML code right, try comparing it with our finished example — see first-form.html (also see it live).

-
- -

Forms are notoriously tricky to style nicely. It is beyond the scope of this article to teach you form styling in detail, so for the moment we will just get you to add some CSS to make it look OK.

- -

First of all, add a {{htmlelement("style")}} element to your page, inside your HTML head. It should look like so:

- -
<style>
-
-</style>
- -

Inside the style tags, add the following CSS:

- -
form {
-  /* Center the form on the page */
-  margin: 0 auto;
-  width: 400px;
-  /* Form outline */
-  padding: 1em;
-  border: 1px solid #CCC;
-  border-radius: 1em;
-}
-
-ul {
-  list-style: none;
-  padding: 0;
-  margin: 0;
-}
-
-form li + li {
-  margin-top: 1em;
-}
-
-label {
-  /* Uniform size & alignment */
-  display: inline-block;
-  width: 90px;
-  text-align: right;
-}
-
-input,
-textarea {
-  /* To make sure that all text fields have the same font settings
-     By default, textareas have a monospace font */
-  font: 1em sans-serif;
-
-  /* Uniform text field size */
-  width: 300px;
-  box-sizing: border-box;
-
-  /* Match form field borders */
-  border: 1px solid #999;
-}
-
-input:focus,
-textarea:focus {
-  /* Additional highlight for focused elements */
-  border-color: #000;
-}
-
-textarea {
-  /* Align multiline text fields with their labels */
-  vertical-align: top;
-
-  /* Provide space to type some text */
-  height: 5em;
-}
-
-.button {
-  /* Align buttons with the text fields */
-  padding-left: 90px; /* same size as the label elements */
-}
-
-button {
-  /* This extra margin represent roughly the same space as the space
-     between the labels and their text fields */
-  margin-left: .5em;
-}
- -

Save and reload, and you'll see that your form should look much less ugly.

- -
-

Note: You can find our version on GitHub at first-form-styled.html (also see it live).

-
- -

Sending form data to your web server

- -

The last part, and perhaps the trickiest, is to handle form data on the server side. The {{HTMLelement("form")}} element defines where and how to send the data thanks to the action and method attributes.

- -

We provide a name to each form control. The names are important on both the client- and server-side; they tell the browser which name to give each piece of data and, on the server side, they let the server handle each piece of data by name. The form data is sent to the server as name/value pairs.

- -

To name the data in a form you need to use the name attribute on each form widget that will collect a specific piece of data. Let's look at some of our form code again:

- -
<form action="/my-handling-form-page" method="post">
- <ul>
-  <li>
-    <label for="name">Name:</label>
-    <input type="text" id="name" name="user_name" />
-  </li>
-  <li>
-    <label for="mail">E-mail:</label>
-    <input type="email" id="mail" name="user_email" />
-  </li>
-  <li>
-    <label for="msg">Message:</label>
-    <textarea id="msg" name="user_message"></textarea>
-  </li>
-
-  ...
-
- -

In our example, the form will send 3 pieces of data named "user_name", "user_email", and "user_message". That data will be sent to the URL "/my-handling-form-page" using the HTTP POST method.

- -

On the server side, the script at the URL "/my-handling-form-page" will receive the data as a list of 3 key/value items contained in the HTTP request. The way this script will handle that data is up to you. Each server-side language (PHP, Python, Ruby, Java, C#, etc.) has its own mechanism of handling form data. It's beyond the scope of this guide to go deeply into that subject, but if you want to know more, we have provided some examples in our Sending form data article later on.

- -

Summary

- -

Congratulations, you've built your first web form. It looks like this live:

- -

{{ EmbedLiveSample('A_simple_form', '100%', '240', '', 'Learn/Forms/Your_first_form/Example') }}

- -

That's only the beginning, however — now it's time to take a deeper look. Forms have way more power than what we saw here and the other articles in this module will help you to master the rest.

- -

{{NextMenu("Learn/Forms/How_to_structure_a_web_form", "Learn/Forms")}}

- -

In this module

- - - -

Advanced Topics

- - diff --git a/files/uk/learn/front-end_web_developer/index.html b/files/uk/learn/front-end_web_developer/index.html deleted file mode 100644 index 599f33b249..0000000000 --- a/files/uk/learn/front-end_web_developer/index.html +++ /dev/null @@ -1,203 +0,0 @@ ---- -title: Фронтенд веб-розробник -slug: Learn/Front-end_web_developer -tags: - - CSS - - Front-end - - HTML - - JavaScript - - Web Standarts - - Інструментарій - - Навчання - - Початківець - - Стандарти - - Фронт-енд - - Фронтенд - - інструменти -translation_of: Learn/Front-end_web_developer -original_slug: Learn/Фронт-енд_веб-розробник ---- -

{{learnsidebar}}

- -

Ласкаво просимо до нашого навчального шляху веб-розробника!

- -

Ми представяємо вам структурований курс, який навчить вас усьому, що вам потрібно знати, аби стати передовим веб-розробником. Просто працюйте над кожним розділом, опановуючи нові або вдосконалюючи існуючі навички, рухаючись далі. Кожен розділ містить практичні завдання та оцінювання, щоб перевірити своє розуміння, перш ніж рухатися вперед.

- -

Охоплена тематика

- -

Досліджувані теми:

- - - -

Ви можете працювати з розділами по порядку, проте кожен з них також є самостійним. Наприклад, якщо ви вже знаєте HTML, ви можете перейти до розділу CSS.

- -

Передумови

- -

Щоб почати цей курс, вам не потрібні попередні знання. Все, що вам потрібно, це комп’ютер, що може працювати із сучасними веб-браузерами, підключення до Інтернету та готовність вчитися.

- -

Якщо ви не впевнені, що фронтенд веб-розробка вам підходить та/чи ви хочете більш поступове ознайомлення перед початком довгого та повного курсу, спершу опрацюйте наш модуль Початок роботи з Інтернетом.

- -

Отримання допомоги

- -

Ми намагалися зробити навчання фронт-енд веб-розробці якомога комфортним, але ви, ймовірно, все ж таки десь застрягнете, тому що чогось не розумієте або якийсь код просто не працює.

- -

Не панікуйте. Ми всі застрягаємо, не зважаючи на те - ми початківці чи ми професійні веб-розробники. Стаття Навчання та отримання допомоги пропонує вам низку порад щодо пошуку інформації та надання допомоги самому собі. Якщо ви все ще не зрушили з мертвої точки, сміливо розміщуйте питання на нашому Дискурсному форумі.

- -

Нумо починати. Щасти!

- -

Шлях навчання

- -

Початок

- -

Час на виконання: 1,5–2 години

- -

Передумови

- -

Нічого, крім базової комп'ютерної грамотності.

- -

Як мені дізнатися, що я можу рухатися далі?

- -

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

- -

Посібники

- - - -

Семантика та структура за допомогою HTML

- -

Час на виконання: 35–50 годин

- -

Передумови

- -

Нічого, крім базової комп'ютерної грамотності та базового середовища для веб-розробки.

- -

Як мені дізнатися, що я можу рухатися далі?

- -

Оцінювання в кожному модулі розроблено для перевірки вашого знання теми. Вдалий результат оцінювання підтверджує, що ви готові перейти до наступного модуля.

- -

Модулі

- - - -

Стилізація та розмітка за допомогою CSS

- -

Час на виконання: 90–120 гоодин

- -

Передумови

- -

Перед початком вивчення CSS рекомендується мати базові знання з HTML. Спершу слід вивчити Вступ до HTML.

- -

Як мені дізнатися, що я можу рухатися далі?

- -

Оцінювання в кожному модулі розроблено для перевірки вашого знання теми. Вдалий результат оцінювання підтверджує, що ви готові перейти до наступного модуля.

- -

Модулі

- - - -

Додаткові ресурси

- - - -

Інтерактивність за допомогою JavaScript

- -

Час на виконання: 135–185 годин

- -

Передумови

- -

Перед початком вивчення JavaScript рекомендується мати базові знання з HTML. Спершу слід вивчити Вступ до HTML.

- -

Як мені дізнатися, що я можу рухатися далі?

- -

Оцінювання в кожному модулі розроблено для перевірки вашого знання теми. Вдалий результат оцінювання підтверджує, що ви готові перейти до наступного модуля.

- -

Модулі

- - - -

Веб-форми — Робота з даними користувача

- -

Час на виконання: 40–50 годин

- -

Передумови

- -

Вивчення форм вимагає знання з HTML, CSS та JavaScript. Враховуючи складність роботи з формами, це спеціальна тема.

- -

Як мені дізнатися, що я можу рухатися далі?

- -

Оцінювання в кожному модулі розроблено для перевірки вашого знання теми. Вдалий результат оцінювання підтверджує, що ви готові перейти до наступного модуля.

- -

Модулі

- - - -

Роблячи Інтернет доступним для кожного

- -

Час на виконання: 60–75 годин

- -

Передумови

- -

Перед роботою з цим розділом було б незайвим знати HTML, CSS та JavaScript. Багато методів та найкращих практик стосуються декількох технологій.

- -

Як мені дізнатися, що я можу рухатися далі?

- -

Оцінювання в кожному модулі розроблено для перевірки вашого знання теми. Вдалий результат оцінювання підтверджує, що ви готові перейти до наступного модуля.

- -

Модулі

- - - -

Сучасний інструментарій

- -

Час на виконання: 55–90 годин

- -

Передумови

- -

Перед роботою з цим розділом було б незайвим знати HTML, CSS та JavaScript, оскільки інструменти, що тут обговорюються, працюють вкупі із багатьма з цих технологій.

- -

Як мені дізнатися, що я можу рухатися далі?

- -

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

- -

Модулі

- - diff --git a/files/uk/learn/getting_started_with_the_web/css_basics/index.html b/files/uk/learn/getting_started_with_the_web/css_basics/index.html deleted file mode 100644 index 61069ad322..0000000000 --- a/files/uk/learn/getting_started_with_the_web/css_basics/index.html +++ /dev/null @@ -1,273 +0,0 @@ ---- -title: Основи CSS -slug: Learn/Getting_started_with_the_web/CSS_basics -tags: - - CSS - - Веб - - Навчання - - Початківцям - - Стилізація -translation_of: Learn/Getting_started_with_the_web/CSS_basics ---- -
{{LearnSidebar}}
- -
{{PreviousMenuNext("Learn/Getting_started_with_the_web/HTML_basics", "Learn/Getting_started_with_the_web/JavaScript_basics", "Learn/Getting_started_with_the_web")}}
- -
-

Cascading Stylesheets (CSS, каскадні таблиці стилів) — це код, що використовується для стилізації сайту. В Основах CSS надається інформація про стилізацію для початківців. Ми відповімо на такі питання: яким чином зробити текст чорним або червоним? Як розмістити контент саме у тому місці, де ми хочемо його бачити на сторінці? Як задавати фонові кольори та зображення?

-
- -

Що таке CSS насправді?

- -

Як і HTML, CSS не є справжньою мовою програмування. Це лише мова таблиць стилів, яка дозволяє задавати стилі обраним елементам у HTML документах. Наприклад, для того, щоб вибрати усі параграфи на HTML сторінці та зробити колір їхнього тексту червоним, потрібно написати такий CSS:

- -
p {
-  color: red;
-}
- -

Давайте спробуємо: вставте ці три рядки CSS у новий файл у вашому редакторі коду, та збережіть файл як style.css у вашій теці styles.

- -

Окрім того, нам необхідно приєднати CSS до вашого HTML документу, інакше стилі CSS не вплинуть на те, як браузер відобразить HTML документ. (Якщо ви щойно приєдналися до нашого проекту, прочитайте Роботу з файлами та Основи HTML щоб дізнатися, що необхідно зробити на початку.) Відкрийте ваш файл index.html та вставте наступний рядок кудись у head, між тегами <head> і </head>:

- -
    -
  1. -
    <link href="styles/style.css" rel="stylesheet" type="text/css">
    -
  2. -
  3. Збережіть index.html та відкрийте його у вашому браузері. Ви побачите щось на зразок наведеного зображення:
  4. -
- -

A mozilla logo and some paragraphs. The paragraph text has been styled red by our css.Якщо текст ваших параграфів став червоним, вітаємо! Ви щойно написали ваш перший CSS!

- -

Анатомія правила CSS

- -

Подивимось на попередній CSS більш детально:

- -

- -

Вся структура називається "rule set" — "набір правил" (частіше, скорочено, "правило"). Його частини також мають свої назви:

- -
-
Selector — Селектор
-
Назва елементу HTML на початку правила. Селектор вибирає елемент чи елементи, які будуть стилізовані (у нашому випадку, елементи p). Для стилізації інших елементів просто змініть селектор.
-
Declaration — Визначення (декларація)
-
Одне правило на зразок color: red; вказує, яку властивість елементу ви бажаєте стилізувати.
-
Properties — Властивості
-
Шляхи, якими ви можете стилізувати даний HTML елемент. (У цьому випадку, color — це властивість елементів p). У CSS ви обираєте властивості, які хочете змінити у вашому правилі.
-
Property value — Значення властивості
-
Праворуч від властивості, після двокрапки, ми вказуємо значення властивості, обираючи з багатьох можливих значень для наданої властивості (є багато інших значень властивості color окрім red).
-
- -

Зверніть увагу на інші важливі частини синтаксису:

- - - -

Отже, для того, щоб змінити декілька значень властивостей одночасно, їх достатньо записати, розділяючи крапкою з комою, наприклад:

- -
p {
-  color: red;
-  width: 500px;
-  border: 1px solid black;
-}
- -

Вибір багатьох елементів одночасно

- -

Ви також можете вибрати декілька типів елементів та застосувати один набір правил для них усіх. Додайте декілька селекторів, розділяючи їх комою, наприклад:

- -
p,li,h1 {
-  color: red;
-}
- -

Різні типи селекторів

- -

Є велика кількість різних типів селекторів. Вище ми розглянули лише селектори елементів, які вибирають всі елементи заданого типу у наданих HTML документах. Але ми можемо застосовувати більш специфічні селектори. Подивіться на найбільш розповсюджені типи селекторів:

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Назва селекторуЩо він вибираєПриклад
Селектор елементу (іноді називають селектором тегу)Всі HTML елементи даного типуp
- Вибирає <p>
Селектор по IDЕлемент на сторінці, який має заданий ID (на HTML сторінці не може бути декілька елементів з однаковими ID).#my-id
- Вибирає <p id="my-id"> чи <a id="my-id">
Селектор по класуЕлементи на сторінці, які мають задані класи (на сторінці можуть бути елементи з однаковими класами)..my-class
- Вибирає <p class="my-class"> та <a class="my-class">
Селектор по атрибутуЕлементи на сторінці із вказаним атрибутомimg[src]
- Вибирає <img src="myimage.png"> але не <img>
Селектори псевдокласівВказані елементи, але тільки тоді, коли вони знаходяться у вказаному стані, наприклад, коли на них наводять курсор миші.a:hover
- Вибирає <a>, але тільки коли курсор миші вказує на посилання.
- -

Інші селектори ви можете побачити на сторінці Selectors guide.

- -

Шрифти та текст

- -

Дослідивши деякі основи CSS, давайте додамо більше правил та інформації в файл style.css, щоб зробити наш приклад більш привабливим. Для початку покращимо вигляд наших шрифтів та тексту.

- -
    -
  1. В першу чергу, знайдіть збережений вами вивід з сайту Google Fonts, який ви зберегли раніше. Додайте елемент <link ... > у head файлу index.html (будь-куди між тегами <head> та </head>). Елемент буде виглядати приблизно так: - -
    <link href='http://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css'>
    -
  2. -
  3. Видаліть правило, яке зараз знаходиться у вашому файлі style.css. Це був гарний приклад, але червоний текст виглядає не дуже гарно.
  4. -
  5. Додайте наступні строки до вашого файлу стилей, замінивши placeholder на рядок font-family, який ви отримали з сайту Google Fonts. (font-family означає шрифти, які ви застосуєте для вашого тексту). Це правило встановить глобальний базовий шрифт і його розмір для всієї сторінки (так як <html> — це батьківський елемент всієї сторінки, всі елементи у ньому успадкують однаковий font-size та font-family): -
    html {
    -  font-size: 10px; /* px означає 'пікселі': базовий розмір шрифта встановлюється рівним 10 пікселів заввишки  */
    -  font-family: placeholder: замініть цей плейсхолдер на строку із сайту Google fonts
    -}
    - -
    -

    Примітка: Я додав коментар із поясненням, що означає "px". Все у CSS документі, що знаходиться  між /* та */ — це коментар CSS, який ігнорується браузером. Коментарі застосовують для приміток та пояснень, що допоможуть вам в роботі.

    -
    -
  6. -
  7. Встановимо розміри шрифта для елементів, що містять у собі текст всередині HTML body ({{htmlelement("h1")}}, {{htmlelement("li")}}, та {{htmlelement("p")}}). Також відцентруємо текст нашого заголовку та встановимо висоту строки і проміжок між літерами нашого контенту, щоб зробити його зручнішим для читання. -
    h1 {
    -  font-size: 60px;
    -  text-align: center;
    -}
    -
    -p, li {
    -  font-size: 16px;
    -  line-height: 2;
    -  letter-spacing: 1px;
    -}
    -
  8. -
- -

Ви можете змінювати числа як завгодно, щоб ваш дизайн виглядав так, як ви хочете. Загалом він буде виглядати так:

- -

a mozilla logo and some paragraphs. a sans-serif font has been set, the font sizes, line height and letter spacing are adjusted, and the main page heading has been centered

- -

Блоки, блоки, і ще раз про блоки

- -

Одна річ, яку ви помітите при написанні CSS, полягає в тому, що багато використовуються блоки - встановлення їх розміру, кольору, позиції тощо. Більшість HTML-елементів на вашій сторінці можуть розглядатися як блоки, які розташовані один на одному.

- -

a big stack of boxes or crates sat on top of one another

- -

Не дивно, що макет CSS заснований переважно на блочній моделі (box model). Кожен із блоків, що займає простір на вашій сторінці, має такі властивості:

- - - -

three boxes sat inside one another. From outside to in they are labelled margin, border and padding

- -

В цьому розділі ми також використовуємо:

- - - -

Отже, давайте почнемо та додамо ще кілька CSS на нашу сторінку! Додайте ці нові правила до нижньої частини сторінки, і не бійтеся експериментувати зі зміною значень, щоб побачити, як це працює.

- -

Зміна кольору сторінки

- -
html {
-  background-color: #00539F;
-}
- -

Це правило встановлює фоновий колір для всієї сторінки . Змініть код кольору на будь-який інший, що ви обрали при плануванні свого сайту.

- -

Задання стилів для body

- -
body {
-  width: 600px;
-  margin: 0 auto;
-  background-color: #FF9500;
-  padding: 0 20px 20px 20px;
-  border: 5px solid black;
-}
- -

Тепер стилі для елемента body. Тут багато параметрів, тому давайте розглянемо по-одному:

- - - -

Позиціонування та стиль заголовка головної сторінки

- -
h1 {
-  margin: 0;
-  padding: 20px 0;
-  color: #00539F;
-  text-shadow: 3px 3px 1px black;
-}
- -

Ви, мабуть, помітили, що у верхній частині body є чималенький розрив. Це відбувається тому, що браузери застосовують деякий стиль за умовчанням до елемента {{htmlelement("h1")}} (серед інших), навіть якщо ви не застосували жодного CSS! Це може здаватись поганою ідеєю, але ми хочемо, щоб навіть незавершена веб-сторінка мала базову читабельність. Щоб позбутися розриву, ми перекриваємо стандартний стиль за замовчуванням, встановлюючи margin: 0;.

- -

Далі ми встановили верхній та нижній відступи (padding) заголовку до 20 пікселів і зробили заголовок текстом того ж кольору, що і колір фону (background) всієї сторінки html.

- -

Одна досить цікава властивість, яку ми використовували тут, це - text-shadow, яка застосовує текстову тінь до текстового вмісту елемента. Її чотири значення означають наступне:

- - - -

Знову ж таки, спробуйте експериментувати з різними значеннями, щоб побачити, що ви можете придумати.

- -

Центрування зображення

- -
img {
-  display: block;
-  margin: 0 auto;
-}
- -

Нарешті, ми будемо центрувати зображення, щоб воно виглядало краще. Ми могли б використати margin: 0 auto як і раніше для body, але ми також можемо зробити дещо інше. Елемент body є блочним рівнем, тобто він займає місце на сторінці, і до нього можуть бути додані поля та інші значення відступів. Зображення, з іншого боку, є вбудованими елементами (inline), тобто вони не можуть мати відступів. Таким чином, щоб застосувати поля до зображення, ми повинні надати поведінку блочного рівня зображенню за допомогою display: block;.

- -
-

Примітка: Не хвилюйтесь, якщо ще не зрозуміли display: block; і відміну між блочним рівнем / вбудованим (inline) елементом. Далі ви будете вивчати CSS більш глибоко. Ви можете дізнатись більше про різні доступні значення відображення на нашому сайті display reference page.

-
- -

Висновок

- -

Якщо ви дотримувалися всіх інструкцій у цій статті, ви повинні отримати сторінку, яка виглядає приблизно так (ви можете також переглянути нашу версію тут):

- -

a mozilla logo, centered, and a header and paragraphs. It now looks nicely styled, with a blue background for the whole page and orange background for the centered main content strip.

- -

Якщо ви застрягли, ви можете завжди  порівняти свою роботу з нашим закінченим прикладом коду на Github.

- -

Тут ми, дійсно, лише зачепили поверхневі знання із CSS. Щоб дізнатись більше, перейдіть до Вивчення теми CSS.

- -

{{PreviousMenuNext("Learn/Getting_started_with_the_web/HTML_basics", "Learn/Getting_started_with_the_web/JavaScript_basics", "Learn/Getting_started_with_the_web")}}

diff --git a/files/uk/learn/getting_started_with_the_web/dealing_with_files/index.html b/files/uk/learn/getting_started_with_the_web/dealing_with_files/index.html deleted file mode 100644 index 1cd1fa24d6..0000000000 --- a/files/uk/learn/getting_started_with_the_web/dealing_with_files/index.html +++ /dev/null @@ -1,101 +0,0 @@ ---- -title: Робота з файлами -slug: Learn/Getting_started_with_the_web/Dealing_with_files -tags: - - HTML - - Веб-сайт - - Початківцям - - Теорія - - Файли -translation_of: Learn/Getting_started_with_the_web/Dealing_with_files ---- -
{{LearnSidebar}}
- -
{{PreviousMenuNext("Learn/Getting_started_with_the_web/What_will_your_website_look_like", "Learn/Getting_started_with_the_web/HTML_basics", "Learn/Getting_started_with_the_web")}}
- -
-

Веб-сайт складається з багатьох файлів: текстового наповнення, коду, стилів, медіаконтенту тощо. Коли ви будуєте веб-сайт, ви маєте поєднати ці файли у єдину змістову структуру на своєму локальному комп'ютері, переконатися, що всі файли можуть "спілкуватися" один з одним і правильно відображати весь контент, до того, як ви завантажите їх на сервер. У статті Робота з файлами ми розглядаємо кілька питань, які допоможуть правильно налаштувати структуру файлів для вашого сайту. 

-
- -

Де саме має зберігатися сайт на вашому комп'ютері?

- -

Коли ви працюєте над своїм сайтом локально на комп'ютері, вам слід зберігати всі файли сайту в одній папці, структура якої має повністю відповідати структурі папки живого сайту, яка зберігається на сервері. Ваша локальна папка може зберігатися де завгодно, але найкраще тримати її там, де ви зможете її легко знайти, наприклад, на робочому столі чи в корені диска. 

- -
    -
  1. Виберіть місце для зберігання ваший веб-сайтів. Створіть нову папку і назвіть її web-projects (або схожим чином). У цій папці житимуть всі ваші веб-проекти. 
  2. -
  3. Всередині папки, створіть ще одну папку для вашого першого веб-сайту. Назвіть її test-site (або більш вигадливо).
  4. -
- -

Примітка про великі й малі літери і пробіли

- -

Читаючи цю статтю, ви помітите, що ми просимо вас називати папки і файли малими літерами і без пробілів. Це тому що:

- -
    -
  1. Багато комп'ютерів, особливо веб-серверів, є чутливими до регістрів літер. Наприклад, якщо ви покладете зображення MyImage.jpg у ваш веб-проект  test-site, а потім у якомусь файлі спробуєте вставити це зображення, вказавши шлях як test-site/myimage.jpg, це може не спрацювати.
  2. -
  3. Браузери, веб-сервери і мови програмування не завжди правильно опрацьовують пробіли. Наприклад, якщо ви використовуєте пробіли в назві файлу, деякі системи можуть вважати, що це дві окремі назви файлів. Деякі сервери замінять пробіли в назві файлів символом "%20" (код символу пробіл в URI), поламаючи при цьому ваші посилання. Краще розділяти слова дефісом, ніж нижнім підкресленням: my-file.html замість my_file.html.
  4. -
- -

Коротко кажучи, вам слід використовувати дефіс у назвах файлів. Google розуміє дефіс як спосіб розділення слів, але на нижнє підкреслення це не поширюється. З цих міркувань, найкраще звикати до написання назв папок і файлів малими літерами без пробілів, розділяючи слова дефісом, принаймні допоки у вас немає достатніх знань. Так ви матимете менше проблем згодом. 

- -

Яку структуру вибрати для вашого сайту?

- -

Давайте поглянемо, яку структуру повинен мати ваш сайт. Найбільш поширені компоненти, які мають практично всі проекти, які ми створюємо, — це HTML-файл з назвою index, а також кілька папок: із зображеннями, стилями і скриптами. Давайте створимо їх зараз:

- -
    -
  1. index.html: цей файл буде містити практично весь контент вашої головної сторінки — текст і зображення, які користувачі бачать, коли відвідують ваш сайт. У своєму текстовому редакторі створіть файл з назвою index.html і збережіть його в папці test-site.
  2. -
  3. Папка images: у цій папці будуть зібрані всі зображення, які ви будете використовувати на сайті. Створіть папку з назвою images всередині папки test-site.
  4. -
  5. Папка styles: у цій папці зберігатимуться всі CSS-файли зі стилями, якими ви будете змінювати зовнішній вигляд вашого контенту (наприклад, шрифт тексту чи колір бекграунду). Створіть папку styles всередині папки test-site.
  6. -
  7. Папка scripts: у цій папці будуть зберігатися всі файли з JavaScript-кодом, яким ви додасте інтерактивності вашому сайту (наприклад, щоб кнопки при кліку відображали якісь дані). Створіть папку scripts всередині папки test-site.
  8. -
- -
-

Примітка: на комп'ютерах Windows ви не завжди можете бачити повну назву файлу із розширенням, оскільки Windows за замовчанням приховує розширення файлів. Ви можете змінити налаштування так: у File Explorer вибрати вкладку View і поставити "галочку" в пункті File name extensions. Більш детальну інформацію про те, як змінити налаштування на вашій версії Windows, можна легко знайти в інтернеті.

-
- -

Шляхи файлів

- -

Щоб змусити файли "спілкуватися" між собою, ви маєте вказати їм шлях один до одного — по суті, маршрут, за яким один файл буде знати, де лежить інший файл. Щоб показати, як це працює, ми додамо трохи HTML у наш файл index.html, щоб вкласти на сторінку зображення, яке ви вибрали в статті "What will your website look like?".

- -
    -
  1. Скопіюйте вибране раніше зображення в папку images.
  2. -
  3. Відкрийте файл index.html і вставте туди цей код, точно так, як він поданий тут. Поки що не переймайтеся, що він означає, — пізніше ми розглянемо його в деталях. -
    <!DOCTYPE html>
    -<html>
    -  <head>
    -    <meta charset="utf-8">
    -    <title>My test page</title>
    -  </head>
    -  <body>
    -    <img src="" alt="My test image">
    -  </body>
    -</html> 
    -
  4. -
  5. Рядок <img src="" alt="My test image"> є кодом HTML, який вставить зображення на нашу сторінку. Ми маємо сказати цьому коду, де саме шукати картинку, тобто вказати шлях файлу. Наше зображення зберігається в папці images, яка, в свою чергу, зберігається на тому ж рівні (в тій самій директорії), що і файл index.html. Щоб файл index.html зміг дістатися до нашого зображення, нам потрібно спочатку вказати назву папки із зображеннями, а потім ім'я конкретного зображення, отак: images/ім'я-вашого-файлу. Наприклад, якщо наше зображення називається firefox-icon.png, то наш шлях виглядатиме так: images/firefox-icon.png.
  6. -
  7. Вставте цей шлях у ваш код HTML між лапками коду src="".
  8. -
  9. Збережіть файл HTML, потім відкрийте його в браузері (подвійний клік на файлі). Ви маєте побачити вашу нову веб-сторінку із зображенням! 
  10. -
- -

A screenshot of our basic website showing just the firefox logo - a flaming fox wrapping the world

- -

Загальні правила шляху файлу:

- - - -

Поки що це все, що вам потрібно знати.

- -
-

Примітка: файлова система Windows у своїх шляхах зазвичай використовує обернену скісну риску замість звичайної, наприклад, C:\windows. На ваш код HTML це не впливає— навіть якщо ви пишете сайт на Windows, вам все одно слід використовувати звичайну скісну риску. 

-
- -

Що ще потрібно зробити?

- -

Поки що це все. Структура вашої папки має виглядати приблизно так: 

- -

A file structure in mac os x finder, showing an images folder with an image in, empty scripts and styles folders, and an index.html file

- -

{{PreviousMenuNext("Learn/Getting_started_with_the_web/What_will_your_website_look_like", "Learn/Getting_started_with_the_web/HTML_basics", "Learn/Getting_started_with_the_web")}}

diff --git a/files/uk/learn/getting_started_with_the_web/how_the_web_works/index.html b/files/uk/learn/getting_started_with_the_web/how_the_web_works/index.html deleted file mode 100644 index d736cf3913..0000000000 --- a/files/uk/learn/getting_started_with_the_web/how_the_web_works/index.html +++ /dev/null @@ -1,94 +0,0 @@ ---- -title: Як працює мережа -slug: Learn/Getting_started_with_the_web/How_the_Web_works -tags: - - IP-адреса - - Клієнт - - Початківцям - - Сервер - - протокол -translation_of: Learn/Getting_started_with_the_web/How_the_Web_works ---- -
{{LearnSidebar}}
- -
{{PreviousMenu("Learn/Getting_started_with_the_web/Publishing_your_website", "Learn/Getting_started_with_the_web")}}
- -
-

Стаття Як працює мережа спрощено пояснює, що саме відбувається, коли ви переглядаєте веб-сторінку у браузері на комп'ютері чи телефоні. 

-
- -

Ця теорія не є обов'язковою на початку веб-розробки, але чим далі ви просуватиметеся, тим більш очевидними будуть переваги розуміння того, що саме відбувається за лаштунками. 

- -

Клієнти та сервери

- -

Комп'ютери, приєднані до мережі, називаються клієнтами та серверами. Цей малюнок спрощено показує, як відбувається їхня взаємодія: 

- -

- - - -

Інші гравці на полі

- -

Клієнт та сервер, про які йшлося вище, не єдині учасники процесу. Існує багато інших складових, про які ми зараз розкажемо. 

- -

Для початку, уявимо мережу як дорогу. На одному кінці дороги — ваш будинок. Це наш клієнт. На протилежному кінці дороги — крамниця, у якій ви хочете щось придбати. Це наш сервер. 

- -

- -

На додачу до сервера і клієнта, ми також маємо: 

- - - -

То що, власне, відбувається?

- -

Коли ви вписуєте адресу в браузер, то:

- -
    -
  1. Браузер іде на DNS-сервер і знаходить там справжню адресу серверу, на якому зберігається потрібний вам сайт (ви знаходите адресу магазину).
  2. -
  3. Браузер надсилає HTTP-запит до сервера з проханням вислати копію сайту на клієнт (ви йдете в магазин і замовляєте товар). Цей запит і всі інші дані, які пересилаються між клієнтом і сервером, передаються в мережі за допомогою TCP/IP.
  4. -
  5. Якщо сервер вирішує задовольнити запит, він відсилає клієнту повідомлення "200 OK", що означає "Звісно, ви можете подивитися цей веб-сайт! Ось він", і потім починає відсилати файли веб-сайту в браузер по шматочках, погрупованих в маленькі набори, які називаються пакетами даних (магазин видає вам ваш товар і ви несете його додому).
  6. -
  7. Браузер збирає докупи всі шматочки і показує їх вам у вигляді готової веб-сторінки (ваш товар вже вдома!).
  8. -
- -

Пояснення DNS

- -

Усі адреси ваших улюблених сайтів насправді є зовсім не такими, якими виглядають. Вони є спеціальними наборами цифр, як, наприклад, оцей: 63.245.215.20.

- -

Це {{Glossary("IP Address", "IP-адреса")}} сайту, вона представляє унікальне місце зберігання сайту в мережі. Її непросто запам'ятати, чи не так? Саме тому бути винайдені сервери доменних імен (Domain Name Servers), або DNS-сервери. Це спеціальні сервери, які зіставляють веб-адресу, яку ви вводите в браузер (наприклад, "mozilla.org") зі справжньою (IP) адресою сайту.

- -

Веб-сайти можна знайти напряму через їхні IP-адреси. Спробуйте зайти на сайт Mozilla website, увівши 63.245.215.20 в адресний рядок браузера.

- -

A domain name is just another form of an IP address

- -

Пояснення пакетів

- -

Вище ми вживали термін "пакет", щоб описати формат, у якому дані пересилаються з сервера на клієнт. Що це означає? Дані пересилаються по мережі у вигляді серій пакетів, кожен з яких містить маленьких шматок інформації. Це робиться для того, щоб багато різних користувачів могли завантажувати одну й ту саму сторінку одночасно. Якщо б веб-сайти надсилалися одним великим шматком, тільки один користувач міг би завантажувати її в певний час, що значно ускладнило б користування мережею. 

- -

Також дивися

- - - -

Автор фото

- -

Street photo: Street composing, by Kevin D.

- -

{{PreviousMenu("Learn/Getting_started_with_the_web/Publishing_your_website", "Learn/Getting_started_with_the_web")}}

diff --git a/files/uk/learn/getting_started_with_the_web/html_basics/index.html b/files/uk/learn/getting_started_with_the_web/html_basics/index.html deleted file mode 100644 index 71e66f6f1e..0000000000 --- a/files/uk/learn/getting_started_with_the_web/html_basics/index.html +++ /dev/null @@ -1,214 +0,0 @@ ---- -title: Основи HTML -slug: Learn/Getting_started_with_the_web/HTML_basics -tags: - - HTML - - Початківець -translation_of: Learn/Getting_started_with_the_web/HTML_basics ---- -
{{LearnSidebar}}
- -
{{PreviousMenuNext("Learn/Getting_started_with_the_web/Dealing_with_files", "Learn/Getting_started_with_the_web/CSS_basics", "Learn/Getting_started_with_the_web")}}
- -
-

HTML (мова гіпертекстової розмітки) — це код, який використовується для структурування і відображення веб-сторінки та її контенту. Наприклад, контент може бути розбитий на параграфи (абзаци), містити список, зображення чи таблицю. Ця стаття має дати базове розуміння мови HTML та її призначення. 

-
- -

Що таке HTML?

- -

HTML — це не мова програмування, це мова розмітки, яка каже вашому браузеру, як відображати вміст веб-сторінки, яку ви переглядаєте. Вона може бути простою чи складною, залежно від бажання веб-дизайнера, який її створює. HTML складається з серії ({{Glossary("element", "елементів")}}), які використовуються для вміщення, або "загортання" в них різних частин контенту, щоб вони відображалися чи діяли в певний спосіб. Ці елементи за допомогою початкових і кінцевих ({{Glossary("tag", "тегів")}}) можуть зробити слово чи зображення посиланням на будь-яку іншу сторінку, можуть відображати текст курсивом, збільшити чи зменшити шрифт тощо. Для прикладу, візьмемо такий контент: 

- -
Мій кіт дуже сумний.
- -

Якщо ми хочемо, щоб цей рядок був сам по собі, ми можемо вказати, що це параграф (абзац), додавши до нього відповідні теги:

- -
<p>Мій кіт дуже сумний.</p>
- -

Анатомія елементу HTML

- -

Погляньмо на елемент "параграф" детальніше. 

- -

- -

Основні частини елементу такі:

- -
    -
  1. Початковий тег: містить назву елементу (в даному випадку, p), загорнену в кутові дужки. Цей тег позначає початок елементу, або місце, де елемент починає діяти. У даному випадку — це місце, де починається параграф. 
  2. -
  3. Кінцевий тег: такий самий тег, як і початковий, тільки тепер він містить скісну риску перед назвою елементу. Цей тег позначає місце закінчення елементу — у даному випадку, місце, де закінчується параграф. Одна з найпоширеніших помилок початківців — це забути поставити кінцевий тег, що може призвести до несподіваних результатів. 
  4. -
  5. Вміст: вміст елементу, у даному випадку — просто текст. 
  6. -
  7. Елемент: початковий тег плюс кінцевий тег плюс вміст між ними — дорівнює елемент.
  8. -
- -

Елементи також можуть мати атрибути, які виглядають так: 

- -

- -

Атрибути містять додаткову інформацію про елемент, яка не відображається в самому контенті. У прикладі вище class це ім'я атрибута, а editor-note — це значення атрибута. Атрибут class дозволяє дати елементу певний ідентифікатор, який пізніше можна використати для того, щоб доступитися до цього елемента і змінити його стиль. 

- -

Атрибут завжди повинен мати:

- -
    -
  1. Пробіл між ім'ям атрибута і назвою елементу (або попереднім атрибутом, якщо такий є).
  2. -
  3. Ім'я атрибута, за яким іде знак дорівнює.
  4. -
  5. Значення атрибута, загорнене в прямі лапки.
  6. -
- -

Вкладені елементи

- -

Ви можете додати елемент всередину іншого елементу. Це називається вкладенням. Якщо ми хочемо наголосити, що наш кіт дуже сумний, ми можемо загорнути слово "дуже" в елемент {{htmlelement("strong")}}, який означає, що слово особливо сильно наголошене:

- -
<p>Мій кіт <strong>дуже</strong> сумний.</p>
- -

Важливо пам'ятати правильне вкладення елементів: у прикладі вище ми спершу відкрили елемент {{htmlelement("p")}}, а потім елемент <strong>, що означає, що першим ми маємо закрити внутрішній елемент {{htmlelement("strong")}}, а потім зовнішній {{htmlelement("p")}}. Приклад нижче неправильний:

- -
<p>Мій кіт <strong>дуже сумний.</p></strong>
- -

Елемент має закриватися або всередині, або ззовні іншого елемента. Якщо кінцевий тег зовнішнього елемента іде перед кінцевим тегом внутрішнього елемента, ваш браузер спробує здогадатися, що ви хотіли цим всім сказати, і результати цього можуть бути неочікуваними. Тому не робіть так!

- -

Порожні елементи

- -

Деякі елементи не містять жодного вмісту. Вони називаються порожніми елементами. Для прикладу візьмемо елемент {{htmlelement("img")}}:

- -
<img src="images/firefox-icon.png" alt="Моє тестове зображення">
- -

Цей елемент має два атрибути, при цьому не має кінцевого тегу і жодного внутрішнього вмісту. Елементу image не потрібно загортати контент, його мета — вставити зображення на певне місце на веб-сторінці.

- -

Анатомія HTML-документу

- -

Все зазначене вище є основами HTML-елементів, але окремо взяті елементи самі по собі мало на що здатні. Тепер ми поглянемо на те, як окремі елементи формують цілу веб-сторінку. Візьмемо для прикладу код з файлу index.html (який використовується в статті Робота з файлами):

- -
<!DOCTYPE html>
-<html>
-  <head>
-    <meta charset="utf-8">
-    <title>Моя тестова сторінка</title>
-  </head>
-  <body>
-    <img src="images/firefox-icon.png" alt="Моє тестове зображення">
-  </body>
-</html>
- -

Тут ми маємо:

- - - -

Зображення

- -

Повернемося до елементу {{htmlelement("img")}}:

- -
<img src="images/firefox-icon.png" alt="Моє тестове зображення">
- -

Як ми вже з'ясували раніше, цей елемент вставляє зображення на сторінку в тому місці, де воно має з'явитися.  Це відбувається за допомогою атрибута src (source — джерело), який містить шлях до зображення.

- -

Також ми додали атрибут alt (alternative). У цьому атрибуті потрібно вказувати альтернативний текст-опис зображення для тих випадків, коли користувачі не зможуть побачити картинку, наприклад, через те, що:

- -
    -
  1. Мають порушення зору. Користувачі з порушенням зору часто використовують скрін-рідери, які читають описи зображень.
  2. -
  3. Щось пішло не так при завантаженні зображення. Спробуйте навмисно змінити шлях до зображення в атрибуті src, щоб він став неправильним. Якщо ви тепер перезавантажите сторінку, ви побачите, що на місці зображення буде текст:
  4. -
- -

- -

Основним при створенні атрибута alt має бути описовість тексту. Цей атрибут має дати користувачу достатньо інформації, щоб скласти уявлення про те, що є на зображенні. У нашому випадку, текст "Моє тестове зображення" нікуди не годиться. Набагато кращий варіант для логотипу Firefox був би "Логотип Firefox: палаюча лисиця навколо Земної кулі."

- -

Спробуйте придумати кращий альтернативний текст для свого зображення. 

- -
-

Примітка: дізнайтеся більше про доступність на сторінці MDN's Accessibility.

-
- -

Розмітка тексту

- -

У цьому розділі ми розглянемо базові HTML-елементи, які використовуються для розмітки тексту.

- -

Заголовки

- -

Елементи "Heading" дозволяють вам вказати, що певні частини контенту вашої сторінки є заголовками або підзаголовками. Так само, як у книжці є назва книги, назви розділів і підзаголовки, у HTML-документі це також є. HTML має заголовки шістьох рівнів, {{htmlelement("h1")}}–{{htmlelement("h6")}}, хоча зазвичай використовуються перші 3-4.

- -
<h1>Мій головний заголовок</h1>
-<h2>Мій важливий заголовок</h2>
-<h3>Мій підзаголовок</h3>
-<h4>Мій менш важливий підзаголовок</h4>
- -

Спробуйте додати підзаголовки до вашої HTML-сторінки перед елементом {{htmlelement("img")}}.

- -

Параграфи

- -

Як пояснювалося вище, елемент {{htmlelement("p")}} містить частину тексту, яка становить один абзац. Параграфи використовуються дуже часто, особливо при розмітці звичайного текстового контенту:

- -
<p>Це один параграф.</p>
- -

Додайте зразок тексту (він має бути готовий зі статті Як виглядатиме ваш сайт?) в один чи два параграфи і розмістіть їх прямо під елементом {{htmlelement("img")}}.

- -

Списки

- -

Чимало контенту на веб-сторінках є списками, і в HTML є спеціальні елементи для них. Розмітка списків завжди має принаймні два елементи. Найпоширеніші типи списків - це нумерований і ненумерований списки:

- -
    -
  1. Ненумерований список — це перелік, у якому порядок пунктів не суттєвий, наприклад, список покупок. Такий список загортається в елемент {{htmlelement("ul")}}.
  2. -
  3. Нумерований список — це перелік, у якому порядок пунктів має значення, наприклад, рецепт приготування. Такий список загортається в елемент {{htmlelement("ol")}}.
  4. -
- -

Кожен пункт всередині списку загортається в свій окремий елемент {{htmlelement("li")}} (list item).

- -

Наприклад, якщо ми хочемо перетворити такий параграф у список: 

- -
<p>Mozilla — це глобальна спільнота технологів, мислителів і творців, які працюють разом...</p>
- -

Ми можемо так змінити розмітку:

- -
<p>Mozilla — це глобальна спільнота</p>
-
-<ul>
-  <li>технологів</li>
-  <li>мислителів</li>
-  <li>творців</li>
-</ul>
-
-<p>які працюють разом... </p>
- -

Спробуйте додати нумерований чи ненумерований список до вашої сторінки.

- -

Посилання

- -

Посилання дуже важливі — це те, що робить мережу мережею! Щоб додати посилання, потрібно використовувати елемент {{htmlelement("a")}} ("a" скорочено від "anchor" — якір). Щоб перетворити параграф на посилання, робіть так:

- -
    -
  1. Виберіть текст. Ми вибрали "Mozilla Manifesto".
  2. -
  3. Загорніть цей текст в елемент {{htmlelement("a")}}, отак: -
    <a>Mozilla Manifesto</a>
    -
  4. -
  5. Додайте до елементу {{htmlelement("a")}} атрибут href, отак: -
    <a href="">Mozilla Manifesto</a>
    -
  6. -
  7. Додайте значення цьому атрибута — адресу посилання: -
    <a href="https://www.mozilla.org/en-US/about/manifesto/">Mozilla Manifesto</a>
    -
  8. -
- -

Не пропускайте частину https:// чи http:// на початку адреси, так званий протокол, інакше результати можуть бути неочікуваними. Після того, як елемент доданий, клікніть на посилання і переконайтеся, що вас відправило туди, куди ви хотіли.

- -
-

href може видаватися дивним ім'ям для атрибута, який складно запам'ятати. Він означає hypertext reference — гіпертекстове посилання.

-
- -

Тепер додайте посилання до своєї сторінки.

- -

Висновок

- -

Якщо ви слідували інструкціям у цій статті, у вас мала вийти сторінка, яка виглядає приблизно так (також можна переглянути тут):
-
- A web page screenshot showing a firefox logo, a heading saying mozilla is cool, and two paragraphs of filler text

- -

Якщо ви застрягли, ви завжди можете порівняти свій код із завершеним прикладом коду на GitHub.

- -

У цій статті ми розглянули тільки базові поняття HTML. Щоб дізнатися більше, зайдіть на сторінку HTML Learning topic.

- -

{{PreviousMenuNext("Learn/Getting_started_with_the_web/Dealing_with_files", "Learn/Getting_started_with_the_web/CSS_basics", "Learn/Getting_started_with_the_web")}}

diff --git a/files/uk/learn/getting_started_with_the_web/index.html b/files/uk/learn/getting_started_with_the_web/index.html deleted file mode 100644 index af137773c8..0000000000 --- a/files/uk/learn/getting_started_with_the_web/index.html +++ /dev/null @@ -1,64 +0,0 @@ ---- -title: Початок роботи з Інтернетом -slug: Learn/Getting_started_with_the_web -tags: - - CSS - - HTML - - 'l10n: пріоритет' - - Покажчик - - Посібник - - Початківцям - - Розробка - - Теорія -translation_of: Learn/Getting_started_with_the_web ---- -
{{LearnSidebar}}
- -
-

«Початок роботи з Інтернетом» — це серія стислих статей, що знайомить з практичними питаннями веб-розробки. Ви налаштуєте інструменти, необхідні для створення простої веб-сторінки та публікації власного коду.

-
- -

Історія вашого першого сайту

- -

Розробка професійного сайту - це кропітка робота. Радимо не поспішати, якщо ви початківець у веб-програмуванні. Ви не отримаєте відразу новий Facebook, але легко побудуєте свій перший сайт.

- -

Опрацьовуючи статті послідовно, ви розташуєте створену веб-сторінку в інтернеті. Почнемо!

- -

Встановлення необхідних програм

- -

Є чимало інструментів для побудови сайтів. Початківець може розгубитись, при виборі редакторів коду, фреймворків  та засобів для тестів. Встановлення необхідних програм поступово допоможе встановити все, що потрібно для простої веб-розробки.

- -

Який вигляд матиме ваш сайт?

- -

Перед тим, як почати писати код для сайту, треба мати план. Яку інформацію відобразити? Які кольори та шрифти використати? Який вигляд матиме ваш сайт? Пропонуємо вам простий спосіб планування змісту та зовнішнього вигляду вашого сайту.

- -

Робота з файлами

- -

Сайт складається з багатьох файлів: текстів, коду, таблиць стилів, медіа-контенту тощо. Коли створюється сайт, потрібно об'єднати ці файли в логічну структуру та впевнитися, що вони доступні одне одному. Робота з файлами пояснює, як створити логічну структуру файлів для сайту й уникнути типових проблем.

- -

Основи HTML

- -

Hypertext Markup Language (HTML, мова розмітки гіпертексту) — це код, що структурує зміст веб-сторінок та надання йому значення і мети. Наприклад, чи є контент набором параграфів, чи списком із маркерами? Чи є на сторінці зображення, таблиці з даними? В Основах HTML достатньо інформації для знайомства з HTML.

- -

Основи CSS

- -

Cascading Stylesheets (CSS, каскадні таблиці стилів) — це код для стилізації сайту. Наприклад, який колір тексту, де розміщенно контент на екрані? Які фонові зображення та кольори взято для оздоблення сайту? З Основ CSS ви дізнаєтесь про стилізацію для початківців.

- -

Основи JavaScript

- -

JavaScript — це мова програмування, яку використовують для можливості взаємодії з веб-сайтами. А саме: ігри, дії, що відбудутся після натиску на кнопоку або введення даних до форми, створення динамічних стилей, анімацій тощо. Основи JavaScript описують можливості цієї захоплючої мови програмування та як почати нею користовуватись.

- -

Публікація вашого сайту

- -

Після написання коду та організації файлів вашого сайту, необхідно розмістити його в інтернеті, щоб люди могли побачити результати вашої праці. Публікація вашого коду допоможе як найлегше розмістити ваш код в інтернеті.

- -

Як працює Інтернет 

- -

Коли ви заходите на улюблений сайт, виконується безліч фонових завдань, можливо непомітних для вас. Як працює Інтернет описує процеси, які відбуваються, коли ви переглядаєте веб-сторінку на компьютері.

- -

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

- - diff --git a/files/uk/learn/getting_started_with_the_web/installing_basic_software/index.html b/files/uk/learn/getting_started_with_the_web/installing_basic_software/index.html deleted file mode 100644 index 22e6bfadf6..0000000000 --- a/files/uk/learn/getting_started_with_the_web/installing_basic_software/index.html +++ /dev/null @@ -1,63 +0,0 @@ ---- -title: Встановлення необхідних програм -slug: Learn/Getting_started_with_the_web/Installing_basic_software -tags: - - Браузер - - Початківцям - - текстовий редактор - - інструменти -translation_of: Learn/Getting_started_with_the_web/Installing_basic_software ---- -
{{LearnSidebar}}
- -
{{NextMenu("Learn/Getting_started_with_the_web/What_will_your_website_look_like", "Learn/Getting_started_with_the_web")}}
- -
-

В статті "Встановлення необхідних програм" ми з'ясуємо, які інструменти потрібні для веб-розробки та як їх правильно встановити.

-
- -

Які інструменти використовують професіонали?

- - - -

Які інструменти мені потрібні зараз?

- -

Список виглядає страшно, але на щастя ви можете починати веб-розробку без знань більшості з них. У статті розглянемо базовий мінімум — текстовий редактор і кілька сучасних браузерів. 

- -

Встановлення текстового редактора

- -

Напевно, у вас вже є простий текстовий редактор на комп'ютері. Windows зазвичай має Notepad, а macOS — TextEdit. Linux пропонує різні варіанти, зокрема Ubuntu має gedit.

- -

Для веб-розробки доступні кращі редактори, ніж Notepad чи TextEdit. Пропонуємо Brackets —безкоштовний редактор з підказками та попереднім переглядом. 

- -

Встановлення сучасного браузера

- -

Встановимо кілька браузерів, щоб тестувати наш код. Оберіть операційну систему, клацніть відповідне посилання та завантажте улюблені браузери:

- - - -

Перед тим, як продовжити, встановіть принаймні два з цих браузерів і запустіть їх.

- -
-

Internet Explorer не сумісний з деякими сучасними функціями вебу та, вірогідно, не зможе запустити ваш проект. Зазвичай вам не потрібно турбуватися про те, щоб зробити свої веб-проекти сумісними з ним, оскільки дуже мало людей все ще користуються ним - тож, не надто переймайтеся про це, поки ви навчаєтесь. Іноді ви можете зіткнутися з проектом, який потребує його підтримки.

-
- -

Встановлення локального веб-сервера

- -

Деякі приклади потрібно буде тестувати на локальному веб-сервері. Ви можете дізнатися, як його встановити, у статті Як ти налаштуєш локальний тестовий сервер?

- -

{{NextMenu("Learn/Getting_started_with_the_web/What_will_your_website_look_like", "Learn/Getting_started_with_the_web")}}

diff --git a/files/uk/learn/getting_started_with_the_web/javascript_basics/index.html b/files/uk/learn/getting_started_with_the_web/javascript_basics/index.html deleted file mode 100644 index 50ffb7a580..0000000000 --- a/files/uk/learn/getting_started_with_the_web/javascript_basics/index.html +++ /dev/null @@ -1,401 +0,0 @@ ---- -title: Основи JavaScript -slug: Learn/Getting_started_with_the_web/JavaScript_basics -tags: - - Інтернет - - Мова - - Основи - - Українська - - вивчення -translation_of: Learn/Getting_started_with_the_web/JavaScript_basics ---- -
{{LearnSidebar}}
- -
{{PreviousMenuNext("Learn/Getting_started_with_the_web/CSS_basics", "Learn/Getting_started_with_the_web/Publishing_your_website", "Learn/Getting_started_with_the_web")}}
- -
-

JavaScript — це мова програмування, яка приносить інтерактивність до вашого веб-сайту (наприклад: ігри, реакція на натиски кнопок, введеня даних через форми, динамічна зміна стилів, анімація). Ця стаття допоможе розпочати вивчення цієї захоплюючої мови і дасть вам уяву про її можливості.

-
- -

Що ж являє собою JavaScript насправді?

- -

{{Glossary("JavaScript")}} ("JS" скорочено) це повноцінна {{Glossary("Динамічна мова програмування", "динамічна мова програмування")}}, яка, у застосуванні до {{Glossary("HTML")}} документу, може надати динамічну інтерактивність на веб-сайтах. Вона була винайдена Бренданом Eйхом, співзасновником проекту Mozilla, the Mozilla Foundation, та Mozilla Corporation.

- -

JavaScript має надзвичайно багато застосувань. Ви можете розпочати з малого: створити "каруселі", галереї зображень, динамічні макети сторінок, відповіді на натиски кнопок, тощо. Із досвідом, ви зможете створювати ігри, 2D та 3D графіку, складні застосунки з використанням баз даних та багато іншого!

- -

JavaScript доволі компактна та гнучка мова. Розробники забезпечили велике розмаїття інструментів, що доповнюють основу мови JavaScript, які відкривають величезну кількість додаткового функціоналу з мінімальними зусиллями. Серед них:

- - - -

Тому що ця стаття повинна бути легким введенням до JavaScript, на цьому етапі ми не будемо займати вашу увагу детальними розмовами про різницю основної мови JavaScript та різними інструментами, що наведені вище. Ви можете вивчити це у деталях пізніше, у нашій JavaScript learning area, та решті MDN.

- -

Нижче ми представимо вам деякі аспекти основної мови, а також ви ознайомитесь з деякими можливостями API браузера. Розважайтесь!

- -

Приклад "hello world"

- -

Попередній розділ звучить неймовірно, і це дійсно так — JavaScript є одним із найперспекнивніших Веб-технологій, і коли ви проникнитесь та почнете використовувати його, ваші веб-сайти перейдуть у нові виміри продуктивності та креативності.

- -

Тим не менш,  відчувати себе комфортно з  JavaScript складніше ніж з HTML та CSS. Вам потрібно починати з малого та продовжувати працювати малими послідовними кроками. Для початку, ми розглянемо як додати деякі прості JS-елементи на вашу сторінку,  створюючи "hello world!" зразок (стандартний приклад з програмування).

- -
-

Важливо: Якщо ви не проходили пепередні частини курсу, завантажте цей зразок коду(архів) і використовуйте його як точку початку.

-
- -
    -
  1. Перш за все, перейдіть до вашого тестового сайту та створіть нову папку з іменем "scripts"(без лапок). Тоді, всередині нової папки для скриптів, що ви щойно створили, створіть новий файл з назвою main.js. Збережіть його в папці scripts .
  2. -
  3. Далі, у вашому файлі index.html введіть наступний елемент в новому рядку просто перед закриваючим тегом </body> : -
    <script src="scripts/main.js"></script>
    -
  4. -
  5. Загалом,  це те ж саме, що і {{htmlelement("link")}} елемент для CSS — він додає JavaScript до сторінки, тож це може впливати на HTML (також на CSS, та будь що інше на сторінці).
  6. -
  7. Тепер додайте цей код до файлу main.js : -
    var myHeading = document.querySelector('h1');
    -myHeading.textContent = 'Hello world!';
    -
  8. -
  9. Наприкінці,  переконайтесь, що файли HTML та JavaScript збережені та приєднані до  index.html в браузері. Ви маєте побачити щось на кшталт цього:
  10. -
- -
-

Зауважте: Причиною, чому ми ставимо {{htmlelement("script")}} елемент ближче до низу HTML файлу, є те, що HTML завантажується браузером в порядку того, як він прописаний в файлі. Якщо JavaScript завантажено першим, а очікується, що він має впливати на HTML під ним, він може не працювати, якщо JavaScript завантажується раніше, ніж HTML, над яким він має здійснювати якісь маніпуляції. Тож, писати підключення JavaScript наприкінці коду HTML це, зачасту, найкраща стратегія.

-
- -

Що сталось?

- -

Текст вашого заголовка було замінено на "Hello world!", використовуючи JavaScript.  Ви зробили це за допомогою першої функції яку використали, яка має назву {{domxref("Document.querySelector", "querySelector()")}} щоб отримати посилання на ваш заголовок та зберегти його у змінній myHeading. Дуже схоже до того, що ми робили, використовуючи CSS селектори. Коли є потреба щось зробити з елементом, ви маєте спочатку його вибрати.

- -

Після цього, ви присвоюєте значення змінної myHeading властивості {{domxref("Node.textContent", "textContent")}} (яка містить контекст заголовка), а саме "Hello world!".

- -
-

Зауважте: Обидві можливості, що ви використовували перед цим, є частиною Document Object Model (DOM) API, що дозволяє вам маніпулювати документами.

-
- -

Прискорений курс основ

- -

Розгляньмо кілька основних можливостей мови JavaScript, щоб дати вам краще розуміння того, як це все працює. Варто зазначити, що ці речі притаманні всім мовам програмування, тож якщо ви засвоїте цей базис, ви на шляху до того, щоб могти програмувати будь-що!

- -
-

Важливо:  У цій статті, намагайтесь перевіряти приклади коду на своєму ПК у JavaScript консолі. Детальніша інформація про JS-консоль та інші засоби розробника у браузері.

-
- -

Змінні

- -

{{Glossary("Змінна", "Змінні")}} - контейнери, у яких ви можете зберігати значення. Ви можете розпочати з оголошення змінної за допомогою ключового слова var , після якого вказавши ім'я, яким ви хочете назвати змінну:

- -
var myVariable;
- -
-

Зауважте: Крапка з комою(англ. semicolon) в кінці рядка вказує на кінець виразу; ставити крапку з комою обов'язково, коли вам потрібно розділити вирази в одному рядку. Однак, деякі люди вважають гарною практикою ставити в кінці кожного виразу. Є інші правила, коли ви маєте чи не маєте ставити крапку з комою - дивіться Your Guide to Semicolons in JavaScript, щоб дізнатись більше.

-
- -
-

Зауважте: Ви можете називати змінні майже будь-як, проте є певні обмеження (читайте статтю про правила іменування змінних.) Якщо вагаєтесь, можна перевірити ім'я вашої змінної, щоб дізнатись, чи є воно коректним.

-
- -
-

Зауважте: JavaScript це мова чутлива до регістру — myVariable , це не те саме, що myvariable чи MYvariable. Якщо ви маєте проблеми з кодом, можливо, варто перевірити регістр.

-
- -

Після оголошення змінної, ви можете просвоїти їй значення:

- -
myVariable = 'Bob';
- -

Ви можете виконувати обидві операції в одному рядку:

- -
var myVariable = 'Bob';
- -

Ви можете звертатись до змінної, просто вказавши її ім'я:

- -
myVariable;
- -

Після надання змінній значення, ви можете пізніше змінити його:

- -
var myVariable = 'Bob';
-myVariable = 'Steve';
- -

Зауважте, що змінні можуть містити значення різних типів:

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ТипПоясненняПриклад
{{Glossary("String")}}Послідовність символів, відома як рядок. Щоб визначити, що значенням є рядок, ви мусите занести його в лапки.var myVariable = 'Bob';
{{Glossary("Number")}}Число. Без лапок.var myVariable = 10;
{{Glossary("Boolean")}}Значення True/False. Слова true та false є спеціальними словами в JS, та не потребують лапок.var myVariable = true;
{{Glossary("Array")}}Масив. Дозволяє зберігати багато значень за одним посиланням.var myVariable = [1,'Bob','Steve',10];
- Виклик значень елементів здійснюється так:
- myVariable[0], myVariable[1], і т. д.
{{Glossary("Object")}}Загалом, будь-що. Все у JS є об'єктом і може міститись у змінній. Пам'ятайте це.var myVariable = document.querySelector('h1');
- Всі попередні приклади теж.
- -

То навіщо нам потрібні змінні? Щож, змінні потрібні для всіх цікавих у програмуванні речей. Якби змінні не могли змінюватись, то ви не могли б робити ніяких динамічних речей, як то персоналізовані вітальні повідомлення чи зміна відображуваних в галереї зображень.

- -

Коментарі

- -

Ви можете залишати коментарі у JavaScript коді, так само як у CSS:

- -
/*
-Все, що всередині, є коментарем.
-*/
- -

Якщо коментар однорядковий, то простіше виділити його двома слешами:

- -
// Це коментар. Малозмістовний, та все ж.
-
- -

Оператори

- -

{{Glossary("Оператор")}} , це математичний символ, що видає результат,  оснований на двох значення(чи змінних). В таблиці нижче ви можете побачити деякі з напростіших операторів з деякими прикладами, які можете перевірити у JavaScript консолі.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ОператорПоясненняСимволПриклад
Додавання/конкатинаціяВживається для додавання двох чисел чи злиття двох рядків разом.+6 + 9;
- "Hello " + "world!";
Віднімання, множення, діленняТе ж, що і в простій математиці.-, *, / -

9 - 3;
- 8 * 2;  //Множення у JS позначається зірочкою
- 9 / 3;

-
ПрисвоєнняВи вже це бачили; присвоєння змінній значення.=var myVariable = 'Bob';
ПорівнянняПеревіряє чи дві змінні рівні та повертає true/false (Boolean) .===var myVariable = 3;
- myVariable === 4;//false
Заперечення (обернений до порівняння)Повертає логічний вираз, протилежний значенню операнда; true стає false і т.п. Повертає true, якщо значення не рівні.!, !== -

Початковий вираз true, але повертається false , оскільки це заперечене порівняння :

- -

var myVariable = 3;
- !(myVariable === 3);

- -

Ми перевіряємо "чи myVariable НЕ рівне 3". Повертає false, оскільки myVariable РІВНЕ 3.

- -

var myVariable = 3;
- myVariable !== 3;

-
- -

Існує ще багато операторів, які ви можете використовувати, та цих поки достатньо. Відвідайте Expressions and operators, щоб побачити повний список.

- -
-

Зауважте: Змішування типів даних може привести до дивних результатів при виконанні обрахунків, тож будьте обережні. Наприклад, введіть "35" + "25" в своїй консолі. Чому ви отримали не той результат, на який ви очікували? Тому, що лапки перетворили числа в рядки, тож виконалось не додавання, а злиття рядків. Якщо ввести 35 + 25 , то результат буде таким, який ви, можливо, очікували у попередньому випадку.

-
- -

Умови

- -

Умовами називають структури коду, що дозволяють вам перевіряти, повертає вираз true, чи ні, виконуючи певні частини коду, залежно від результату. Поширеною формою умовної конструкції є if ... else.  Наприклад:

- -
var iceCream = 'chocolate';
-if (iceCream === 'chocolate') {
-  alert('Yay, I love chocolate ice cream!');
-} else {
-  alert('Awwww, but chocolate is my favorite...');
-}
- -

Вираз всередині if ( ... ), це порівняння — використовує оператор порівняння щоб співставити значення змінної iceCream з рядком 'chocolate',щоб визначити, чи рівні вони. Якщо true, то запускається перший блок коду. Якщо порівняння не повертає true, то перший блок пропускається, а  другий блок, після виразу else, запускається замість нього.

- -

Функції

- -

{{Glossary("Функція", "Функції")}}, це шлях до збереження функціоналу, який ви плануєте використовувати знову. В такому разі, коли вам потрібна певна процедура, ви можете просто викликати відповідну функцію. Ви вже бачили деякі використання функцій, наприклад:

- -
    -
  1. -
    var myVariable = document.querySelector('h1');
    -
  2. -
  3. -
    alert('hello!');
    -
  4. -
- -

Ці функції, document.querySelector та alert, є вбудованими у браузер, тож ви можете викликати їх коли вам заманеться.

- -

Якщо ви бачите щось, що виглядає, як ім'я змінної, проте має дужки до — () — та після, це функція. Функції зазвичай приймають {{Glossary("Арґумент", "аргументи")}} — дані, що необхідні їм для роботи. Їх записують між дужками, розділяючи комами, якщо є більше одного.

- -

Наприклад, функція alert() створює випадаюче вікно в вікні браузера, але ми маємо задати аргументом рядок, щоб повідомити функції, що саме потрібно написати у випадаючому вікні.

- -

Звісно ж, ви можете описувати власні функції — у цьому прикладі ми напишемо просту функцію, що приймає два числа аргументами та множить їх:

- -
function multiply(num1,num2) {
-  var result = num1 * num2;
-  return result;
-}
- -

Спробуйте запустити функцію в консолі та протестувати з різними аргументами. Наприклад:

- -
multiply(4,7);
-multiply(20,20);
-multiply(0.5,3);
- -
-

Зауважте: Вираз return вказує браузеру, що потрібно повернути змінну result наприкінці роботи функції, щоб вона була доступна до використання. Це необхідно, тому що змінні, що визначені всередині функції, видимі лише в цій же функції. Це називається {{Glossary("Scope", "зоною видимості")}} змінної. (more on variable scoping.)

-
- -

Події

- -

Справжня інтерактивність на сайті вимагає подій. Це структури коду, що стежать за тим, що стається у браузері та запускають певні блоки коду у відповідь. Найпоширеніша подія, це click, що виконується браузером, коли ви клікаєте на щось своєю мишкою. Щоб побачити це, пропишіть наступний код у консолі а потім клацніть на цій сторінці:

- -
document.querySelector('html').onclick = function() {
-    alert('Ouch! Stop poking me!');
-}
- -

Є багато шляхів прив'язати подію до елемента. Тут ми обираємо {{htmlelement("HTML")}} елемент, виставляючи для події onclick на виконання безіменну функцію, яку ми хочемо запустити при натисканні.

- -

Зауважте, що це:

- -
document.querySelector('html').onclick = function() {};
- -

еквівалентне цьому:

- -
var myHTML = document.querySelector('html');
-myHTML.onclick = function() {};
- -

Просто коротше.

- -

Прокачаємо наш зразок сайту

- -

Тепер, коли ми розглянули кілька принципів JavaScript, давайте додамо трохи нових крутих фішок до нашого сайту, щоб подивитись, що ми можемо з ним робити.

- -

Додамо зміну картинок

- -

У цій частині, ми додамо ще зображень засобами DOM API, викорстовуючи JavaScript, щоб переключатись між ними, коли хтось клікне на зображення.

- -
    -
  1. Перш за все, знайдіть ще одне зображення, яке б ви хотіли бачити на своєму сайті. Переконайтесь, що воно має такий же розмір, як і попереднє, або максимально близько до нього за розміром.
  2. -
  3. Збережіть його у папку images .
  4. -
  5. Перейменуйте його на 'firefox2.png' (без лапок, звичайно).
  6. -
  7. Перейдіть до файлу main.js, та введіть цей шматок коду JavaScript. (Якщо ваш  зразок "hello world" досі там, видаліть його.) -
    var myImage = document.querySelector('img');
    -
    -myImage.onclick = function() {
    -    var mySrc = myImage.getAttribute('src');
    -    if(mySrc === 'images/firefox-icon.png') {
    -      myImage.setAttribute ('src','images/firefox2.png');
    -    } else {
    -      myImage.setAttribute ('src','images/firefox-icon.png');
    -    }
    -}
    -
  8. -
  9. Збережіть всі файли та відкрийте index.html у браузері. Тепер, коли ви клікатимете на зображення, воно буде замінюватись іншим.
  10. -
- -

Ви зберігаєте посилання на ваше зображення у змінній myImage. Далі, ви прив'язуєте подію onclick для цієї змінної до функції, що не має імені(анонімної). Зараз, щоразу, коли ви клікнете на цей елемент:

- -
    -
  1. Ви поновлюєте значення атрубуту зображення src .
  2. -
  3. Використовуєте умову для перевірки, чи значення src рівне шляху до першого зображення: -
      -
    1. Якщо так, ви змінюєте значення src на шлях до другого зображення, змушуючи вже друге зображення завантажитись до елемента {{htmlelement("image")}}.
    2. -
    3. Якщо ні (значить зміни вже відбувались), значення src замінюється назад до оригінального зображення, в первинний стан.
    4. -
    -
  4. -
- -

Персоналізоване привітання

- -

Далі ми допишемо шматок коду, що змінить заголовок сторінки на особисте привітання, коли користувач вперше відвідує сторінку. Це повідомлення залишиться, якщо користувач покине сайт та повернеться знову - ми збережемо його засобами Web Storage API. Ми також додамо можливість змінити користувача і, відповідно, привітання, як тільки буде потрібно.

- -
    -
  1. До index.html додамо наступний код, прямо перед елементом {{htmlelement("script")}}: - -
    <button>Change user</button>
    -
  2. -
  3. У файлі main.js, в  кінці вставте наступний код . Він отримує посилання на нову кнопку та заголовок і зберігає їх до нових відповідних змінних: -
    var myButton = document.querySelector('button');
    -var myHeading = document.querySelector('h1');
    -
  4. -
  5. Тепер додамо наступні функції, щоб налаштувати персоналізоване привітання - воно в такому стані не працюватиме, та скоро ми це виправимо: -
    function setUserName() {
    -  var myName = prompt('Please enter your name.');
    -  localStorage.setItem('name', myName);
    -  myHeading.textContent = 'Mozilla is cool, ' + myName;
    -}
    - Ця функція містить функцію prompt(), яка викликає діалогове вікно, подібно до alert(). Функція prompt(), однак, запитує в користувача дані, зберігаючи їх у відповідній змінній одразу після того як буде натиснута кнопка OK. В цьому випадку, ми питаємо в користувача його ім'я. Далі, ми звертаємось до API, що має назву localStorage, що дозволяє нам зберігати дані у браузері, а потім звертатись до них. Ми використовуємо з localStorage функцію setItem(), щоб створити та зберегти дані в 'name', та присвоїти це значення змінній myName, що міститиме дані, введені користувачем. Наприкінці, присвоюємо textContent заголовка рядок, додаючи щойно збережене користувачем ім'я.
  6. -
  7. Після цього, допишемо цей блок if ... else — ми можемо назвати його ініціалізацією, оскільки він структуруватиме логіку сторінки при запуску: -
    if(!localStorage.getItem('name')) {
    -  setUserName();
    -} else {
    -  var storedName = localStorage.getItem('name');
    -  myHeading.textContent = 'Mozilla is cool, ' + storedName;
    -}
    - Блок спочатку використовує оператор заперечення (логічне NOT, представлене "!") щоб перевірити, чи існують дані name. Якщо ні, функція setUserName() запуститься, щоб створити їх. Якщо існують (означає, що вони були створені, коли користувач минулого разу відвідував сайт), ми поновлюємо збережене ім'я за допомогою getItem() та присвоюємо заголовку textContent рядок, додаючи ім'я користувача, так само, як і у setUserName().
  8. -
  9. Для завершення, прив'яжемо подію onclick до кнопки. Коли відбудеться клік, функція setUserName() запуститься. Це дозволить змінювати ім'я користувача, коли виникне в цьому потреба, натиснувши на кнопку: -
    myButton.onclick = function() {
    -  setUserName();
    -}
    -
    -
  10. -
- -

Тепер при, першому відвідуванні сайту, він запитає ваше ім'я, а потім відобразить персоналізоване привітання. Ви в будь-який момент можете змінити ім'я, натиснувши на кнопку. Як бонус, через те, що ім'я зберігається у localStorage, воно залишиться навіть, якщо закрити сторінку, зберігаючи персоналізоване привітання з вашим іменем!

- -

Висновок

- -

Якщо ви слідували всім інструкціям, під кінець у вас мало б вийти щось накшталт цього (якщо ні, то можете подивитись нашу версію тут):

- -

- -

Якщо ви десь застрягли, можете порівняти свою роботу з нашим завершеним зразком коду на Github.

- -

Тут ми ледь пошкрябали велику глибу можливостей JavaScript. Якщо вам сподобалось і ви бажаєте продовжити, перейдіть на наш план вивчення JavaScript.

- -

{{PreviousMenuNext("Learn/Getting_started_with_the_web/CSS_basics", "Learn/Getting_started_with_the_web/Publishing_your_website", "Learn/Getting_started_with_the_web")}}

diff --git a/files/uk/learn/getting_started_with_the_web/publishing_your_website/index.html b/files/uk/learn/getting_started_with_the_web/publishing_your_website/index.html deleted file mode 100644 index a0d1a5e00f..0000000000 --- a/files/uk/learn/getting_started_with_the_web/publishing_your_website/index.html +++ /dev/null @@ -1,111 +0,0 @@ ---- -title: Публікація вашого сайту -slug: Learn/Getting_started_with_the_web/Publishing_your_website -tags: - - Веб-сервер - - Доменне ім'я - - Мова - - Початківцям - - Публікація - - Українська - - Хостинг -translation_of: Learn/Getting_started_with_the_web/Publishing_your_website ---- -
{{LearnSidebar}}
- -
{{PreviousMenuNext("Learn/Getting_started_with_the_web/JavaScript_basics", "Learn/Getting_started_with_the_web/How_the_Web_works", "Learn/Getting_started_with_the_web")}}
- -
-

Коли ви закінчили писати код і організували всі файли, які складають ваш проект, ви маєте викласти все це онлайн, щоб ваш веб-сайт можна було побачити. У цій статті пояснюється, як без особливих зусиль викласти простий веб-сайт онлайн. 

-
- -

Які варіанти?

- -

Публікація сайту є складною темою, переважно тому, що існує дуже багато шляхів як це зробити. У цій статті ми не ставимо за мету розказати про всі можливі варіанти. Натомість ми поговоримо про "плюси" і "мінуси" трьох найбільш популярних стратегій виходу в онлайн з точки зору початківців, а потім розкажемо про один із способів, який нам найбільше підходить на даному етапі. 

- -

Хостинг і доменне ім'я

- -

Якщо ви хочете повністю контролювати ваш опублікований веб-сайт, то вам потрібно купити:

- - - -

Багато професійних веб-сайтів виходять онлайн таким способом. 

- -

На додачу, вам знадобиться програма {{Glossary("FTP", "File Transfer Protocol (FTP)")}} (див. How much does it cost: software), щоб передавати ваші файли на сервер. Є багато різних програм FTP, але загалом для користування вам потрібно залогінитися на ваш веб-сервер (реєстраційні данні, наприклад, ім'я користувача, пароль, ім'я хоста, надаються хостинговою компанією). Потім програма покаже ваші локальні файли і файли на веб-сервері у двох вікнах, так що ви зможете переносити файли туди і назад:

- -

- -

Поради з пошуку хостингу і доменів

- - - -

Онлайн-інструменти GitHub і Google App Engine

- -

Деякі інструменти дозволяють вам публікувати ваш сайт онлайн:

- - - -

На відміну від більшості хостингів, такі інструменти переважно безкоштовні, але з обмеженою кількістю функцій. 

- -

Веб-середовища розробки (IDE), такі як Thimble

- -

Є кілька веб-додатків, які відтворюють середовище веб-розробки онлайн, дозволяючи писати HTML, CSS і JavaScript і відображаючи оброблений результат — і все це у вкладці браузера. Ці інструменти прості у користуванні, чудово підходять для навчання і є безкоштовними (принаймні базові функції), крім того, вони хостять вашу сторінку за її унікальною адресою. Однак, базові функції доволі обмежені, і такі сервіси зазвичай не надають місця для зберігання матеріалів сайту (наприклад, зображень).

- -

Спробуйте покористуватися сервісами нижче і виберіть, який підходить вам найбільше:

- - - -

- -

Публікація через GitHub

- -

Тепер поговоримо про те, як легко опублікувати ваш сайт за допомогою GitHub Pages.

- -
    -
  1. По-перше, зареєструйтеся на GitHub і підтвердіть вашу електронну адресу.
  2. -
  3. Далі, створіть репозиторій, у якому будуть зберігатися фаші файли.
  4. -
  5. На цій сторінці, у полі Repository name введіть username.github.io, де username це ваше ім'я користувача. Наприклад, наш друг bobsmith ввів би bobsmith.github.io.
    - Також поставте "галочку" в полі Initialize this repository with a README і потім клікніть Create repository.
  6. -
  7. Після цього, перетягніть файли вашого сайту в репозиторій і клікніть Commit changes.
    - -
    -

    Примітка: переконайтеся, що ваша папка має файл index.html.

    -
    -
  8. -
  9. -

    Тепер у браузері перейдіть за адресою username.github.io, щоб побачити ваш сайт онлайн. Наприклад, користувач з іменем chrisdavidmills має перейти на chrisdavidmills.github.io.

    - -
    -

    Примітка: публікація вашого сайту онлайн може зайняти кілька хвилин. Якщо ви не побачите його відразу, почекайте кілька хвилин і спробуйте знову. 

    -
    -
  10. -
- -

Щоб дізнатися більше, дивіться GitHub Pages Help.

- -

Додаткові матеріали

- - - -

{{PreviousMenuNext("Learn/Getting_started_with_the_web/JavaScript_basics", "Learn/Getting_started_with_the_web/How_the_Web_works", "Learn/Getting_started_with_the_web")}}

diff --git a/files/uk/learn/getting_started_with_the_web/the_web_and_web_standards/index.html b/files/uk/learn/getting_started_with_the_web/the_web_and_web_standards/index.html deleted file mode 100644 index 9f2b50ed36..0000000000 --- a/files/uk/learn/getting_started_with_the_web/the_web_and_web_standards/index.html +++ /dev/null @@ -1,165 +0,0 @@ ---- -title: Інтернет та веб-стандарти -slug: Learn/Getting_started_with_the_web/The_web_and_web_standards -translation_of: Learn/Getting_started_with_the_web/The_web_and_web_standards -original_slug: Learn/Getting_started_with_the_web/Інтернет_та_веб-стандарти ---- -

{{learnsidebar}}

- -

This article provides some useful background on the Web — how it came about, what web standard technologies are, how they work together, why "web developer" is a great career to choose, and what kinds of best practices you'll learn about through the course.

- -

Brief history of the web

- -

We'll keep this very brief, as there are many (more) detailed accounts of the web's history out there, which we'll link to later on (also try searching for "history of the web" in your favorite search engine and see what you get, if you are interested in more detail.)

- -

In the late 1960s, the US military developed a communication network called ARPANET. This can be considered a forerunner of the Web, as it worked on packet switching, and featured the first implementation of the TCP/IP protocol suite. These two technologies form the basis of the infrastructure that the internet is built on.

- -

In 1980, Tim Berners-Lee (often referred to as TimBL) wrote a notebook program called ENQUIRE, which featured the concept of links between different nodes. Sound familiar?

- -

Fast forward to 1989, and TimBL wrote Information Management: A Proposal and HyperText and CERN; these two publications together provided the background for how the web would work. They received a fair amount of interest, enough to convince TimBL's bosses to allow him to go ahead and create a global hypertext system.

- -

By late 1990, TimBL had created all the things needed to run the first version of the web — HTTP, HTML, the first web browser, which was called WorldWideWeb, an HTTP server, and some web pages to look at.

- -

In the next few years that followed, the web exploded, with multiple browsers being released, thousands of web servers being set up, and millions of web pages being created. OK, that's a very simple summary of what happened, but I did promise you a brief summary.

- -

One last significant data point to share is that in 1994, TimBL founded the World Wide Web Consortium (W3C), an organization that brings together representatives from many different technology companies to work together on the creation of web technology specifications. After that other technologies followed such as CSS and JavaScript, and the web started to look more like the web we know today.

- -

Web standards

- -

Web standards are the technologies we use to build web sites. These standards exist as long technical documents called specifications, which detail exactly how the technology should work. These documents are not very useful for learning how to use the technologies they describe (this is why we have sites like MDN Web Docs), but instead are intended to be used by software engineers to implement these technologies (usually in web browsers).

- -

For example, the HTML Living Standard describes exactly how HTML (all the HTML elements, and their associated APIs, and other surrounding technologies) should be implemented.

- -

Web standards are created by standards bodies — institutions that invite groups of people from different technology companies to come together and agree on how the technologies should work in the best way to fulfill all of their use cases. The W3C is the best known web standards body, but there are others such as the WHATWG (who were responsible for the modernization of the HTML language), ECMA (who publish the standard for ECMAScript, which JavaScript is based on), Khronos (who publish technologies for 3D graphics, such as WebGL), and others.

- -

"Open" standards

- -

One of the key aspects of web standards, which TimBL and the W3C agreed on from the start, is that the web (and web technologies) should be free to both contribute and use, and not encumbered by patents/licensing. Therefore anyone can write the code to build a website for free, and anyone can contribute to the standards creation process, where the specs are written.

- -

Because web technologies are created openly, in collaboration between many different companies, it means that no one company gets to control them, which is a really good thing. You wouldn't want a single company suddenly deciding to put the entire web behind a paywall, or releasing a new version of HTML that everyone has to buy to continue making web sites, or worse still, just deciding they aren't interested any more and just turning it off.

- -

This allows the web to remain a freely-available public resource.

- -

Don't break the web

- -

Another phrase you'll hear around open web standards is "don't break the web" — the idea is that any new web technology that is introduced should be backwards compatible with what went before it (i.e. old web sites will still continue to work), and forwards compatible (future technologies in turn will be compatible with what we currently have). As you go through the learning material presented here, you'll start to learn how this is made possible with some very clever design and implementation work.

- -

Being a web developer is good

- -

The web industry is a very attractive market to enter if you are looking for a job. Recent published figures say that there are currently around 19 million web developers in the world, and that figure is set more than double in the next decade. And at the same time, there is a skill shortage in the industry — so what better time to learn web development?

- -

It isn't all fun and games however — building web sites is a more complicated proposition than it used to be, and you'll have to put some time in to studying all the different technologies you need to use, all the techniques and best practices you need to know, and all the typical patterns you'll be called upon to implement. It'll take you a few months to really start to get into it, and then you'll need to keep learning so that your knowledge stays up-to-date with all the new tools and features that appear on the web platform, and keep practicing and refining your craft.

- -

The only constant is change.

- -

Does this sound hard? Don't worry — we aim to give you everything you need to know to get started, and things will get easier. Once you embrace the constant change and uncertainty of the web, you'll start to enjoy yourself. As a part of the web community, you'll have an entire web of contacts and useful material to help you, and you'll start to enjoy the creative possibilities it brings.

- -

You're a digital creative now. Enjoy the experience, and the potential for earning a living.

- -

Overview of modern web technologies

- -

There are a number of technologies to learn if you want to be a front-end web developer. In this section we will describe them briefly. For a more detailed explanation of how some of them work together, read our article How the web works.

- -

Browsers

- -

You are probably reading these words inside a web browser in this very moment (unless you've printed it out, or are using assistive technology, such as a screenreader to read it out to you). Web browsers are the software programs people use to consume the web, and include Firefox, Chrome, Opera, Safari, and Edge.

- -

HTTP

- -

Hypertext Transfer Protocol, or HTTP, is a messaging protocol that allows web browsers to communicate with web servers (where web sites are stored). A typical conversation goes something like

- -
"Hello web server. Can you give me the files I need to render bbc.co.uk"?
-
-"Sure thing web browser — here you go"
-
-[Downloads files and renders web page]
- -

The actual syntax for HTTP messages (called requests and responses) is not that human-readable, but this gives you the basic idea.

- -

HTML, CSS, and JavaScript

- -

HTML, CSS, and JavaScript are the main three technologies you'll use to build a website:

- - - -

Tooling

- -

Once you've learned the "raw" technologies that can be used to build web pages (such as HTML, CSS, and JavaScript), you'll soon start to come across various tools that can be used to make your work easier or more efficient. Examples include:

- - - -

Server-side languages and frameworks

- -

HTML, CSS, and JavaScript are front-end (or client-side) languages, which means they are run by the browser to produce a website front-end that your users can use.

- -

There are another class of languages called back-end (or server-side) languages, meaning that they are run on the server before the result is then sent to the browser to be displayed. A typical use for a server-side language is to get some data out of a database and generate some HTML to contain the data, before then sending the HTML over to the browser to display it to the user.

- -

Example server-side languages include ASP.NET, Python, PHP, and NodeJS.

- -

Web best practices

- -

We have briefly talked about the technologies that you'll use to build websites. Now let's discuss the best practices you should employ to make sure you are using those technologies in the best way that you can.

- -

When doing web development, the main cause of uncertainty comes from the fact that you don't know what combination of technology each user will use to view your web site:

- - - -

Because you don't know exactly what your users will use, you need to design defensively — make your web site as flexible as possible, so that all of the above users can make use of it, even if they might not all get the same experience. In short, we are trying to make the web work for all, as much as possible.

- -

You'll come across the below concepts at some point in your studies.

- - - -

See also

- - diff --git a/files/uk/learn/getting_started_with_the_web/what_will_your_website_look_like/index.html b/files/uk/learn/getting_started_with_the_web/what_will_your_website_look_like/index.html deleted file mode 100644 index 3a64823681..0000000000 --- a/files/uk/learn/getting_started_with_the_web/what_will_your_website_look_like/index.html +++ /dev/null @@ -1,118 +0,0 @@ ---- -title: Який вигляд матиме ваш сайт? -slug: Learn/Getting_started_with_the_web/What_will_your_website_look_like -tags: - - Вміст - - Дизайн - - Навчання - - Початківець - - матеріали - - планування - - шрифти -translation_of: Learn/Getting_started_with_the_web/What_will_your_website_look_like ---- -
{{LearnSidebar}}
- -
{{PreviousMenuNext("Learn/Getting_started_with_the_web/Installing_basic_software", "Learn/Getting_started_with_the_web/Dealing_with_files", "Learn/Getting_started_with_the_web")}}
- -
-

В Який вигляд матиме ваш сайт? ми розглянемо, яку попередню планувальну та дизайнерську роботу потрібно зробити до того, як ви почнете писати код. Яку інформацію надаватиме сайт, які шрифти та кольори використати та що фактично робитиме веб-сторінка. 

-
- -

Спершу планування

- -

Перш, ніж щось робити, потрібні ідеї. Що саме ваш сайт має робити? Він може що завгодно, але для першого разу краще обрати щось простіше. Почнемо з простої веб-сторінки зі заголовком, зображенням і кількома абзацами. 

- -

Для початку дайте відповідь на запитання:

- -
    -
  1. Про що ваш сайт? Ви любите собак, Нью-Йорк, Пекмена?
  2. -
  3. Яку інформацію по темі ви маєте надати? Напишіть заголовок і кілька абзаців і подумайте щодо зображення для них. 
  4. -
  5. Який вигляд матиме ваш сайт у загальних простих термінах? Який колір тла? Які шрифти підійдуть: ділові, коміксні, грубі та крикливі, прості?
  6. -
- -
-

Примітка: складні проекти вимагають детальної документації, включно з вказаними конкретно кольорами, шрифтами, відстанями між частинами контенту, стилем тексту тощо. Іноді це називається посібником зі стилю чи бренд-буком.

-
- -

Ескіз вашого дизайну

- -

Візьміть олівець і папір та приблизно замалюйте  вигляд вашого сайту. Для простої сторінки не варто малювати багато, але вам потрібно виробити звичку це робити. Це справді допомагає — вам не потрібно бути Ван Гогом!

- -

- -
-

Примітка: навіть у випадку справжніх складних сайтів команда дизайнерів починає з попередніх ескізів на папері, а вже потім робить цифрові макети у графічному редакторі чи онлайн-сервісах. 

- -

Команди веб-розробників зазвичають мають графічного дизайнера і дизайнера по {{Glossary("ДК", "досвіду користування")}}. Графічні дизайнери відповідають за візуальну складову сайту. Дизайнери по досвіду користування — за те, як відвідувачі будуть користовуватись сайтом та взаємодіяти з ним. 

-
- -

Вибір матеріалів

- -

На цьому етапі починіть працювати над вмістом, який потім з'явиться на вашій веб-сторінці.

- -

Текст

- -

Попередньо ви вже маєте свої тексти та назви. Тримайте їх напоготові. 

- -

Кольорова тема

- -

Щоб вибрати колір, який вам подобається, скористайтеся Color Picker. Коли ви клацнете по кольору, ви побачите незвичну комбінацію з шести символів, на зразок #660066. Це — hex-код (від hexadecimal — шістнадцяткова системи числення), що відповідає вибраному кольору. Збережіть десь.

- -

- -

Зображення

- -

Щоб вибрати зображення, пошукайте щось на Google Images.

- -
    -
  1. Коли ви знайдете потрібне, то кляцніть по зображенню. 
  2. -
  3. Натисніть кнопку «Переглянути зображення».
  4. -
  5. На наступній сторінці, правою кнопкою миші кляцніть по зображенню, виберіть «Зберегти як...» і  десь його збережіть. Або скопіюйте веб-адресу зображення, щоб скористатись потім.
  6. -
- -

- -

- -
-

Примітка: більшість зображень у мережі, включно з Google Images, захищені авторським правом. Щоб не порушити його, скористайтеся фільтром прав: 1) клацніть по Інструменти, а потім по 2) Права на використання:

- -

-
- -

Шрифт

- -

Вибір шрифту:

- -
    -
  1. Щоб знайти шрифт, який вам подобається, зайдіть на Google Fonts і погортайте сторінку. Також можете скористатися фільтром справа.
  2. -
  3. Натисніть значок "плюс" (Select this font) поруч із потрібним шрифтом.
  4. -
  5. Натисніть кнопку «* Family Selected» на панелі в низу сторінки («*» залежить від кількості вибраних шрифтів).
  6. -
  7. У спливаючому вікні побачите рядки коду. Можете скопіювати їх, щоб зберегти на потім. 
  8. -
- -

- -

 

- -

- -

{{PreviousMenuNext("Learn/Getting_started_with_the_web/Installing_basic_software", "Learn/Getting_started_with_the_web/Dealing_with_files", "Learn/Getting_started_with_the_web")}}

- -

 

- -

У цьому розділі

- - - -

 

diff --git a/files/uk/learn/html/index.html b/files/uk/learn/html/index.html deleted file mode 100644 index 708f04d792..0000000000 --- a/files/uk/learn/html/index.html +++ /dev/null @@ -1,54 +0,0 @@ ---- -title: HTML -slug: Learn/HTML -translation_of: Learn/HTML ---- -
{{LearnSidebar}}
- -

Щоб створювати сайти, спершу слід вивчити {{Glossary('HTML')}} — це фундаментальна технологія, за допомогою якої створюється структура веб-сторінки. HTML використовується, щоб вказати тип вмісту на сторінці: абзац, список, заголовок, посилання, зображення, мультимедіа-плеєр, формуляр або один з багатьох інших елементів.

- -

Шлях навчання

- -

Найкраще розпочати вивчення веб-розробки з HTML. Почніть зі Вступу до HTML. Після цього можна розпочати вивчення більш складних тем, наприклад:

- - - -

Для початку навчання необхідно мати щонайменше базові знання комп'ютера та досвід в користуванні інтернетом (перегляд сайтів, відео та аудіо). Також потрібно мати основні робочі інструменти описані в розділі Встановлення основного програмного забезпечення та знати, як створювати та керувати файлами, це описано в розділі Робота з файлами. Ці два розділи знаходяться в модулі для початківців Початок роботи з WEB.

- -

Перед вивченням рекомендується ознайомится зі статтею Початок роботи з WEB, але це необов'язково. Багато матеріалу зі статті Основи HTML більш детально охоплює модуль Вступ до HTML.

- -

Модулі

- -

Ця тема містить модулі, які рознашовані в порядку вивчення. Слід розпочати навчання від першого з них:

- -
-
Вступ до HTML
-
Цей модуль надає базові знання для подальщої роботи. Він знайомить з важливими поняттями синтаксису та вчить застосовувати код HTML до тексту, створювати посилання, та створювати структуру сторінки за допомогою HTML.
-
Вставки мультимедіа
-
Цей модуль навчить використовувати HTML для вставки мультимедіа-файлів на вашу сторінку. Ви навчитеся вставляти на вашу сторінку зображення, відео, аудіо та навіть цілі сторінки.
-
Таблиці HTML
-
Відображення табличних даних на сторінці зрозумілим, {{glossary("Accessibility", "доступним")}} шляхом, може стати викликом. Цей модуль охоплює основи розмітки таблиць, а також більш складні понняття, наприклад, додавання заголовків колонок.
-
Формуляри HTML
-
Формуляри є дуже важливою частиною Web — вони забезпечують переважну частину функціональності для взаємодії з веб-сайтом, наприклад, реєстрація чи вхід, залишення коментаря, покупка продуктів та інше. Цей модуль навчить вас створювати формуляри, якими користується клієнт.
-
- -

Вирішення основних проблем HTML

- -

Вирішення основних проблем HTML містить посилання на секції, в яких пояснюється як використовувати HTML для вирішення основних проблем пристворенні веб-сторінки: робота з заголовками, додавання зображень чи відео, підкреслення вмісту, ствонення простого формуляру тощо.

- -

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

- -
-
-
     
-
     Веб форми
-
Цей модуль містить низку статей, які допоможуть вам засвоїти основи веб-форм. Веб-форми - це дуже потужний інструмент для взаємодії з користувачами - найчастіше вони використовуються для збору даних від користувачів або дозволяють їм контролювати користувальницький інтерфейс. Однак з історичних та технічних причин не завжди очевидно, як використати їх на повний потенціал. Ми охопимо всі основні аспекти веб-форм, включаючи розміщення їх структури HTML, стилі управління формами, перевірку даних форми та подання даних на сервер.
-
-
     HTML (HyperText Markup Language) на MDN
-
Основа документації HTML на MDN. Вона містить детальні описи елементу (тега) та його атрибути — якщо ви хочете знати, які атрибути та значення може мати елемент, вам варто ознайомитися з цим розділом.
-
-
diff --git a/files/uk/learn/html/introduction_to_html/creating_hyperlinks/index.html b/files/uk/learn/html/introduction_to_html/creating_hyperlinks/index.html deleted file mode 100644 index 4d333ac64a..0000000000 --- a/files/uk/learn/html/introduction_to_html/creating_hyperlinks/index.html +++ /dev/null @@ -1,322 +0,0 @@ ---- -title: Створення гіперпосилань -slug: Learn/HTML/Introduction_to_HTML/Creating_hyperlinks -translation_of: Learn/HTML/Introduction_to_HTML/Creating_hyperlinks ---- -
{{LearnSidebar}}
- -
{{PreviousMenuNext("Learn/HTML/Introduction_to_HTML/HTML_text_fundamentals", "Learn/HTML/Introduction_to_HTML/Advanced_text_formatting", "Learn/HTML/Introduction_to_HTML")}}
- -

Гіперпосилання дійсно важливі — це те що робить Інтернет інтернетом. Ця стаття показує необхідний синтаксис для створення гіперпосилання а також практику їхнього використання. 

- - - - - - - - - - - - -
Передумови:Базове знання HTML (Getting started with HTML). Форматування тексту (HTML text fundamentals).
Мета:Вивчити як користуватись гіперпосиланнями ефективно і з'єднювати декілька файлів разом.
- -

Що таке гіперпосилання?

- -

Гіперпосилання це одне з найбільш вражаючих інновацій, що Інтернет може нам запропонувати. Хоча, вони були ще з самогу початку Інтернету, але вони це те що робить Інтернет Інтернетом — вони дозволяють зв'язати наші документи з будь-яким іншим документом (або іншим ресурсом), ми також можем зробити посилання на конкретні частини документу, і можемо зробити наші документи, (сайти, ресурси) доступними використовуючи просту адресу (на відміну від звичайних програм, які повинні буди встановлені і налаштовані). Практично будь-який контент може бути перетворений в посилання. Клік на таке посилання переведе користувача на іншу веб-адресу ({{glossary("URL")}}).

- -
-

Примітка: URL може посилатись на HTML файли, текстові файли, зображення, текстові документи, відео і аудіо файли, та будь-які інші ресурси які можуть знаходитись в Інтернеті. Якщо браузер не знає як відобразити або опрацювати файл, він запитає у користувача чи він хоче відкрити файл (в такому випадку процес відкриття і обробки файлу передається до відповідної програми) або завантажити файл (в такому випадку користувач може повернутись до завантаженого файлу пізніше.)

-
- -

Домашня сторінка BBC, для прикладу, містить велику кількість посилань нетільки на новини, але також на різні розділи сайту (навігація), сторінки логіну та реєстрації (інструменти користувача) та інші.

- -

frontpage of bbc.co.uk, showing many news items, and navigation menu functionality

- - - -

A basic link is created by wrapping the text (or other content, see {{anch("Block level links")}}) you want to turn into a link inside an {{htmlelement("a")}} element, and giving it an {{htmlattrxref("href", "a")}} attribute (also known as a Hypertext Reference , or target) that will contain the web address you want the link to point to.

- -
<p>I'm creating a link to
-<a href="https://www.mozilla.org/en-US/">the Mozilla homepage</a>.
-</p>
- -

This gives us the following result:

- -

I'm creating a link to the Mozilla homepage.

- -

Adding supporting information with the title attribute

- -

Another attribute you may want to add to your links is title; this is intended to contain supplementary useful information about the link, such as what kind of information the page contains, or things to be aware of. For example:

- -
<p>I'm creating a link to
-<a href="https://www.mozilla.org/en-US/"
-   title="The best place to find more information about Mozilla's
-          mission and how to contribute">the Mozilla homepage</a>.
-</p>
- -

This gives us the following result (the title will come up as a tooltip when the link is hovered over):

- -

I'm creating a link to the Mozilla homepage.

- -
-

Note: A link title is only revealed on mouse hover, which means that people relying on keyboard controls to navigate web pages will have difficulty accessing title information. If a title's information is truly important to the usability of page, then you should present it in a manner that will be accessible to all users, for example by putting it in the regular text.

-
- - - -

Active learning time: we'd like you to create an HTML document using your local code editor (our getting started template would do just fine.)

- - - - - -

As mentioned before, you can turn just about any content into a link, even block level elements. If you had an image you wanted to turn into a link, you could just put the image between <a></a> tags.

- -
<a href="https://www.mozilla.org/en-US/">
-  <img src="mozilla-image.png" alt="mozilla logo that links to the mozilla homepage">
-</a>
- -
-

Note: You'll find out a lot more about using images on the Web in a future article.

-
- -

A quick primer on URLs and paths

- -

To fully understand link targets, you need to understand URLs and file paths. This section gives you the information you need to achieve this.

- -

A URL, or Uniform Resource Locator is simply a string of text that defines where something is located on the Web. For example Mozilla's English homepage is located at https://www.mozilla.org/en-US/.

- -

URLs use paths to find files. Paths specify where in the filesystem the file you are interested in is located. Let's look at a simple example of a directory structure (see the creating-hyperlinks directory.)

- -

A simple directory structure. The parent directory is called creating-hyperlinks and contains two files called index.html and contacts.html, and two directories called projects and pdfs, which contain an index.html and a project-brief.pdf file, respectively

- -

The root of this directory structure is called creating-hyperlinks. When working locally with a web site, you will have one directory that the whole site goes inside. Inside the root, we have an index.html file and a contacts.html. In a real website, index.html would be our home page or landing page (a web page that serves as the entry point for a website or a particular section of a website.).

- -

There are also two directories inside our root — pdfs and projects. These each have a single file inside them — a PDF (project-brief.pdf) and an index.html file, respectively. Note how you can quite happily have two index.html files in one project as long as they are in different locations in the filesystem. Many web sites do. The second index.html would perhaps be the main landing page for project-related information.

- - - -
-

Note: You can combine multiple instances of these features into complex URLs, if needed, e.g. ../../../complex/path/to/my/file.html.

-
- -

Document fragments

- -

It is possible to link to a specific part of an HTML document (known as a document fragment), rather than just to the top of the document. To do this you first have to assign an {{htmlattrxref("id")}} attribute to the element you want to link to. It normally makes sense to link to a specific heading, so this would look something like the following:

- -
<h2 id="Mailing_address">Mailing address</h2>
- -

Then to link to that specific id, you'd include it at the end of the URL, preceded by a hash/pound symbol, for example:

- -
<p>Want to write us a letter? Use our <a href="contacts.html#Mailing_address">mailing address</a>.</p>
- -

You can even use the document fragment reference on its own to link to another part of the same document:

- -
<p>The <a href="#Mailing_address">company mailing address</a> can be found at the bottom of this page.</p>
- -

Absolute versus relative URLs

- -

Two terms you'll come across on the Web are absolute URL and relative URL:

- -

absolute URL: Points to a location defined by its absolute location on the web, including {{glossary("protocol")}} and {{glossary("domain name")}}. So for example, if an index.html page is uploaded to a directory called projects that sits inside the root of a web server, and the web site's domain is http://www.example.com, the page would be available at http://www.example.com/projects/index.html (or even just http://www.example.com/projects/, as most web servers just look for a landing page such as index.html to load if it is not specified in the URL.)

- -

An absolute URL will always point to the same location, no matter where it is used.

- -

relative URL: Points to a location that is relative to the file you are linking from, more like what we looked at in the previous section. For example, if we wanted to link from our example file at http://www.example.com/projects/index.html to a PDF file in the same directory, the URL would just be the filename — e.g. project-brief.pdf — no extra information needed. If the PDF was available in a subdirectory inside projects called pdfs, the relative link would be pdfs/project-brief.pdf (the equivalent absolute URL would be http://www.example.com/projects/pdfs/project-brief.pdf.)

- -

A relative URL will point to different places depending on where the file it is used inside is located — for example if we moved our index.html file out of the projects directory and into the root of the web site (the top level, not in any directories), the pdfs/project-brief.pdf relative URL link inside it would now point to a file located at http://www.example.com/pdfs/project-brief.pdf, not a file located at http://www.example.com/projects/pdfs/project-brief.pdf.

- -

Of course, the location of the project-brief.pdf file and pdfs folder won't suddenly change because you moved the index.html file — this would make your link point to the wrong place, so it wouldn't work if clicked on. You need to be careful!

- - - -

There are some best practices to follow when writing links. Let's look at these now.

- - - - - -

It's easy to throw links up on your page. That's not enough. We need to make our links accessible to all readers, regardless of their current context and which tools they prefer. For example:

- - - -

Let's look at a specific example:

- -

Good link text: Download Firefox

- -
<p><a href="https://firefox.com/">
-  Download Firefox
-</a></p>
- -

Bad link text: Click here to download Firefox

- -
<p><a href="https://firefox.com/">
-  Click here
-</a>
-to download Firefox</p>
-
- -

Other tips:

- - - - - -

From the description above, you might think that it is a good idea to just use absolute links all the time; after all, they don't break when a page is moved like relative links. However, you should use relative links wherever possible when linking to other locations within the same website (when linking to another website, you will need to use an absolute link):

- - - -

Linking to non-HTML resources — leave clear signposts

- -

When linking to a resource that will be downloaded (like a PDF or Word document) or streamed (like video or audio) or has another potentially unexpected effect (opens a popup window, or loads a Flash movie), you should add clear wording to reduce any confusion. It can be quite annoying for example:

- - - -

Let's look at some examples, to see what kind of text can be used here:

- -
<p><a href="http://www.example.com/large-report.pdf">
-  Download the sales report (PDF, 10MB)
-</a></p>
-
-<p><a href="http://www.example.com/video-stream/" target="_blank">
-  Watch the video (stream opens in separate tab, HD quality)
-</a></p>
-
-<p><a href="http://www.example.com/car-game">
-  Play the car game (requires Flash)
-</a></p>
- -

Use the download attribute when linking to a download

- -

When you are linking to a resource that is to be downloaded rather than opened in the browser, you can use the download attribute to provide a default save filename. Here's an example with a download link to the latest Windows version of Firefox:

- -
<a href="https://download.mozilla.org/?product=firefox-latest-ssl&os=win64&lang=en-US"
-   download="firefox-latest-64bit-installer.exe">
-  Download Latest Firefox for Windows (64-bit) (English, US)
-</a>
- -

Active learning: creating a navigation menu

- -

For this exercise, we'd like you to link some pages together with a navigation menu to create a multi-page website. This is one common way in which a website is created — the same page structure is used on every page, including the same navigation menu, so when links are clicked it gives the impression that you are staying in the same place, and different content is being brought up.

- -

You'll need to make local copies of the following four pages, all in the same directory (see also the navigation-menu-start directory for a full file listing):

- - - -

You should:

- -
    -
  1. Add an unordered list in the indicated place on one page, containing the names of the pages to link to. A navigation menu is usually just a list of links, so this is semantically ok.
  2. -
  3. Turn each page name into a link to that page.
  4. -
  5. Copy the navigation menu across to each page.
  6. -
  7. On each page, remove just the link to that same page — it is confusing and pointless for a page to include a link to itself, and the lack of a link acts a good visual reminder of what page you are currently on.
  8. -
- -

The finished example should end up looking something like this:

- -

An example of a simple HTML navigation menu, with home, pictures, projects, and social menu items

- -
-

Note: If you get stuck, or are not sure if you have got it right, you can check the navigation-menu-marked-up directory to see the correct answer.

-
- - - -

It is possible to create links or buttons that, when clicked, open a new outgoing email message rather than linking to a resource or page. This is done using the {{HTMLElement("a")}} element and the mailto: URL scheme.

- -

In its most basic and commonly used form, a mailto: link simply indicates the email address of the intended recipient. For example:

- -
<a href="mailto:nowhere@mozilla.org">Send email to nowhere</a>
-
- -

This results in a link that looks like this: Send email to nowhere.

- -

In fact, the email address is even optional. If you leave it out (that is, your {{htmlattrxref("href", "a")}} is simply "mailto:"), a new outgoing email window will be opened by the user's mail client that has no destination address specified yet. This is often useful as "Share" links that users can click to send an email to an address of their choosing.

- -

Specifying details

- -

In addition to the email address, you can provide other information. In fact, any standard mail header fields can be added to the mailto URL you provide. The most commonly used of these are "subject", "cc", and "body" (which is not a true header field, but allows you to specify a short content message for the new email). Each field and its value is specified as a query term.

- -

Here's an example that includes a cc, bcc, subject and body:

- -
<a href="mailto:nowhere@mozilla.org?cc=name2@rapidtables.com&bcc=name3@rapidtables.com&subject=The%20subject%20of%20the%20email&body=The%20body%20of%20the%20email">
-  Send mail with cc, bcc, subject and body
-</a>
- -
-

Note: The values of each field must be URL-encoded, that is with non-printing characters (invisible characters like tabs, carriage returns, and page breaks) and spaces percent-escaped. Also note the use of the question mark (?) to separate the main URL from the field values, and ampersands (&) to separate each field in the mailto: URL. This is standard URL query notation. Read The GET method to understand what URL query notation is more comonly used for.

-
- -

Here are a few other sample mailto URLs:

- - - -

Summary

- -

That's it for links, for now anyway! You'll return to links later on in the course when you start to look at styling them. Next up for HTML, we'll return to text semantics and look at some more advanced/unusual features that you'll find useful — Advanced text formatting is your next stop.

- -

{{PreviousMenuNext("Learn/HTML/Introduction_to_HTML/HTML_text_fundamentals", "Learn/HTML/Introduction_to_HTML/Advanced_text_formatting", "Learn/HTML/Introduction_to_HTML")}}

- -

In this module

- - diff --git a/files/uk/learn/html/introduction_to_html/debugging_html/index.html b/files/uk/learn/html/introduction_to_html/debugging_html/index.html deleted file mode 100644 index 1c6e107e7b..0000000000 --- a/files/uk/learn/html/introduction_to_html/debugging_html/index.html +++ /dev/null @@ -1,186 +0,0 @@ ---- -title: Дебаґінг HTML -slug: Learn/HTML/Introduction_to_HTML/Debugging_HTML -tags: - - HTML - - Розмітка - - валідатор - - веб-сторінок - - виправлення - - дебаґінг - - для початківців - - кодинг - - перевірка - - помилок - - уроки - - як перевірити -translation_of: Learn/HTML/Introduction_to_HTML/Debugging_HTML ---- -
{{LearnSidebar}}
- -
{{PreviousMenuNext("Learn/HTML/Introduction_to_HTML/Document_and_website_structure", "Learn/HTML/Introduction_to_HTML/Marking_up_a_letter", "Learn/HTML/Introduction_to_HTML")}}
- -

Написати HTML добре, але що, якщо щось піде не так, і ви не можете з'ясувати, де помилка в коді? Ця стаття представить вам деякі інструменти, які допоможуть вам знайти та виправити помилки в HTML.

- - - - - - - - - - - - -
Передумови:Знайомство з HTML, як наведено в прикладі Початок роботи з HTML, Основи HTML та Створення гіперпосилань.
Мета:Дізнатись основи використання інструментів налагодження (дебаґінга), щоб знайти проблеми в HTML.
- -

Дебаґінг не страшний

- -

Коли ви пишете код певного виду, все, як правило, добре, доки не настає страшний момент, коли виникла помилка - ви зробили щось не так, тому ваш код не працює - або взагалі, або не зовсім так, як ви хотіли. Наприклад, наведене нижче показує помилку при спробі {{glossary("compile")}} просту програму, написану на мові "Rust".

- -

A console window showing the result of trying to compile a rust program with a missing quote around a string in a print statement. The error message reported is error: unterminated double quote string. Тут повідомлення про помилку досить легко зрозуміти — "неузгоджений подвійний ланцюг кодування". Якщо ви подивитеся на цей список, можливо, ви побачите, як це зробити println!(Hello, world!"); може логічно не вистачати подвійної цитати. Проте повідомлення про помилку можуть швидко ускладнюватися і менш легко інтерпретуватися, коли програми стають більшими, і навіть прості випадки можуть трохи налякати того, хто не знає про Руст.

- -

Дебаґінг не повинен бути страшним - це ключ до комфортного написання і налагоджування будь-якої мови програмування або коду, знайомство як з мовою так і з інструментами.

- -

HTML та дебаґінг

- -

HTML не так складно зрозуміти, як Rust. HTML не компілюється в іншу форму, перш ніж браузер проаналізує його та покаже результат (він інтерпретується, а не компілюється). І синтаксис HTML {{glossary("element")}} набагато легше зрозуміти, ніж "справжню мову програмування", таку як Rust, {{glossary("JavaScript")}}, або {{glossary("Python")}}. Спосіб, за допомогою якого веб-браузери аналізують HTML є набагато більш дозвільним, ніж мови програмування, що є і добре, і погано одночасно.

- -

Дозвільний код

- -

Отже, що ми маємо на увазі під дозвільним? Ну, звичайно, коли ви робите щось неправильне в коді, є два основних типи помилок, які ви зустрінете:

- - - -

Сам по собі HTML не страждає від синтаксичних помилок, оскільки браузери розуміють його належним чином, що означає, що сторінка все одно відображатиметься, навіть якщо є синтаксичні помилки. Браузери мають вбудовані правила, які визначають, як інтерпретувати неправильно написану розмітку, тому ви все одно щось отримаєте, навіть якщо це не те, що ви очікували. Це, звичайно, може бути проблемою!

- -
-

Примітка: Розібратись в HTML легко, тому що коли веб-мережа була тільки створена, було вирішено, що надання користувачам можливостей публікувати свій вміст було важливішим, ніж переконатися, що синтаксис абсолютно правильний. Веб-мережа, ймовірно, не була б настільки популярною, як є сьогодні, якщо б вона була більш складною від самого початку.

-
- -

Активне навчання: вивчення допустимого коду

- -

Настав час вивчити дозвільний характер HTML-коду.

- -
    -
  1. По-перше, завантажте наш debug-example demo і збережіть його локально. Ця демоверсія спеціально написана, щоб мати деякі помилки в ньому, щоб ми могли їх досліджувати (розмітка HTML, як наголошується, погано сформована, на відміну від добре сформованої).
  2. -
  3. Далі відкрийте його в браузері. Ви побачите щось подібне:A simple HTML document with a title of HTML debugging examples, and some information about common HTML errors, such as unclosed elements, badly nested elements, and unclosed attributes.
  4. -
  5. Це відразу не виглядає чудово; давайте подивимося на вихідний код, щоб побачити, чи зможемо ми зрозуміти, чому (показано лише вміст body); -
    <h1>Приклади HTML дебаґінга</h1>
    -
    -<p>Що викликає помилки в HTML?
    -
    -<ul>
    -  <li>Незамкнені елементи: Якщо елемент <strong> не закрито належним чином,
    -      його ефект може поширюватися на ті області, які ви не мали наміру ним огортати.
    -
    -  <li>Погано вкладені елементи:  правильне вставлення елементів також дуже важливо
    -      для правильного кодування. <strong>strong <em>виділено strong?</strong>
    -      що це таке?</em>
    -
    -  <li>Незакриті атрибути: Інше поширене джерело HTML-проблем.
    -      Давайте розглянемо приклад: <a href="https://www.mozilla.org/>Посилання
    -      на домашню сторінку Mozilla</a>
    -</ul>
    -
  6. -
  7. Давайте розглянемо проблеми: -
      -
    • {{htmlelement("p","paragraph")}} та {{htmlelement("li","list item")}} елементи не мають закриваючих тегів. Дивлячись на зображення вище, це, здається, не вплинуло на рендеринг розмітки надто погано, оскільки легко визначити, де повинен закінчуватися один елемент, а інший повинен починатися.
    • -
    • Перший {{htmlelement("strong")}} елемент не має закриваючого тега. Це дещо ускладнює, оскільки важко сказати, де елемент повинен закінчуватися. Фактично, всю решту тексту було виділено.
    • -
    • Цей розділ погано вкладено: <strong>strong <em>виділено strong?</strong> що це таке?</em>. Складно сказати, як це було інтерпретовано із-за попередньої проблеми.
    • -
    • {{htmlattrxref("href","a")}} Значення атрибута має відсутні подвійні лапки закриття. Це, здається, викликало найбільшу проблему - посилання взагалі не відображається.
    • -
    -
  8. -
  9. Тепер давайте подивимось на розмітку браузера, на відміну від розмітки в вихідному коді. Для цього ми можемо використовувати інструменти розробника веб-браузера. Якщо ви не знайомі з використанням інструментів розробника веб-браузера, перегляньте кілька хвилин Discover browser developer tools.
  10. -
  11. В інспекторі DOM ви можете дізнатись, як виглядає виділена розмітка:The HTML inspector in Firefox, with our example's paragraph highlighted, showing the text "What causes errors in HTML?" Here you can see that the paragraph element has been closed by the browser.
  12. -
  13. Використовуючи інспектора DOM, давайте розглянемо наш код докладно, щоб побачити, як веб-браузер намагався виправити наші помилки HTML (ми зробили огляд у Firefox, інші сучасні браузери повинні дати той самий результат): -
      -
    • У параграфах та пунктах списку були додані закриті теги.
    • -
    • Не зрозуміло, де слід закрити перший елемент <strong>, тому браузер обгорнув кожен окремий блок тексту своїм тегом strong, аж донизу документа!
    • -
    • Неправильне вкладення було виправлено браузером, як це: -
      <strong>strong
      -  <em>виділено strong?</em>
      -</strong>
      -<em> що це таке?</em>
      -
    • -
    • Посилання з відсутніми подвійними лапками повністю вилучено. Останній елемент списку виглядає так : -
      <li>
      -  <strong>Незакриті атрибути: Інше поширене джерело проблем з HTML.
      -  Давайте подивимось на приклад: </strong>
      -</li>
      -
    • -
    -
  14. -
- -

Валідація HTML

- -

Таким чином, ви можете побачити з наведеного вище прикладу, що ви дійсно хочете, щоб ваш HTML був добре сформований! Але як? У невеликому прикладі, подібному до вищенаведенного, легко пройти по строках та знайти помилки, а як при величезному, складному HTML-документі?

- -

Найкраща стратегія полягає в тому, щоб запустити HTML-сторінку за допомогою Markup Validation Service — сервісу, що створений та підтримується W3C, організацією, яка стежить за специфікаціями, що визначають HTML, CSS та інші веб-технології. Ця веб-сторінка приймає HTML-документ у вигляді входу, проходить через нього і дає вам звіт, в якому показує, що неправильно з вашим HTML.

- -

The HTML validator homepage

- -

Щоб вказати HTML для перевірки, ви можете надати цьому сервісу адресу свого сайту, завантажити файл HTML або безпосередньо ввести якийсь HTML-код.

- -

Активне навчання: перевірка документа HTML

- -

Давайте спробуємо це з нашим sample document.

- -
    -
  1. По-перше, завантажте Markup Validation Service в одній із вкладок браузера, якщо вона ще не відкрита.
  2. -
  3. Перейдіть на вкладку Validate by Direct Input (Перевірити за прямим введенням).
  4. -
  5. Скопіюйте весь приклад коду документу (а не тільки body) і вставте його у велику область тексту, показану в Markup Validation Service.
  6. -
  7. Натисніть кнопку Check (Перевірити).
  8. -
- -

В результаті з'явиться список помилок та інша інформація.

- -

A list of of HTML validation results from the W3C markup validation service

- -

Інтерпретація повідомлень про помилки

- -

Повідомлення про помилки зазвичай корисні, але іноді вони не настільки корисні; трохи попрактикувавшись, ви зможете розібратися, як інтерпретувати їх, щоб виправити ваш код. Давайте пройдемось по повідомленням про помилку і що вони означають. Ви побачите, що кожне повідомлення містить номер рядка та стовпчика, які допоможуть легко знайти помилку.

- - - -

Якщо ви не можете з'ясувати, що означає кожне повідомлення про помилку, не хвилюйтеся - хороша ідея - спробувати одночасно виправити кілька помилок. Потім спробуйте повторно підтвердити свій HTML, щоб показати, які помилки залишаються. Іноді виправлення попередньої помилки також позбуває інших повідомлень про помилку - деякі помилки часто можуть бути викликані однією проблемою, що тягне інші, як ефект доміно.

- -

Ви будете знати, коли всі ваші помилки виправлені, коли ви побачите наступний банер у вашому виводі:

- -

Banner that reads "The document validates according to the specified schema(s) and to additional constraints checked by the validator."

- -

Тобто, "Документ перевірений відповідно до зазначених схем та додаткових обмежень, перевірених валідатором".

- -

Резюме

- -

Отже, у нас є вступ до дебаґінга в HTML, який повинен надати вам деякі корисні навички, щоб розраховувати, коли ви почнете налагоджувати CSS, JavaScript та інші типи коду пізніше в своїй кар'єрі. Це також означає завершення вивчення статей "Введення в модулі HTML" - тепер ви можете продовжувати тестування самостійно з нашими оцінками: перший з них за посиланням нижче.

- -

{{PreviousMenuNext("Learn/HTML/Introduction_to_HTML/Document_and_website_structure", "Learn/HTML/Introduction_to_HTML/Marking_up_a_letter", "Learn/HTML/Introduction_to_HTML")}}

diff --git a/files/uk/learn/html/introduction_to_html/getting_started/index.html b/files/uk/learn/html/introduction_to_html/getting_started/index.html deleted file mode 100644 index d1250c915c..0000000000 --- a/files/uk/learn/html/introduction_to_html/getting_started/index.html +++ /dev/null @@ -1,522 +0,0 @@ ---- -title: Початок роботи з HTML -slug: Learn/HTML/Introduction_to_HTML/Getting_started -tags: - - HTML - - Мова - - Основи - - Розмітка - - атрибути - - веб-сторінки - - для початківців - - елементи - - лапки - - символи - - теги - - українською мовою -translation_of: Learn/HTML/Introduction_to_HTML/Getting_started ---- -
{{LearnSidebar}}
- -
{{NextMenu("Learn/HTML/Introduction_to_HTML/The_head_metadata_in_HTML", "Learn/HTML/Introduction_to_HTML")}}
- -

У цій статті ми пояснимо найбільш базові поняття HTML — що таке елементи, атрибути та інші терміни, які ви могли чути, і яке завдання вони виконують. Ми покажемо, як побудований елемент HTML і з чого складається типова HTML-сторінка, а також пояснимо інші особливості мови. В процесі навчання ми будемо трохи бавитися з кодом, щоб вам було цікаво!

- - - - - - - - - - - - -
Передумови:Базове знання комп'ютера, встановлене основне програмне забезпечення, базове розуміння роботи з файлами.
Мета:Отримати базове розуміння мови HTML і попрактикуватися в написанні кількох HTML-елементів.
- -

Що таке HTML?

- -

{{glossary("HTML")}} (Hypertext Markup Language — мова гіпертекстової розмітки) не є мовою програмування. Це мова розмітки, яка каже браузеру, як відобразити сторінку, яку ви відвідуєте. HTML може бути простим чи складним, залежно від бажання його розробника. HTML складається з серії {{glossary("Element", "елементів")}}, які ви використовуєте для того, щоб вкласти, загорнути чи розмітити частини сторінки, щоб вони мали певний вигляд. {{glossary("Tag", "Теги")}} можуть перетворити частину тексту на посилання на іншу сторінку, виділити її курсивом тощо. Наприклад, візьміть такий рядок тексту:

- -

Мій кіт дуже сердитий

- -

Якщо ми хочемо, щоб цей рядок був сам по собі, ми можемо вказати, що це параграф (абзац), загорнувши його тегом елементу ({{htmlelement("p")}}):

- -
<p>Мій кіт дуже сердитий</p>
- -

Анатомія елементу HTML

- -

Погляньмо на елемент "параграф" детальніше. 

- -

- -

Основні частини елементу такі:

- -
    -
  1. Початковий тег: містить назву елементу (в цьому випадку, p), загорнену в кутові дужки. Цей тег позначає початок елементу, або місце, де елемент починає діяти. У даному випадку — це місце, де починається параграф. 
  2. -
  3. Кінцевий тег: такий самий тег, як і початковий, тільки тепер він містить скісну риску перед назвою елементу. Цей тег позначає місце закінчення елементу — у цьому випадку, місце, де закінчується параграф. Одна з найпоширеніших помилок початківців — це забути поставити кінцевий тег, що може призвести до несподіваних результатів. 
  4. -
  5. Вміст: вміст елементу, у цьому випадку — просто текст. 
  6. -
  7. Елемент: початковий тег разом із кінцевим тегом та вмістом між ними складають елемент.
  8. -
- -

Активне навчання: створення вашого першого HTML-елементу

- -

Відредагуйте рядок нижче у полі Input,  загорнувши його тегами <em> та </em> (поставте <em> на початку, щоб відкрити елемент, та </em> в кінці, щоб закрити елемент) — це має виділити рядок курсивом! Ви маєте побачити зміни в полі Output.

- -

Якщо ви зробите помилку, ви можете завжди скинути редагування кнопкою Reset. Якщо ви справді застрягнете, натисніть кнопку Show solution, щоб побачити відповідь.

- - - -

{{ EmbedLiveSample('Playable_code', 700, 300) }}

- -

Вкладені елементи

- -

Ви можете вкладати одні елементи всередину інших. Це називаєте вкладенням. Якщо ми хочемо наголосити, що наш кіт дуже сумний, ми можемо загорнути слово "дуже" в елемент {{htmlelement("strong")}}, який означає, що слово особливо сильно наголошене:

- -
<p>My cat is <strong>very</strong> grumpy.</p>
- -

Важливо пам'ятати правильне вкладення елементів: у прикладі вище ми спершу відкрили елемент {{htmlelement("p")}}, а потім елемент <strong>, що означає, що першим ми маємо закрити внутрішній елемент {{htmlelement("strong")}}, а потім зовнішній {{htmlelement("p")}}. Приклад нижче неправильний:

- -
<p>My cat is <strong>very grumpy.</p></strong>
- -

Елемент має закриватися або всередині, або ззовні іншого елемента. Якщо кінцевий тег зовнішнього елемента іде перед кінцевим тегом внутрішнього елемента, ваш браузер спробує здогадатися, що ви хотіли цим сказати, і результати цього можуть бути неочікуваними. Тому не робіть так!

- -

Блокові та рядкові елементи

- -

Існують дві важливі категорії елементів у HTML, про які вам слід знати — блокові та рядкові.

- - - -

Візьміть такий приклад:

- -
<em>перший</em><em>другий</em><em>третій</em>
-
-<p>четвертий</p><p>п'ятий</p><p>шостий</p>
- -

{{htmlelement("em")}} є рядковим елементом, тому перші три елементи розміщують в одному рядку, без відстаней між ними. Натомість {{htmlelement("p")}} є блоковим елементом, він розміщується з нового рядка і має відстані над і під ним (ці відстані визначаються у стиляхt CSS, які браузер за замовчанням застосовує до параграфів).

- -

{{ EmbedLiveSample('Block_versus_inline_elements', 700, 200) }}

- -
-

Примітка: HTML5 пропонує інший підхід до визначення категорій елементів (див. Element content categories). Хоча нові категорії є більш точними, ніж ті, про які йшлося вище, вони також є значно складнішими для розуміння, ніж "блокові" і "рядкові". Тому ми будемо вживати саме ці дві категорії. 

-
- -
-

Примітка: ви можете знайти корисні посилання на перелік усіх блокових та рядкових елементів — див. Block-level elements та Inline elements.

-
- -

Порожні елементи

- -

Не всі елементи утворюються за шаблоном початковий тег, вміст, кінцевий тег. Деякі елементи мають лише один тег, який зазвичай вставляє щось на певне місце в документі. Це, наприклад, {{htmlelement("img")}}, який вставляє зображення на те місце, куди він поставлений:

- -
<img src="https://raw.githubusercontent.com/mdn/beginner-html-site/gh-pages/images/firefox-icon.png">
- -

Такий вигляд він має на сторінці:

- -

{{ EmbedLiveSample('Empty_elements', 700, 300) }}

- -

Атрибути

- -

Елементи також можуть мати атрибути, які мають такий вигляд: 

- -

&lt;p class="editor-note">My cat is very grumpy&lt;/p>

- -

Атрибути містять додаткову інформацію про елемент, яка не відображається в самому контенті. У прикладі вище class це ім'я атрибута, а editor-note — це значення атрибута. Атрибут class дозволяє надати елементу певний ідентифікатор, який пізніше можна використати для того, щоб доступитися до цього елемента і змінити його стиль.

- -

Атрибут завжди повинен мати:

- -
    -
  1. Пробіл між ім'ям атрибута і назвою елементу (або попереднім атрибутом, якщо такий є).
  2. -
  3. Ім'я атрибута, за яким іде знак дорівнює.
  4. -
  5. Значення атрибута, загорнене в прямі лапки.
  6. -
- -

Активне навчання: додавання атрибута до елемента

- -

Поглянемо на інший елемент — {{htmlelement("a")}} (від anchor — "якір"), який робить гіперпосиланням текст, загорнений в нього. Цей елемент може мати кілька атрибутів, наприклад: 

- - - -

Відредагуйте рядок нижче в полі Input,так щоб він став посиланням на ваш улюблений сайт. Спочатку додайте елемент <a>, потім атрибути href і title. Насамкінець вкажіть значення атрибута target, так щоб посилання відкривалося в новій вкладці. Ви побачите свої зміни в полі Output. Ви маєте побачити посилання, яке має відображати заголовок (title) при наведенні курсору, а при кліку — переходити за адресою, вказаною в атрибуті href element. Пам'ятайте ставити пробіли між іменем елемента та кожним атрибутом. 

- -

Ви завжди можете скинути всі зміни кнопкою Reset. Також ви можете подивитися відповідь, натиснувши кнопку Show solution.

- - - -

{{ EmbedLiveSample('Playable_code2', 700, 300) }}

- -

Булеві атрибути

- -

Іноді ви можете побачити в коді лише назву атрибута, без вказаного значення. Це цілком нормальні атрибути, вони називаються булевими. Вони мають лише одне значення, зазвичай таке ж саме, як і назва самого атрибута. Для прикладу візьмемо атрибут {{htmlattrxref("disabled", "input")}}, який робить поля форми неактивними (засіреними), щоб користувачі не могли їх заповнити. 

- -
<input type="text" disabled="disabled">
- -

Скорочений запис цілком може мати такий вигляд (ми також додали активне поле для кращого розуміння): 

- -
<input type="text" disabled>
-
-<input type="text">
-
- -

Обидва записи дадуть такий результат: 

- -

{{ EmbedLiveSample('Boolean_attributes', 700, 100) }}

- -

Опускання лапок навколо значень атрибутів

- -

Іноді в мережі ви можете побачити багато різних прикладів дивної розмітки, наприклад, значення атрибутів, записані без лапок. Хоча за деяких обставин такий запис є прийнятним, в інших випадках він може поламати розмітку. Наприклад, у нашому посиланні з прикладу вище ми можемо записати атрибут href так:

- -
<a href=https://www.mozilla.org/>favourite website</a>
- -

Однак, якщо ми додамо другий атрибут title, розмітка порушиться:

- -
<a href=https://www.mozilla.org/ title=The Mozilla homepage>favourite website</a>
- -

Таку розмітку браузер розуміє неправильно, вважаючи, що title — це насправді три атрибути: атрибут "title" зі значенням "The" і два інші атрибути булевого типу, Mozilla і homepage. Така поведінка не є очікуваною і може призвести до помилок, як показано в прикладі нижче. Спробуйте навести курсор на текст, щоб подивитися, який текст у заголовку. 

- -

{{ EmbedLiveSample('Omitting_quotes_around_attribute_values', 700, 100) }}

- -

Ми радимо завжди писати атрибути в лапках, це дозволяє уникнути багатьох проблем і робить код більш читабельним. 

- -

Лапки подвійні чи одинарні?

- -

У цій статті всі значення атрибутів загорнені в звичайні прямі лапки. Проте іноді ви можете побачити, що значення загортається прямими апострофами на початку і в кінці (одинарні лапки). Вживання перших і других в HTML є питанням смаку, ви можете сміливо використовувати ті лапки, які зручно. Обидва записи будуть рівноцінними.

- -
<a href="http://www.example.com">A link to my example.</a>
-
-<a href='http://www.example.com'>A link to my example.</a>
- -

Однак, не можна змішувати лапки різного типу в одному записі. Наприклад, такий запис є неправильним:

- -
<a href="http://www.example.com'>A link to my example.</a>
- -

Якщо ви використали лапки одного типу в записі, всередину ви можете вкласти лапки іншого типу. Наприклад, тут апостроф вживається всередині значення в подвійних лапках:

- -
<a href="http://www.example.com" title="Isn't this fun?">A link to my example.</a>
- -

Для вкладення лапок того самого типу потрібно користуватися спеціальними символами, про які піде мова нижче.

- -

Анатомія HTML-документу

- -

Все зазначене вище є основами HTML, але окремо взяті елементи самі по собі мало на що здатні. Тепер ми поглянемо на те, як окремі елементи формують цілу веб-сторінку:

- -
<!DOCTYPE html>
-<html>
-  <head>
-    <meta charset="utf-8">
-    <title>My test page</title>
-  </head>
-  <body>
-    <p>This is my page</p>
-  </body>
-</html>
- -

Тут ми маємо:

- -
    -
  1. <!DOCTYPE html>: Доктайп (тип документу). В ті часи, коли HTML тільки зароджувався (близько 1991/2), доктайпы (doctypes) використовувалися як посилання на набір правил, яким HTML-сторінка повинна була слідувати, щоб вважатись написаною хорошим HTML-кодом, що може означати автоматичну перевірку помилок та інші корисні речі. Доктайп приблизно такий вигляд: - -
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    -"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    - Проте в наші дні ніхто справді не дбає про них, і вони насправді є лише історичним артефактом, який потрібно включити в документ, щоб той правильно працював<!DOCTYPE html> це найкоротший рядок символів, який вважається валідним доктайпом; це все, що вам дійсно потрібно знати.
  2. -
  3. <html></html>: Елемент {{htmlelement("html")}}. Цей елемент огортає весь зміст (контент) на всій сторінці, іноді його називають кореневим (root) елементом.
  4. -
  5. <head></head>: Елемент {{htmlelement("head")}}. Цей елемент діє як контейнер для всього матеріалу, який ви хочете включити в сторінку HTML, але який не є вмістом, що ви надаєте для перегляду відвідувачам вашої сторінки. Він включає в себе такі речі, як ключові слова та опис сторінки, які ви хочете відобразити в результатах пошуку, CSS, щоб стилізувати вміст сторінки, оголошення підтримуваного набору символів тощо. Ви дізнаєтеся більше про це в наступній статті цієї серії.
  6. -
  7. <meta charset="utf-8">: Цей елемент встановлює в якості символьного кодування для вашого документу UTF-8, що включає більшість символів з переважної більшості письмових мов людей. По суті, це дає змогу обробляти будь-який текстовий вміст, який ви можете додати до документу. Немає причин не встановлювати таке кодування, і це допоможе уникнути деяких проблем пізніше.
  8. -
  9. <title></title>: Елемент {{htmlelement("title")}}. Цей елемент встановлює назву вашої сторінки, що є заголовком, який відображається на вкладці веб-браузера, на якій завантажується сторінка, і використовується для опису сторінки під час додавання/уподобання її.
  10. -
  11. <body></body>: Елемент {{htmlelement("body")}}. Цей елемент містить весь контент, який ви хочете показати веб-користувачам під час відвідування вашої сторінки, незалежно від того, чи це є текст, зображення, відео, ігри, відтворювані звукові доріжки тощо.
  12. -
- -

Активне навчання: додавання деяких функцій у документ HTML

- -

Якщо ви хочете поекспериментувати з написанням HTML-коду на вашому локальному комп'ютері, ви можете зробити наступне:

- -
    -
  1. Скопіюйте наведений вище приклад HTML сторінки.
  2. -
  3. Створіть новий файл у текстовому редакторі.
  4. -
  5. Вставте код у новий текстовий файл.
  6. -
  7. Збережіть файл як index.html.
  8. -
- -
-

Примітка: Ви також можете знайти цей основний HTML шаблон на MDN Learning Area Github repo.

-
- -

Тепер ви можете відкрити цей файл у веб-браузері, щоб побачити, як має вигляд відображення вірного коду, а потім відредагувати код та оновити веб-браузер, щоб побачити результат. Спочатку це матиме такий вигляд:

- -

A simple HTML page that says This is my page В цій вправі ви можете редагувати код локально на своєму комп'ютері, як зазначено вище, або можете редагувати його в запропонованому редакторі нижче (у вікні редактора в цьому прикладі показано лише зміст елемента {{htmlelement("body")}}) Спробуйте зробити наступне:

- - - -

Якщо ви зробите помилку, ви завжди можете скинути її за допомогою кнопки Reset. Якщо ви дійсно заплутались, натисніть кнопку Show solution, щоб побачити відповідь.

- - - -

{{ EmbedLiveSample('Playable_code3', 700, 600) }}

- -

Пробіли в HTML

- -

У наведених вище прикладах, мабуть, ви помітили, що багато пробілів в коді - це взагалі не обов'язково; два наступні фрагменти коду є еквівалентними:

- -
<p>Dogs are silly.</p>
-
-<p>Dogs        are
-         silly.</p>
- -

Незалежно від того, скільки пустого місця ви використовуєте (яке може містити пробіл, а також відступи рядків), HTML-аналізатор зменшує кожен з них до одного пробілу під час відтворення коду. Тож навіщо використовувати так багато пробілів? Відповідь - зручність читання - набагато легше зрозуміти, що відбувається у вашому коді, якщо у вас це чудово відформатовано, а не просто зібрано разом у великий хаос. У нашому HTML-коді кожен вкладений елемент має два пробіли, ніж той, в якому він розміщений всередині. Ви самі визначаєте стиль форматування, який ви використовуєте (скільки пробілів для кожного рівня відступу, наприклад), але ви повинні розглянути можливість використання якогось форматування.

- -

Посилання на об'єкт: включаючи спеціальні символи в HTML

- -

В HTML символи <, >,",' та & є спеціальними символами. Вони є частинами самого синтаксису HTML, тому як вводити один з цих символів у ваш текст, наприклад, якщо ви дійсно хочете використати амперсанд або знак менше, і не трактувати його як код, як це можуть зробити деякі веб-браузери?

- -

В такому випадку ми повинні використовувати символьні посилання - спеціальні коди, що представляють символи, і можуть використовуватися в конкретних обставинах. Кожне посилання символів починається з амперсанда (&), а закінчується двокрапкою (;).

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Буквений символЕквівалентне написання символів
<&lt;
>&gt;
"&quot;
'&apos;
&&amp;
- -

У наведеному нижче прикладі ви можете побачити два абзаци, які говорять про веб-технології:

- -
<p>In HTML, you define a paragraph using the <p> element.</p>
-
-<p>In HTML, you define a paragraph using the &lt;p&gt; element.</p>
- -

Нижче наводиться приклад, в якому ви можете побачити, що перший абзац вийшов не так, тому що браузер вважає, що другий елемент <p> починає новий абзац. Другий абзац виглядає чудово, тому що ми замінили кутові дужки на символьні посилання.

- -

{{ EmbedLiveSample('Entity_references_including_special_characters_in_HTML', 700, 200) }}

- -
-

Примітка: У графіку всіх доступних посилань на об'єкти HTML можна знайти у Вікіпедії: List of XML and HTML character entity references.

-
- -

Коментарі HTML

- -

В HTML, як і у більшості мов програмування, існує механізм, доступний для написання коментарів у коді - коментарі браузером ігноруються і невидимі для користувача, їхня мета полягає у тому, щоб дозволити вам додавати коментарі до коду, щоб пояснити, як ваш код працює, що роблять різні частини коду тощо. Це може бути дуже корисним, якщо ви повернетеся до свого коду, над яким ви не працювали, наприклад, протягом шести місяців, і не пам'ятаєте, що ви робили, або якщо над вашим кодом ще хтось працював.

- -

Щоб перетворити розділ вмісту всередині вашого HTML-файлу в коментар, вам необхідно обгорнути його спеціальними маркерами <!-- та -->, наприклад:

- -
<p>I'm not inside a comment</p>
-
-<!-- <p>I am!</p> -->
- -

Як ви можете побачити, перший абзац відображається на сторінці, а другий - ні.

- -

{{ EmbedLiveSample('HTML_comments', 700, 100) }}

- -

Підсумок

- -

Ви досягли кінця статті - ми сподіваємося, що вам сподобалась ваша мандрівка по основах HTML! На цьому етапі ви повинні розуміти, як має вигляд мова, як вона працює на базовому рівні, і вміти писати кілька елементів і атрибутів. Це ідеальне місце, щоб розпочати навчання прямо зараз і продовжити вивчати далі наступні статті модуля. Ви розглянете деякі речі, з якими ви вже ознайомлені, але більш докладно, і дізнаєтесь про деякі нові можливості мови HTML. Залишайтеся на зв'язку!

- -
-

Примітка: На цьому етапі, коли ви почнете більше дізнаватися про HTML, ви також можете почати вивчати основи каскадних таблиць стилів або CSS. CSS - це мова, яку ви використовуєте для стилізації веб-сторінок (наприклад, зміна шрифту або кольорів, або зміна макета сторінки). HTML та CSS дуже добре співпрацюють, в чому ви незабаром переконаєтесь.

-
- -
{{NextMenu("Learn/HTML/Introduction_to_HTML/The_head_metadata_in_HTML", "Learn/HTML/Introduction_to_HTML")}}
diff --git a/files/uk/learn/html/introduction_to_html/html_text_fundamentals/index.html b/files/uk/learn/html/introduction_to_html/html_text_fundamentals/index.html deleted file mode 100644 index 7387e08725..0000000000 --- a/files/uk/learn/html/introduction_to_html/html_text_fundamentals/index.html +++ /dev/null @@ -1,953 +0,0 @@ ---- -title: HTML text fundamentals -slug: Learn/HTML/Introduction_to_HTML/HTML_text_fundamentals -translation_of: Learn/HTML/Introduction_to_HTML/HTML_text_fundamentals ---- -
{{LearnSidebar}}
- -
{{PreviousMenuNext("Learn/HTML/Introduction_to_HTML/The_head_metadata_in_HTML", "Learn/HTML/Introduction_to_HTML/Creating_hyperlinks", "Learn/HTML/Introduction_to_HTML")}}
- -

Одне з головних завдань HTML полягає в тому, щоб надати текстову структуру та смислове значення (також відоме як {{glossary("семантика")}}) таким чином, щоб браузер міг відобразити зміст на сторінці коректно. У цій статті пояснюється, у який спосіб можна використовувати {{glossary("HTML")}}, щоб структурувати текст на сторінці, додавши заголовки та параграфи, підкреслюючи слова, створюючи списки та інше.

- - - - - - - - - - - - -
Передумови:Базове знайомство з HTML, як описано в Початок роботи з HTML.
Мета:Дізнайтеся, як позначити основну сторінку тексту, щоб надати йому структуру та зміст - включаючи абзаци, заголовки, списки, акцент та цитати.
- -

Основа: заголовки та абзаци

- -

Найбільш структурований текст складається з заголовків і параграфів, незалежно від того, чи читаєте ви історію, газету, підручник з коледжу, журнал тощо.

- -

An example of a newspaper front cover, showing use of a top level heading, subheadings and paragraphs.

- -

Структурований вміст полегшує та покращує досвід читання.

- -

У HTML кожен абзац повинен бути загорнутий у елемент {{htmlelement ("p")}}, так:

- -
<p>Я абзац,о так, це я.</p>
- -

Кожен заголовок має бути загорнутий в елемент заголовка:

- -
<h1>Я назва цієї історії.</h1>
- -

Є шість елементів заголовку — {{htmlelement("h1")}}, {{htmlelement("h2")}}, {{htmlelement("h3")}}, {{htmlelement("h4")}}, {{htmlelement("h5")}}, та {{htmlelement("h6")}}. Кожен елемент представляє інший рівень вмісту документа;<h1> являє собою основний заголовок, <h2> представляє підзаголовки, <h3> представляє наступні підзаголовки тощо.

- -

Впровадження структурної ієрархії

- -

Наприклад, у історії <h1> буде представляти назву історії, <h2> s представлятиме назву кожного розділу, а <h3> представлятиме підрозділи кожного розділу тощо.

- -
<h1>Нищівна свердловина</h1>
-
-<p>Кріс Міллс</p>
-
-<h2>Розділ 1: Темна ніч</h2>
-
-<p>Це була темна ніч. Десь, сова вигукувала. Дощ обрушився на ...</p>
-
-<h2>Розділ 2: Вічна тиша</h2>
-
-<p>Наш головний герой міг не стільки шепотом вийти з тіньової фігури ...</p>
-
-<h3>Привид говорить</h3>
-
-<p>Минуло ще кілька годин, коли раптово, побачивши привида, випрямився і вигукнув: «Будь ласка, помилуй мою душу!"</p>
- -

Це дійсно залежить від вас, які саме елементи ви використовуєте, тоді ієрархія має сенс. Вам просто потрібно мати на увазі кілька найкращих практик, коли ви створюєте такі структури:

- - - -

Чому нам потрібна структура?

- -

Щоб відповісти на це запитання, давайте подивимося на text-start.html - початкову точку нашого запущеного прикладу для цієї статті (хороший рецепт хумусу). це потрібно для вправ пізніше. В даний час у цьому документі міститься кілька фрагментів вмісту - вони не позначені жодним чином, але розділені проривами рядків (Enter / Return натиснуто, щоб перейти до наступного рядка).

- -

Однак, коли ви відкриваєте документ у вашому браузері, ви побачите, що текст з'являється суцільним шматком!

- -

A webpage that shows a wall of unformatted text, because there are no elements on the page to structure it.

- -

Це пояснюється тим, що немає елементів, які б давали структуру контенту, тому браузер не знає, що є заголовок а що є абзацом. Крім того:

- - - -

Тому нам необхідно надати нашому контенту структурну розмітку.

- -

Активне навчання: Надання нашої структури змісту

- -

Давайте розглянемо живой приклад. У наведеному нижче прикладі додайте елементи до вихідного тексту у полі Введення так, щоб він з'являвся у вигляді заголовка та двох абзаців у полі Вивід.

- -

Якщо ви зробите помилку, ви завжди можете скинути її за допомогою кнопки скидання. Якщо ви застрягли, натисніть кнопку Показати рішення, щоб побачити відповідь.

- - - -

{{ EmbedLiveSample('Playable_code', 700, 400, "", "", "hide-codepen-jsfiddle") }}

- -

Чому нам потрібна семантика?

- -

Семантика  всюди навколо нас - ми покладаємося на попередній досвід, щоб розповісти вам, що таке функція повсякденних об'єктів; коли ми щось бачимо, ми знаємо, якою буде її функція. Так, наприклад, ми очікуємо, що червоний світлофор означає "зупинка", а зелений світлофор означає "іти". Речі можуть бути дуже складними дуже швидко, якщо застосовується неправильна семантика (чи будь-яка країна використовує червоний, щоб означати "йти"?

- -

У подібному дусі, ми повинні переконатися, що ми використовуємо правильні елементи, надаючи нашому змісту правильний сенс, функцію або зовнішній вигляд. У цьому контексті елемент {{htmlelement ("h1")}} також є семантичним елементом, який надає тексту, який він обертає навколо ролі (або значення) "заголовка верхнього рівня на вашій сторінці".

- -
<h1>Це заголовок верхнього рівня</h1>
- -

За замовчуванням браузер надасть йому великий розмір шрифту для того, щоб він виглядав як заголовок (хоча ви могли б такий стиль текста, могли отримати, використовуючи CSS). Більш важливо, що його семантичне значення буде використовуватися кількома способами, наприклад, пошуковими системами та програмами для читання з екрана (як згадано вище).

- -

З іншого боку, ви можете зробити будь-який елемент схожим на елемент верхнього рівня. Розгляньте наступне:

- -
<span style="font-size: 32px; margin: 21px 0;">Це заголовок верхнього рівня?</span>
- -

Це елемент {{htmlelement ("span")}}. Вона не має семантики. Ви використовуєте його, щоб загорнути вміст, коли ви хочете застосувати до нього CSS (або зробити щось із цим за допомогою JavaScript), не надаючи йому жодного додаткового сенсу (про це пізніше ви знайдете в курсі.) Ми застосували деякі CSS, щоб він виглядав як заголовок верхнього рівня, але оскільки він не має семантичного значення, він не отримає жодної з додаткових переваг, описаних вище. Це гарна ідея використовувати відповідний елемент HTML для завдання.

- -

Списки

- -

Тепер звернемо увагу до списків. Списки знаходяться в усьому нашому житті - від списку покупок до списку напрямків, які ви підсвідомо дотримуєтеся, щоб дістатися до вашого будинку щодня, до списків інструкцій, які ви дотримуєтеся в цих підручниках! Списки знаходяться всюди в Інтернеті, і ми маємо три різні типи, про які потрібно знати.

- -

Невпорядкований

- -

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

- -
молоко
-яйця
-хліб
-гумус
- -

Кожен невпорядкований список починається з елемента {{htmlelement ("ul")}}, який обертається навколо всіх елементів списку:

- -
<ul>
-молоко
-яйцчя
-хліб
-гумус
-</ul>
- -

Останнім кроком є перенесення кожного елемента списку в елемент {{htmlelement ("li")}} (елемент списку):

- -
<ul>
-  <li>молоко</li>
-  <li>яйцчя</li>
-  <li>хліб</li>
-  <li>гумус</li>
-</ul>
- -

Активне навчання: розмітка невпорядкованого списку

- -

Спробуйте відредагувати живий зразок нижче, щоб створити свій власний HTML-невпорядкований список.

- - - -

{{ EmbedLiveSample('Playable_code_2', 700, 400, "", "", "hide-codepen-jsfiddle") }}

- -

Замовлено

- -

Упорядковані списки - це списки, в яких має значення порядок елементів - приведемо приклад набору напрямків:

- -
Проїдьте до кінця дороги
-Поверніть праворуч
-Ідіть прямо по перших двох роз'їздів
-На третьому кільці поверніть ліворуч
-Школа знаходиться справа від вас, 300 метрів вперед по дорозі
- -

Структура розмітки така ж, як і для невпорядкованих списків, за винятком того, що ви повинні обернути елементи списку в елемент {{htmlelement("ol")}}, а не <ul>:

- -
<ol>
-  <li>Проїдьте до кінця дороги</li>
-  <li>Поверніть праворуч</li>
-  <li>Ідіть прямо по перших двох роз'їздів</li>
-  <li>На третьому кільці поверніть ліворуч</li>
-  <li>Школа знаходиться справа від вас, 300 метрів вперед по дорозі</li>
-</ol>
- -

Активне навчання: розмітка впорядкованого списку

- -

Спробуйте відредагувати живий зразок нижче, щоб створити свій власний HTML-список.

- - - -

{{ EmbedLiveSample('Playable_code_3', 700, 500, "", "", "hide-codepen-jsfiddle") }}

- -

Активне навчання: Розмітка сторінки рецепта

- -

Таким чином, на даний момент у статті, у вас є вся інформація, необхідна для позначення нашого прикладу сторінки рецептів. Ви можете зберегти локальну копію нашої text-start.html запустіть файл і виконайте роботу там, або зробіть це в прикладі, що можна редагувати нижче. Можливо, це краще робити локально, оскільки ви зможете зберегти роботу, яку ви виконуєте, тоді як, якщо ви заповните її у редагований приклад, вона буде втрачена під час наступного відкриття сторінки. Обидва варіанти мають плюси і мінуси.

- - - -

{{ EmbedLiveSample('Playable_code_4', 900, 500, "", "", "hide-codepen-jsfiddle") }}

- -

Якщо ви застрягли, ви завжди можете натиснути кнопку Показувати рішення або перевірити наш text-complete.html приклад на нашому github репозиторії.

- -

Вкладені списки

- -

Цілком нормально вкласти один список у інший. Ви, можливо, захочете, щоб деякі підпункти знаходились під  верхным рівнем. Візьмемо другий список з нашого прикладу рецептів:

- -
<ol>
-  <li>Видаліть шкіру з часнику і грубо наріжте.</li>
-  <li>Видаліть все насіння і стебло з перцю і грубо наріжте.</li>
-  <li>Додайте всі інгредієнти в кухонний комбайн.</li>
-  <li>Переробіть всі інгредієнти в пасту.</li>
-  <li>Якщо ви хочете грубий "кремезний" гумус, переробляйте його короткий час.</li>
-  <li>Якщо ви хочете гладкий гумус, переробляйте його довше.</li>
-</ol>
- -

Оскільки останні дві кулі дуже тісно пов'язані з тією, що була перед ними (вони читаються, як під-інструкції або варіанти, які підходять нижче цієї кулі), може мати сенс вкладати їх у свій власний невпорядкований список і розміщувати цей список всередині четверта куля. Це виглядатиме так:

- -
<ol>
-  <li>Видаліть шкіру з часнику і грубо наріжте.</li>
-  <li>Видаліть все насіння і стебло з перцю і грубо наріжте.</li>
-  <li>Додайте всі інгредієнти в кухонний комбайн.</li>
-  <li>Переробіть всі інгредієнти в пасту.
-    <ul>
-      <li>Якщо ви хочете грубий "кремезний" гумус, переробляйте його короткий час.</li>
-      <li>Якщо ви хочете гладкий гумус, переробляйте його довше.</li>
-    </ul>
-  </li>
-</ol>
- -

Спробуйте повернутися до попереднього активного прикладу навчання та оновити другий список, подібний до цього.late

- -

Акцент і важливість

- -

У людській мові ми часто підкреслюємо певні слова, щоб змінити зміст речення, і ми часто хочемо позначити певні слова як важливі або різні. HTML надає різні семантичні елементи, які дозволяють нам розмічати текстовий вміст з такими ефектами, і в цьому розділі ми розглянемо деякі з найбільш поширених.

- -

Акцент

- -

Коли ми хочемо додати акцент у розмовній мові, ми підкреслюємо певні слова, тонко змінюючи сенс того, що ми говоримо. Аналогічно, у письмовій мові ми схильні підкреслювати слова, виділяючи їх курсивом. Наприклад, наступні два речення мають різне значення.

- -

Я радий, що ви не запізнилися.

- -

Я радий, що ви не запізнилися.

- -

Перше речення звуки справді полегшено, що людина не запізнився. Навпаки, другий звучить саркастично або пасивно-агресивно, висловлюючи досаду, що людина прибула трохи пізно.

- -

У HTML ми використовуємо елемент {{htmlelement ("em")}} (вираз) для позначення таких екземплярів. Окрім того, що документ є цікавішим для читання, вони розпізнаються читачами екрану та висловлюються іншим тоном голосу. Браузери за замовчуванням створюють цей стиль як курсив, але ви не повинні використовувати цей тег, щоб отримати стиль курсиву. Для цього потрібно використовувати елемент {{htmlelement ("span")}} і деякий CSS, або, можливо, елемент {{htmlelement ("i")}} (див. Нижче).

- -
<p>Я <em>радий</em>, що ви не <em>запізнилися</em>.</p>
- -

Велике значення

- -

Щоб підкреслити важливі слова, ми прагнемо підкреслити їх у розмовній мові і сміливо їх писати. Наприклад:

- -

Ця рідина дуже токсична.

- -

Я розраховую на вас. Не запізнюйтеся!

- -

У HTML ми використовуємо {{htmlelement("strong")}} (strong важливий) елемент для позначення таких випадків. Окрім того, що документ стане більш корисним, вони знову розпізнаються читачами екрану та говорять різним тоном голосу. За умовчанням у браузерах цей текст виділено напівжирним шрифтом, але ви не повинні використовувати цей тег лише для отримання жирного стилю. Для цього потрібно використати {{htmlelement("span")}} елемент і деякі CSS, або, можливо,елемент{{htmlelement("b")}} (дивись нижче.)

- -
<p>Ця рідина є <strong>дуже токсичною</strong>.</p>
-
-<p>Я розраховую на вас. <strong>Не </strong> запізнюйтесь!</p>
- -

За бажанням можна вмонтовувати strong і акцентувати всередині один одного:

- -
<p>Ця рідина є <strong>дуже токсичною</strong> —
-якщо ви її вип'єте, <strong>Ви можете <em>померти</em></strong>.</p>
- -

Активне навчання: Давайте будемо уважними!

- -

У цьому розділі активного навчання ми надали приклад, який можна редагувати. Усередині неї ми хотіли б, щоб ви спробували додати акцент і важливе значення словам, які ви вважаєте потрібними їм, просто щоб мати певну практику.

- - - -

{{ EmbedLiveSample('Playable_code_5', 700, 500, "", "", "hide-codepen-jsfiddle") }}

- -

Курсив, жирний, підкреслений ...

- -

Елементи, які ми обговорювали до цих пір, мають чітко виражену семантику. Ситуація з {{htmlelement("b")}}, {{htmlelement("i")}}, та {{htmlelement("u")}} дещо складніше. Вони прийшли так, щоб люди могли писати напівжирний, курсив або підкреслений текст в епоху, коли CSS все ще підтримувався погано або зовсім не підтримувався. Такі елементи, які впливають лише на презентацію, а не на семантику, відомі як елементи презентації і більше не повинні використовуватися, оскільки, як ми бачили раніше, семантика настільки важлива для доступності, SEO та ін.

- -

HTML5 перевизначено <b>, <i> та <u> з новими, дещо заплутаними, семантичними ролями.

- -

Ось найкраще правило: скоріше за все доцільно використовувати <b>, <i> або <u>, щоб передати значення, яке традиційно передається жирним шрифтом, курсивом або підкресленням, за умови, що немає більш відповідного елемента. Тим не менш, завжди залишається критично важливим збереження мислення доступності. Концепція курсиву не дуже корисна людям, які використовують читання з екрану, або людям, які використовують систему письма, окрім латинського алфавіту.

- - - -
-

Попередження про підкреслення: люди пов'язують підкреслення з гіперпосиланнями. Тому в Інтернеті краще підкреслити лише посилання. Використовуйте елемент <u>, якщо він семантично доречний, але розгляньте можливість використання CSS для зміни підкресленого підкреслення на щось більш доречне в Інтернеті. Наведений нижче приклад ілюструє, як це можна зробити.

-
- -
<!-- наукові назви -->
-<p>
-  Рубінова колібрі (<i> Archilochus colubris </i>)
-   є найбільш поширеним колібром у Східній Північній Америці.
-</p>
-
-<!-- іноземні слова -->
-<p>
-  Меню було морем екзотичних слів <i lang="uk-latn">ватрушка</i>,
-  <i lang="id">nasi goreng</i> та <i lang="fr">soupe à l'oignon</i>.
-</p>
-
-<!-- відоме неправильне написання -->
-<p>
-  Коли-небудь я дізнаюся, як це зробити <u>spel</u> better.
-</p>
-
-<!-- Виділіть ключові слова в наборі інструкцій -->
-<ol>
-  <li>
-    <b>Фрагмент</b> два шматки хліба з буханки.
-  </li>
-  <li>
-    <b>Вставити</b> шматочок томата і лист салату між шматочками хліба.
-  </li>
-</ol>
-
-
- -

Підсумок

- -

Ось це зараз! Ця стаття повинна була дати вам гарне уявлення про те, як почати розмітку тексту в HTML, і познайомили вас з деякими з найважливіших елементів у цій області. Існує набагато більше семантичних елементів для висвітлення в цій області, і ми розглянемо набагато більше в нашій статті "Більше семантичних елементів", що пізніше буде в курсі. У наступній статті ми детально розглянемо, як створювати гіперпосилання , можливо, найважливіший елемент на Web.

- -

{{PreviousMenuNext("Learn/HTML/Introduction_to_HTML/The_head_metadata_in_HTML", "Learn/HTML/Introduction_to_HTML/Creating_hyperlinks", "Learn/HTML/Introduction_to_HTML")}}

- -

У цьому модулі

- - diff --git a/files/uk/learn/html/introduction_to_html/index.html b/files/uk/learn/html/introduction_to_html/index.html deleted file mode 100644 index 9b9ee8d4a6..0000000000 --- a/files/uk/learn/html/introduction_to_html/index.html +++ /dev/null @@ -1,55 +0,0 @@ ---- -title: Вступ до HTML -slug: Learn/HTML/Introduction_to_HTML -translation_of: Learn/HTML/Introduction_to_HTML ---- -
{{LearnSidebar}}
- -

{{glossary("HTML")}} є відносно простою мовою. Вона складається з елементів, які можуть застосовуватися до різних частин тексту і надавати їм певного значення в документі (наприклад, цей текст є параграфом, цей — ненумерованим списком, цей — частиною таблиці), розбивати документ на логічні частини (це заголовок, це три колонки контенту, це меню навігації), а також вставляти контент, такий як відео чи зображення, у документ. У цьому розділі ми поговоримо про перші два з цих завдань, а також розглянемо базові поняття і синтаксис, які потрібні для розуміння HTML.

- -

Передумови

- -

Для цього розділу вам не потрібні попередні знання з HTML, але потрібно бути користувачем комп'ютерів і мережі (принаймні на рівні переглядання сайтів). Також вам буде потрібне базове робоче середовище, встановлення якого описане в статті Встановлення основного програмного забезпечення, і розуміння того, як створювати і керувати файлами, як описано в статті Робота з файлами — обидві статті є частинами розділу Початок роботи з вебом.

- -
-

Примітка: якщо ви працюєте на комп'ютері/планшеті/іншому пристрої, на якому не маєте можливості створювати файли, спробуйте писати код в онлайн-програмах, таких як  JSBin чи Thimble.

-
- -

Посібники

- -

Статті у цьому розділі пояснюють базову теорію HTML і надають можливість перевірити ваші навички.

- -
-
Початок роботи з HTML
-
Стаття пояснює елементарні основи HTML — що таке елементи, атрибути та інші важливі поняття, які ви могли чути, і яке завдання вони виконують. Ми також покажемо, як побудований елемент HTML, як побудована типова сторінка HTML, і пояснимо інші основні особливості мови. В процесі роботи ми трохи пограємо з HTML, щоб вам було цікаво!
-
Що в head? Метадані в HTML
-
Head в HTML-документі є частиною, яка не відображається в веб-браузері коли сторінка завантажується. Вона містить інформацію про сторінку, такі як {{htmlelement("title")}}, посилання на {{glossary("CSS")}} (якщо ви хочете надати стиль вашому HTML-змісту за допомогою CSS), посилання до користувальницьких favicons та метаданих (тобто даних про HTML, наприклад, хто його написав (автор) і важливі ключові слова (keywords), що описують документ.)
-
Основи HTML-тексту
-
Одним із основних завдань HTML є надання текстового значення (також відомого як семантика), щоб браузер знав, як правильно відображати його. У цій статті розглядається, як правильно використовувати HTML, щоб розбити блок тексту на структуру заголовків та абзаців (параграфів), додати акцент/важливість слів, створити списки і багато іншого.
-
Створення гіперпосилань
-
Гіперпосилання дійсно важливі — саме вони роблять Інтернет павутиною. Ця стаття показує синтаксис, необхідний для створення посилання і обговорює кращі практичні поради.
-
Розширене форматування тексту
-
В HTML є багато інших елементів для форматування тексту, про які ми не вказали в статті Основи HTML тексту. Елементи, що знаходяться тут, менш відомі, але їх все ж корисно знати. Тут ви дізнаєтесь про позначення цитат, списки опису, комп'ютерний код та інший пов'язаний текст, індекс та верхній індекс, контактну інформацію та багато іншого.
-
Структура документу та веб-сайту
-
Крім визначення окремих частин вашої сторінки (наприклад "абзац" або "зображення"), HTML також використовується для визначення областей вашого веб-сайту (таких як "заголовок", "навігаційне меню", "колонка основного змісту".) У цій статті розглянуто, як планувати основну структуру веб-сайту, а також написати HTML-код для представлення цієї структури.
-
Відлагодження HTML
-
Написали HTML-код файно, але що робити, якщо щось йде неправильно і ви не можете з'ясувати, де помилка в коді? В цій статті ви ознайомитесь з деякими інструментами, які зможуть вам допомогти.
-
- -

Оцінки

- -

Наступні оцінки допоможуть перевірити ваше розуміння базових основ HTML, описаних вище в посібниках.

- -
-
Розмітка/Форматування листа
-
Ми всі вчимося писати листи рано чи пізно. Це також корисний приклад, щоб перевірити свої навички у форматуванні тексту. Отже, в цій оцінці вам буде надіслано листа для форматування.
-
Структурування сторінки змісту
-
Ця оцінка перевіряє ваше вміння використовувати HTML для структурування простої сторінки змісту, що містить заголовок (header), нижній колонтитул (footer), навігаційне меню (navigation menu), основний зміст (main content), і бічну панель (sidebar).
-
- -

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

- -
-
Основи веб-грамотності 1
-
Відмінний курс навчання Mozilla foundation, який навчає та випробовує багато навичок, про які говорилося в модулі Вступ до HTML. Учні знайомляться з читанням, написанням та участю в Інтернеті в цьому шестичастинному модулі. Дізнайтеся про основи Інтернету за допомогою виробництва та співпраці.
-
diff --git a/files/uk/learn/html/introduction_to_html/the_head_metadata_in_html/index.html b/files/uk/learn/html/introduction_to_html/the_head_metadata_in_html/index.html deleted file mode 100644 index 42e16b709c..0000000000 --- a/files/uk/learn/html/introduction_to_html/the_head_metadata_in_html/index.html +++ /dev/null @@ -1,277 +0,0 @@ ---- -title: Що в head? Метадані в HTML -slug: Learn/HTML/Introduction_to_HTML/The_head_metadata_in_HTML -tags: - - CSS - - HTML - - head - - Заголовок - - Мова - - Основи - - Розмітка - - веб-сторінки - - голова - - для початківців - - значки - - мета -translation_of: Learn/HTML/Introduction_to_HTML/The_head_metadata_in_HTML -original_slug: Learn/HTML/Introduction_to_HTML/scho_v_head_metadani_v_HTML ---- -
{{LearnSidebar}}
- -
{{PreviousMenuNext("Learn/HTML/Introduction_to_HTML/Getting_started", "Learn/HTML/Introduction_to_HTML/HTML_text_fundamentals", "Learn/HTML/Introduction_to_HTML")}}
- -

Елемент {{glossary("Head", "head")}} документа HTML - це частина, яка не відображається у веб-браузері під час завантаження сторінки. Він містить таку інформацію, як назва сторінки {{htmlelement("title")}}, посилання на файл стилів {{glossary("CSS")}} (якщо ви хочете стилізувати ваш HTML контент за допомогою CSS), посилання на  власні іконки та інші метадані (дані про HTML, наприклад, хто його написав, та важливі ключові слова, які описують документ.) У цій статті ми розглянемо все перераховане вище та інше, щоб дати вам гарну основу для роботи з розміткою.

- - - - - - - - - - - - -
Передумови:Знання основ HTML, як описано в Початок роботи з HTML.
Мета:Дізнатись про заголовок (head) в HTML, які в нього задачі, найважливіші елементи, які він може містити, і який вплив він може мати на HTML-документ.
- -

Що таке заголовок (head) HTML?

- -

Давайте перейдемо до простого HTML документу, який ми розглянули в попередній статті:

- -
<!DOCTYPE html>
-<html>
-  <head>
-    <meta charset="utf-8">
-    <title>My test page</title>
-  </head>
-  <body>
-    <p>This is my page</p>
-  </body>
-</html>
- -

Заголовок HTML (head) - це вміст елементу {{htmlelement("head")}} — на відміну від вмісту елемента {{htmlelement("body")}} (яке відображається на сторінці при завантаженні в браузері), вміст head не відображається на сторінці. Головним завданням заголовку є містити {{glossary("Metadata", "метадані")}} про документ. У наведеному вище прикладі заголовок досить малий:

- -
<head>
-  <meta charset="utf-8">
-  <title>My test page</title>
-</head>
- -

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

- -

Додавання назви сторінки

- -

Ми вже бачили елемент елемент {{htmlelement("title")}} в дії — він може бути використаний для додавання назви (title) документа. Однак його можна зплутати з елементом {{htmlelement("h1")}}, який використовується для додавання заголовка верхнього рівня до вашого вмісту body - його також іноді називають заголовком сторінки. Але це різні речі!

- - - -

Активне навчання: перевірка простого прикладу

- -
    -
  1. Щоб розпочати це активне навчання, ми хотіли б, щоб ви перейшли на наш GitHub репозиторій та завантажили копію нашої title-example.html сторінки. Для цього також - -
      -
    1. Скопіюйте та вставте код із сторінки в новий текстовий файл у редакторі коду, а потім збережіть його в зручному місці.
    2. -
    3. Натисніть кнопку "Raw" на сторінці, яка призведе до появи вихідного коду на новій вкладці веб-браузера. Потім виберіть у меню вашого браузера  Файл > Зберегти як... а потім виберіть місце для збереження файлу.
    4. -
    -
  2. -
  3. Тепер відкрийте файл у своєму веб-браузері. Ви повинні побачити щось подібне: -

    A simple web page with the title set to <title> element, and the <h1> set to <h1> element. Тепер повинно бути абсолютно зрозуміло, в чому різниця між <h1> та <title>!

    -
  4. -
  5. Ви також маєте спробувати відкрити код в редакторі коду, відредагувати вміст цих елементів, а потім оновити сторінку у своєму веб-браузері. Поекспериментуйте з кодом, змінюючи його!
  6. -
- -

Зміст елементу <title> також використовується в інший спосіб. Наприклад, якщо ви спробуєте закласти сторінку (Закладки > Закласти цю сторінку або значок зірки в адресному рядку в Firefox), ви побачите зміст <title> заповнений як назва закладки.

- -

A webpage being bookmarked in firefox; the bookmark name has been automatically filled in with the contents of the <title> element

- -

Вміст <title> також використовується в результатах пошуку, як ви побачите нижче.

- -

Метадані: елемент <meta>

- -

Метадані - це дані, які описують дані, і HTML має "офіційний" спосіб додавання метаданих до документа - елемент {{htmlelement("meta")}}. Звичайно, інші речі, про які ми говоримо в цій статті, також можуть розглядатися як метадані. Існує багато різних типів елементів <meta> які можуть бути включені в <head> вашої сторінки, але не будемо намагатись пояснити їх усі на даному етапі, оскільки це може вас заплутати. Замість цього ми пояснимо декілька речей, які ви, можливо, зазвичай бачите, щоб розібратись, що до чого.

- -

Визначення кодування символів документа

- -

У прикладі, показаному вище, цей рядок також включений:

- -
<meta charset="utf-8">
- -

Цей елемент просто вказує кодування символів документа - набір символів, який документ може використовувати. utf-8 - це універсальний набір символів, що включає практично будь-які символи з будь-якої людської мови. Це означає, що ваша веб-сторінка зможе обробляти будь-яку мову; тому правильно встановити це кодування на кожній веб-сторінці, яку ви створюєте! Наприклад, ваша сторінка може чудово відображатись англійською та японською мовами:

- -

a web page containing English and Japanese characters, with the character encoding set to universal, or utf-8. Both languages display fine, Якщо ви встановите кодування символів, наприклад, ISO-8859-1,  (набір символів для латинського алфавіту), виведенний текст сторінок буде зіпсованим:

- -

a web page containing English and Japanese characters, with the character encoding set to latin. The Japanese characters don't display correctly

- -

Активне навчання: експеримент із кодуванням символів

- -

Щоб спробувати це, перегляньте простий шаблон HTML, який ви отримали в попередньому розділі <title> (the title-example.html page), спробуйте змінити значення мета-кодування на ISO-8859-1, і додайте японську мову на свою сторінку. Це текст, який ми використовували (до речі, там написано "рис гарячий"):

- -
<p>Japanese example: ご飯が熱い。</p>
- -

Додавання автора та опису

- -

Багато елементів <meta> містять атрибути name та content:

- - - -

Два таких мета-елемента, які корисні для включення в сторінку, визначають автора сторінки та надають стислий опис сторінки. Давайте подивимось на приклад:

- -
<meta name="author" content="Chris Mills">
-<meta name="description" content="Учбовий центр MDN спрямований на те,
-щоб надати всім новачкам в Інтернеті все, що їм необхідно знати,
-щоб приступити до розробки веб-сайтів і додатків.">
- -

Вказівка імені автора корисна по кількох причинах: корисно вміти розібратися, хто написав сторінку, якщо ви захочете зв'язатися з ним з питаннями про вміст. Деякі системи керування вмістом (CMS) мають можливості для автоматичного виявлення інформації про автора сторінок та надання доступу до них.

- -

Вказування опису, що містить ключові слова, що відносяться до вмісту вашої сторінки, є корисним, оскільки він може призвести до того, що ваша сторінка буде відображатися вище в результатах пошуку, що виконуються пошуковими системами (такі дії називаються Пошуковою оптимізацією, або {{glossary("SEO")}}.)

- -

Активне навчання: використання опису в пошукових системах

- -

Опис також використовується на сторінках результатів пошуку. Давайте пройдемо вправу, щоб вивчити це:

- -
    -
  1. Перейдіть на головну сторінку Mozilla Developer Network.
  2. -
  3. Перегляньте джерело сторінки (клікніть правою кнопкою миші на сторінці, виберіть Програмний код сторінки (View Page Source) із контекстного меню.
  4. -
  5. Знайдіть опис метатегів. Він буде виглядати так: -
    <meta name="description" content="The Mozilla Developer Network (MDN) provides
    -information about Open Web technologies including HTML, CSS, and APIs for both
    -Web sites and HTML5 Apps. It also documents Mozilla products, like Firefox OS.">
    -
  6. -
  7. Тепер знайдіть "Mozilla Developer Network" у вашій улюбленій пошуковій системі (Ми використовуємо Yahoo.) Ви помітите опис елементів вмісту <meta> та <title>, що використовуються в результатах пошуку — безумовно їх варто вказувати! -

    A Yahoo search result for "Mozilla Developer Network"

    -
  8. -
- -
-

Примітка: В Google ви побачите деякі важливі субсторінки MDN під посиланням на головну сторінку MDN - вони називаються посилання на сайт (sitelinks) і налаштовуються в інструментах Google для веб-майстрів Google's webmaster toolsце спосіб зробити результати пошуку вашого сайту кращими в пошуковій системі Google.

-
- -
-

Примітка: Багато функцій <meta> більше не використовуються. Наприклад, ключове слово <meta> елемента (<meta name="keywords" content="заповнити, в, ваші, ключові, слова, тут">) — який повинен забезпечити ключові слова для пошукових систем, щоб визначити релевантність цієї сторінки для різних пошукових термінів - нині ігноруються пошуковими системами, оскільки спамери просто заповнювали список ключових слів на сторінці сотнями ключових слів, щоб їх сайти з'являлись в результатах пошуку якомога вище.

-
- -

Інші типи метаданих

- -

Мандруючи Інтернетом ви також можете знайти інші типи метаданих. Багато функцій, які ви бачитимете на веб-сайтах, є власне створеними, призначеними для надання деяким сайтам (наприклад, сайтам соціальних мереж) певної інформації, яку вони можуть використовувати.

- -

Наприклад, Open Graph Data є протоколом метаданих, який Facebook винайшов для надання більш багатих метаданих для веб-сайтів. У коді MDN ви знайдете це:

- -
<meta property="og:image" content="https://developer.mozilla.org/static/img/opengraph-logo.png">
-<meta property="og:description" content="The Mozilla Developer Network (MDN) provides
-information about Open Web technologies including HTML, CSS, and APIs for both Web sites
-and HTML5 Apps. It also documents Mozilla products, like Firefox OS.">
-<meta property="og:title" content="Mozilla Developer Network">
- -

Одним з ефектів цього є те, що, коли ви посилаєтеся на MDN на Facebook, посилання з'являється разом із зображенням та описом: більш зручно для користувачів.

- -

Open graph protocol data from the MDN homepage as displayed on facebook, showing an image, title, and description.Twitter також має власні аналогічні запатентовані метадані, що мають подібний ефект, коли URL-адреса сайту відображається на twitter.com. Наприклад:

- -
<meta name="twitter:title" content="Mozilla Developer Network">
- -

Додавання власних іконок на сайт

- -

Щоб ще більше збагатити дизайн сайту, ви можете в метадані додавати посилання на власні іконки, і вони будуть відображатися у певних контекстах.

- -

Цей скромний значок, який існує протягом багатьох років, був першою піктограмою такого типу, значок 16 x 16 пікселів, який використовується в багатьох місцях. Ви побачите значки, які відображатимуться на вкладці веб-переглядача, що містять кожна відкрита сторінка, а також поруч зі сторінками, закладеними на панелі закладок.

- -

Іконка може бути додана на сторінку за допомогою:

- -
    -
  1. Зберігаючи її в тому самому каталозі, що й індексна сторінка сайту (index), збережена у форматі .ico (більшість браузерів підтримуватиме функцію favicons у більш поширених форматах, наприклад .gif або .png, але за допомогою формату ICO це гарантує, що він буде працювати ще в Internet Explorer 6).
  2. -
  3. Додайте наступний рядок в <head> HTML документу, щоб вказати іконку: -
    <link rel="shortcut icon" href="favicon.ico" type="image/x-icon">
    -
  4. -
- -

Ось приклад піктограми на панелі закладок:

- -

The Firefox bookmarks panel, showing a bookmarked example with a favicon displayed next to it.

- -

Також існує безліч інших типів іконок. Наприклад, ви знайдете їх в вихідному коді домашньої сторінки MDN:

- -
<!-- third-generation iPad with high-resolution Retina display: -->
-<link rel="apple-touch-icon-precomposed" sizes="144x144" href="https://developer.mozilla.org/static/img/favicon144.png">
-<!-- iPhone with high-resolution Retina display: -->
-<link rel="apple-touch-icon-precomposed" sizes="114x114" href="https://developer.mozilla.org/static/img/favicon114.png">
-<!-- first- and second-generation iPad: -->
-<link rel="apple-touch-icon-precomposed" sizes="72x72" href="https://developer.mozilla.org/static/img/favicon72.png">
-<!-- non-Retina iPhone, iPod Touch, and Android 2.1+ devices: -->
-<link rel="apple-touch-icon-precomposed" href="https://developer.mozilla.org/static/img/favicon57.png">
-<!-- basic favicon -->
-<link rel="shortcut icon" href="https://developer.mozilla.org/static/img/favicon32.png">
- -

У коментарях пояснюється, для чого використовується кожна іконка, наприклад, при додаванні сторінки на головний екран iPad буде використана іконка високої роздільної здатності.

- -

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

- -

Застосування CSS та JavaScript в HTML

- -

Практично всі веб-сайти, якими ви користуєтесь на сьогоднішній день, використовують {{glossary("CSS")}} щоб виглядати класно та {{glossary("JavaScript")}} для роботи інтерактивних функцій, таких як відеоплеєри , карти, ігри тощо. Зазвичай пов'язані стилі додають на сторінку за допомогою елементу {{htmlelement("link")}}, а скрипти за допомогою елементу {{htmlelement("script")}} відповідно.

- - - -

Активне навчання: застосування CSS та JavaScript на сторінці

- -
    -
  1. Щоб розпочати це активне навчання, візьміть копії наших meta-example.html, script.js та style.css файлів, і збережіть їх на своєму комп'ютері в тій же директорії. Переконайтеся, що вони збережені з правильними іменами та розширеннями файлів.
  2. -
  3. Відкрийте файл HTML у вашому браузері та текстовий редактор.
  4. -
  5. Виконавши ці кроки, додайте до вашого HTML документу елементи {{htmlelement("link")}} та {{htmlelement("script")}}, щоб CSS та JavaScript застосувались до HTML-документу.
  6. -
- -

Якщо все правильно зроблено, коли ви збережете свій HTML-код і оновите свій браузер, то побачите, що на сторінці все змінилося:

- -

Example showing a page with CSS and JavaScript applied to it. The CSS has made the page go green, whereas the JavaScript has added a dynamic list to the page.

- - - -
-

Примітка: Якщо ви застрягли в цій вправі і не можете застосувати CSS/JS на сторінці, то перегляньте нашу сторінку css-and-js.html з прикладом.

-
- -

Встановлення основної мови документа

- -

Нарешті, варто зазначити, що ви можете (і це необхідно) встановити мову своєї сторінки. Це можна зробити, додавши lang attribute (атрибут мови) до відкриваючого HTML-тегу (як показано в прикладі meta-example.html і показано нижче).

- -
<html lang="en-US">
- -

Це корисно в багатьох випадках. Ваш HTML-документ буде більш ефективно індексований пошуковими системами, які використовують це, щоб ефективніше індексувати сторінки — наприклад, показувати їх користувачам, які використовують відповідну мову (дозволяючи їй відображатися належним чином), і це корисно для людей з порушеннями зору, що використовують програми зчитування з екрана - скрінрідери (наприклад, слово "динозавр" говорять як українською, так й іншими мовами, але воно вимовляється по-різному).

- -

Ви також можете встановити підрозділи вашого документа, щоб вони розпізнавались різними мовами. В нашому прикладі з фрагментом японською мовою правильно вказати мову так:

- -
<p>Japanese example: <span lang="jp">ご飯が熱い。</span>.</p>
- -

Ці коди визначаються стандартом ISO 639-1. Ви можете дізнатись більше про них в Language tags in HTML and XML.

- -

Підсумок

- -

На цьому закінчим наш короткий огляд заголовку HTML — там ще багато всього корисного, але зараз повний перелік буде нудним і заплутає вас. Ви вже маєте загальне уявлення про найпоширеніші і використовуваніші елементи. У наступній статті ми розглянемо основи розмітки тексту в HTML.

- -

{{PreviousMenuNext("Learn/HTML/Introduction_to_HTML/Getting_started", "Learn/HTML/Introduction_to_HTML/HTML_text_fundamentals", "Learn/HTML/Introduction_to_HTML")}}

- -

 

- -

 

diff --git a/files/uk/learn/html/multimedia_and_embedding/index.html b/files/uk/learn/html/multimedia_and_embedding/index.html deleted file mode 100644 index 6dccf89410..0000000000 --- a/files/uk/learn/html/multimedia_and_embedding/index.html +++ /dev/null @@ -1,55 +0,0 @@ ---- -title: Вставки мультимедіа -slug: Learn/HTML/Multimedia_and_embedding -translation_of: Learn/HTML/Multimedia_and_embedding ---- -

{{LearnSidebar}}

- -

До цього часу ми переглянули багато тексту в цьому курсі, але Інтернет буде справді нудним лише за допомогою тексту. Давайте почнемо дивитись на те, як зробити веб-сайт живим, з більш цікавим вмістом! Цей модуль вивчає, як використовувати HTML для включення мультимедійних даних на ваші веб-сторінки, в тому числі різні способи додавання зображень, а також можливість вставки відео, аудіо та навіть цілих веб-сторінок.

- -

Передумови

- -

Перш ніж запускати цей модуль, ви повинні мати достатні знання про основи HTML, як це було описано раніше в "Вступ до HTML". Якщо ви не працювали через цей модуль (або щось подібне), спочатку спробуйте його, а потім поверніться!

- -
-

Примітка: Якщо ви працюєте на комп'ютері / планшеті / іншому пристрої, де ви не можете створювати власні файли, ви можете спробувати (більшість) прикладів коду в онлайн-програмі кодування, наприклад JSBin або Thimble.

- -

 

-
- -

Довідники

- -

Цей модуль містить наступні статті, в яких ви знайдете всі основи вставки мультимедіа на веб-сторінках.

- -
-
Зображення у форматі HTML
-
Існують і інші види мультимедійних засобів, але це логічно починати з скромного елемента {{htmlelement ("img")}}, який використовується для вставки простого зображення на веб-сторінку. У цій статті ми подивимося, як використовувати його більш глибоко, включаючи основні, анотований його підписом за допомогою {{htmlelement ("figure")}} і як він відноситься до фонових зображень CSS.
-
Відео та аудіозапис
-
Далі ми розглянемо, як використовувати HTML5 елементи {{htmlelement ("video")}} та {{htmlelement ("audio")}}, щоб вставити відео та аудіо на наші сторінки; включаючи основи, надання доступу до різних форматів файлів до різних веб-переглядачів, додавання субтитрів та субтитрів, а також можливість додавання відмов для застарілих веб-переглядачів.
-
Від <object> до <iframe> - інші технології вбудовування
-
На цьому етапі ми хотіли б трохи побороти крок, поглянувши на кілька елементів, які дозволяють вставляти різноманітні типи вмісту на свої веб-сторінки: {{htmlelement ("iframe")}}, елементи {{htmlelement ("embed")}} і {{htmlelement ("object")}}.  <iframe> для вбудовування інших веб-сторінок, а інші два дозволяють вставляти PDF-файли, SVG і навіть Flash-технологію на виході, але які ви все ще можете побачити напів-регулярно.
-
Додавання векторної графіки до Інтернету
-
Векторна графіка може бути дуже корисною в певних ситуаціях. На відміну від звичайних форматів, таких як PNG / JPG, вони не спотворюють / пікселюються при збільшенні - вони можуть залишатися гладкими при масштабування. Ця стаття знайомить вас із векторною графікою та як включити популярний {{glossary ("SVG")}} формат на веб-сторінках.
-
Відповідні зображення
-
За допомогою настільки різних типів пристроїв, які тепер можуть переглядати веб-сайти - від мобільних телефонів до настільних комп'ютерів - важливим поняттям для оволодіння сучасним веб-сайтом є чудовий дизайн. Це стосується створення веб-сторінок, які можуть автоматично змінювати свої функції відповідно до різних розмірів екрана, дозволів і т. Д. Це буде детально розглянуто в модулі CSS пізніше, але зараз ми розглянемо інструменти HTML доступний для створення чутливих зображень, включаючи елемент {{htmlelement ("picture")}}.
-
- -

Оцінки

- -

Наступні оцінки допоможуть перевірити розуміння базових основ HTML, описаних вище в посібниках.

- -
-
Сторінка сплесків Mozilla
-
У цій оцінці ми перевіримо ваші знання про деякі методи, описані в статтях цього модуля, що допоможе вам додати деякі зображення та відео на приголомшливу сторінку про все про Mozilla!
-
- -

Дивись також

- -
-
Додайте візитну карту догори зображення
-
Карти зображень забезпечують механізм створення різних частин посилання на зображення на різні місця (подумайте про карту, посилаючись на додаткову інформацію про кожну країну, на яку ви натискаєте). Ця техніка іноді може бути корисною.
-
Основи веб-грамотності 2
-
-

Відмінний курс навчання Mozilla, який вивчає та випробовує деякі з навичок, про які говорили в модулі мультимедіа та вбудовування. Зануртеся в основу створення веб-сторінок, розробки для доступності, спільного використання ресурсів, використання онлайн-засобів масової інформації та відкритої роботи (це означає, що ваш вміст є вільно доступним і доступним для обміну іншими користувачами).

-
-
diff --git a/files/uk/learn/html/tables/index.html b/files/uk/learn/html/tables/index.html deleted file mode 100644 index 3e5350587c..0000000000 --- a/files/uk/learn/html/tables/index.html +++ /dev/null @@ -1,40 +0,0 @@ ---- -title: HTML-таблиці -slug: Learn/HTML/Tables -translation_of: Learn/HTML/Tables ---- -
{{LearnSidebar}}
- -

Доволі поширеним завданням в HTML є структуризація табличних даних, і HTML має набір елементів та атрибутів саме для таких цілей. В поєднанні з CSS для стилізації, HTML полегшує відображення в інтернеті такої інформації, як шкільний навчальний план, розклад занять у вашому басейні, або статистику про ваших улюблених динозаврів чи футбольні команди. Даний модуль містить усе, що необхідно знати про структуризацію табличних даних за допомогою HTML.

- -

Передумови

- -

Перед тим як почати даний модуль, ви повинні пройти базовий курс HTML — дивіться Вступ до HTML.

- -
-

Note: If you are working on a computer/tablet/other device where you don't have the ability to create your own files, you could try out (most of) the code examples in an online coding program such as JSBin or Thimble.

-
- -

Зміст

- -

Даний модуль містить наступні статті:

- -

Основи HTML таблиць

- -
-
Дана стаття дозволить вам розпочати роботу з HTML таблицями, ознайомить з такими основними поняттями як рядки та клітини, заголовки, як розширити клітини на декілька колонок та рядків, а також як згрупувати усі клітини разом з метою стилізації.
-
- -

Особливості та доступність HTML таблиць

- -
-
В другій статті даного модулю ми більш детально розгядаємо особливості HTML таблиць - такі як captions/summaries та групування рядків в head, body та footer секції вашої таблиці - а також розглядаємо доступність таблиць для користувачів з вадами зору.
-
- -

Оцінювання

- -
-
Структуризація даних про планети
-

- У нашій табличній оцінці ми надаємо вам деякі дані про планети в нашій сонячній системі, які ви зможете структурувати в HTML таблицю.
-
diff --git a/files/uk/learn/index.html b/files/uk/learn/index.html deleted file mode 100644 index ad19811666..0000000000 --- a/files/uk/learn/index.html +++ /dev/null @@ -1,112 +0,0 @@ ---- -title: Вчимо веб-розробку -slug: Learn -tags: - - WWW - - Веб - - Покажчик - - Початківець - - вивчення -translation_of: Learn ---- -
{{LearnSidebar}}
- -
-

Ласкаво просимо до навчальної зони MDN. Ці статті покликані забезпечити початківців у веб-розробці всім необхідним, аби почати писати код простих сайтів.

-
- -

Мета цієї частини MDN не в тому, щоб зробити вас з «початківця» відразу «експертом» , а зробити вас «знаючим». Потім ви самі зможете вибрати подальший шлях, вивчаючи решту MDN, та інші розширені та професійні ресурси, що будуть підсумовувати попередні знання.

- -

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

- -
-

Важливо: Вміст навчальної зони постійно оновлюється. Якщо ви маєте запитання стосовно тем, які на вашу думку не висвітлені, зверніться до секції {{anch("Зв'яжіться з нами")}} нижче.

-
- -

З чого почати

- - - -
-

Нотатка: Наш Словник надає визначення термінологій.

-
- -

{{LearnBox({"title":"Випадковий запис в словнику"})}}

- -

Охоплені теми

- -

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

- -
-
Початок роботи з Інтернетом
-
Забезпечує практичне введення до веб-розробки для цілковитих початківців.
-
HTML - структурування інтернету
-
HTML - це мова, яку ми використовуємо для структурування різних частин нашого вмісту та визначення їх змісту чи призначення. Ця тема детально вчить HTML.
-
CSS — стилізація інтернету
-
CSS - це мова, яку ми можемо використовувати для зміни вигляду та представлення веб-контенту, а також додавання поведінки, як-от анімація. Ця тема всебічно охоплює CSS.
-
JavaScript — динамічні сценарії на стороні клієнта
-
JavaScript - це скриптова мова, що використовується для додавання динамічних функцій веб-сторінкам. Ця тема викладає всі необхідні, для комфортного написання та розуміння JavaScript, елементи.
-
Доступність — зробити інтернет зручним для всіх
-
Доступність - це практика створення веб-контенту для максимально можливої кількості людей незалежно від інвалідності, пристрою, мови та інших факторів, що відрізняються. Ця тема дає вам все, що вам потрібно знати.
-
Інструменти та тестування
-
Ця тема охоплює інструменти, які розробники використовують для полегшення їх роботи, як-от інструменти крос-браузерного тестування.
-
Програмування сайту на стороні сервера
-
Навіть якщо ви зосереджені на розробці веб-сторінок на стороні клієнта, корисно знати про те, як працюють сервери та серверні компоненти коду. Тема дає загальне уявлення про те, як працює серверна частина, а також докладні підручники, в яких описано, як створити серверну програму за допомогою двох популярних фреймворків — Django (Python) та Express (node.js). 
-
- -

Отримання прикладів нашого коду

- -

Всі приклади коду, які ви зустрінете в зоні навчання, доступні на GitHub. Якщо ви хочете скопіювати їх усі на свій комп'ютер, найпростішим способом є:

- -
    -
  1. Встановіть Git на вашу машину. Це основне програмне забезпечення системи керування версіями, на якому працює GitHub.
  2. -
  3. Отримайте обліковий запис на GitHub.
  4. -
  5. Після реєстрації, увійдіть на github.com за допомогою свого імені користувача та пароля.
  6. -
  7. Відкрийте командний рядок комп'ютера (Windows) або термінал (Linux, macOS).
  8. -
  9. Щоб скопіювати репозиторій зони навчання до папки під назвою learning area у поточному розташуванні, яке вказує ваш командний рядок/термінал, скористайтеся цією командою: -
    git clone https://github.com/mdn/learning-area
    -
  10. -
  11. Тепер ви можете ввести каталог та потім знаходити ваші файли, (використовуючи шукач/файловий провідник або команду cd).
  12. -
- -

Ви можете оновити репозиторій learning-area з будь-якими змінами, внесеними до основної версії на GitHub, таким чином:

- -
    -
  1. У командному рядку/терміналі перейдіть до каталогу learning-area, використовуючи cd. Наприклад, якщо ви були в батьківському каталозі: - -
    cd learning-area
    -
  2. -
  3. Оновіть репозиторій, використовуючи таку команду: -
    git pull
    -
  4. -
- -

Зв'яжіться з нами

- -

Якщо ви хочете зв'язатись з нами з будь-якої підстави, надішліть нам листа на поштові списки або в IRC канал. Ми хочемо дізнатись вашу думку стосовно помилок та неточностей на сайті, запити нових навчальних тем, запити про допомогу по незрозумілим інструментам чи будь-що інше.

- -

Якщо ви зацікавлені розвивати/вдосконалювати зміст, погляньте Як ви можете допомогти, і дайтесь чути! Ми будемо надзвичайно щасливі поспілкуватись з вами, не дивлячись на те, хто ви — студент, викладач, досвідчений веб-розробник або будь-хто зацікавлений допомогти у вдосконалені навчального досвіду.

- -

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

- -
-
Mozilla Developer Newsletter
-
Наш інформаційний бюлетень для веб-розробників, який є чудовим ресурсом для всіх рівнів досвіду.
-
Codecademy
-
Чудовий інтерактивний сайт для вивчення мов програмування з нуля.
-
Code.org
-
Базова теорія написання коду та практика, здебільшого для дітей та повних новачків.
-
EXLskills 
-
Безкоштовні та відкриті курси для вивчення технічних навичок, з наставництвом та проектом навчання
-
Web Literacy Map
-
Платформа для початкового рівня веб-грамотності та навичок 21 століття, що також забезпечує доступ до викладацьких матеріалів, відсортованих за категоріями.
-
Teaching activities
-
Серія навчальних матеріалів для викладання (та навчання), створених Фондом Мозіла, що охоплює все, починаючи від базової грамотності в Інтернеті та конфіденційності, до JavaScript і зламу Minecraft.
-
Edabit
-
Сотні безкоштовних інтерактивних завдань по кодуванню на різних мовах.
-
diff --git a/files/uk/learn/javascript/asynchronous/index.html b/files/uk/learn/javascript/asynchronous/index.html deleted file mode 100644 index 355477ead5..0000000000 --- a/files/uk/learn/javascript/asynchronous/index.html +++ /dev/null @@ -1,52 +0,0 @@ ---- -title: Асинхронний JavaScript -slug: Learn/JavaScript/Asynchronous -translation_of: Learn/JavaScript/Asynchronous -original_slug: Learn/JavaScript/Асинхронний ---- -
{{LearnSidebar}}
- -

In this module we take a look at {{Glossary("asynchronous")}} {{Glossary("JavaScript")}}, why it is important, and how it can be used to effectively handle potential blocking operations such as fetching resources from a server.

- -
-

Looking to become a front-end web developer?

- -

We have put together a course that includes all the essential information you need to work towards your goal.

- -

Get started

-
- -

Prerequisites

- -

Asynchronous JavaScript is a fairly advanced topic, and you are advised to work through JavaScript first steps and JavaScript building blocks modules before attempting this.

- -

If you are not familiar with the concept of asynchronous programming, you should definitely start with the General asynchronous programming concepts article in this module. If you are, then you can probably skip to the Introducing asynchronous JavaScript module.

- -
-

Note: If you are working on a computer/tablet/other device where you don't have the ability to create your own files, you can try out (most of) the code examples in an online coding program such as JSBin or Glitch.

-
- -

Guides

- -
-
General asynchronous programming concepts
-
-

In this article we'll run through a number of important concepts relating to asynchronous programming, and how this looks in web browsers and JavaScript. You should understand these concepts before working through the other articles in the module.

-
-
Introducing asynchronous JavaScript
-
In this article we briefly recap the problems associated with sychronous JavaScript, and take a first look at some of the different asynchronous JavaScript techniques you'll encounter, showing how they can help us solve such problems.
-
Cooperative asynchronous JavaScript: Timeouts and intervals
-
Here we look at the traditional methods JavaScript has available for running code asychronously after a set time period has elapsed, or at a regular interval (e.g. a set number of times per second), talk about what they are useful for, and look at their inherent issues.
-
Handling async operations gracefully with Promises
-
Promises are a comparatively new feature of the JavaScript language that allow you to defer further actions until after the previous action has completed, or respond to its failure. This is really useful for setting up a sequence of operations to work correctly. This article shows you how promises work, where you'll see them in use in WebAPIs, and how to write your own.
-
Making asynchronous programming easier with async and await
-
Promises can be somewhat complex to set up and understand, and so modern browsers have implemented async functions and the await operator. The former allows standard functions to implicitly behave asynchronously with promises, whereas the latter can be used inside async functions to wait for promises before the function continues. This makes chaining promises simpler and easier to read.
-
Choosing the right approach
-
To finish this module off, we'll consider the different coding techniques and features we've discussed throughout, looking at which ones you should use when, with recommendations and reminders of common pitfalls where appropriate.
-
- -

See also

- - diff --git a/files/uk/learn/javascript/building_blocks/index.html b/files/uk/learn/javascript/building_blocks/index.html deleted file mode 100644 index b33be235cb..0000000000 --- a/files/uk/learn/javascript/building_blocks/index.html +++ /dev/null @@ -1,58 +0,0 @@ ---- -title: Будівельні блоки JavaScript -slug: Learn/JavaScript/Building_blocks -translation_of: Learn/JavaScript/Building_blocks -original_slug: Learn/JavaScript/Будівельні_блоки ---- -
{{LearnSidebar}}
- -

In this module, we continue our coverage of all JavaScript's key fundamental features, turning our attention to commonly-encountered types of code blocks such as conditional statements, loops, functions, and events. You've seen this stuff already in the course, but only in passing — here we'll discuss it all explicitly.

- -
-

Looking to become a front-end web developer?

- -

We have put together a course that includes all the essential information you need to work towards your goal.

- -

Get started

-
- -

Prerequisites

- -

Before starting this module, you should have some familiarity with the basics of HTML and CSS, and you should have also worked through our previous module, JavaScript first steps.

- -
-

Note: If you are working on a computer/tablet/other device where you don't have the ability to create your own files, you could try out (most of) the code examples in an online coding program such as JSBin or Glitch.

-
- -

Guides

- -
-
Making decisions in your code — conditionals
-
In any programming language, code needs to make decisions and carry out actions accordingly depending on different inputs. For example, in a game, if the player's number of lives is 0, then it's game over. In a weather app, if it is being looked at in the morning, show a sunrise graphic; show stars and a moon if it is nighttime. In this article we'll explore how conditional structures work in JavaScript.
-
Looping code
-
Sometimes you need a task done more than once in a row. For example, looking through a list of names. In programming, loops perform this job very well. Here we will look at loop structures in JavaScript.
-
Functions — reusable blocks of code
-
Another essential concept in coding is functions. Functions allow you to store a piece of code that does a single task inside a defined block, and then call that code whenever you need it using a single short command — rather than having to type out the same code multiple times. In this article we'll explore fundamental concepts behind functions such as basic syntax, how to invoke and define functions, scope, and parameters.
-
Build your own function
-
With most of the essential theory dealt with previously, this article provides a practical experience. Here you'll get some practice with building up your own custom function. Along the way, we'll also explain some further useful details of dealing with functions.
-
Function return values
-
The last essential concept you must know about a function is return values. Some functions don't return a significant value after completion, but others do. It's important to understand what their values are, how to make use of them in your code, and how to make your own custom functions return useful values. 
-
Introduction to events
-
Events are actions or occurrences that happen in the system you are programming, which the system tells you about so you can respond to them in some way if desired. For example if the user clicks a button on a webpage, you might want to respond to that action by displaying an information box. In this final article we will discuss some important concepts surrounding events, and look at how they work in browsers.
-
- -

Assessments

- -

The following assessment will test your understanding of the JavaScript basics covered in the guides above.

- -
-
Image gallery
-
Now that we've looked at the fundamental building blocks of JavaScript, we'll test your knowledge of loops, functions, conditionals and events by building a fairly common item you'll see on a lot of websites — a JavaScript-powered image gallery.
-
- -

See also

- -
-
Learn JavaScript
-
An excellent resource for aspiring web developers — Learn JavaScript in an interactive environment, with short lessons and interactive tests, guided by automated assessment. The first 40 lessons are free, and the complete course is available for a small one-time payment.
-
diff --git a/files/uk/learn/javascript/client-side_web_apis/index.html b/files/uk/learn/javascript/client-side_web_apis/index.html deleted file mode 100644 index ee5df2ea53..0000000000 --- a/files/uk/learn/javascript/client-side_web_apis/index.html +++ /dev/null @@ -1,43 +0,0 @@ ---- -title: Веб-APIs на стороні клієнта -slug: Learn/JavaScript/Client-side_web_APIs -translation_of: Learn/JavaScript/Client-side_web_APIs ---- -
{{LearnSidebar}}
- -
При написанні клієнтського JavaScript для веб-сайтів або додатків, ви досить скоро зустрінитесь з Інтерфейсами для Програмування Додатків (APIs). APIs є функціями програмування, що надають можливість маніпулювання різними аспектами браузера та операційної системи, на якій працює сайт, або обробки даних з інших веб-сайтів або службю. У цьому модулі ми розглянемо, що таке API, і як використовувати деякі з найбільш поширених API, які ви часто зустрічаєте в процесі розробки.
- -

Prerequisites

- -

Щоб даний модуль був максимально корисним, ми рекомендуємо вам пройти попередні JavaScript модулі у серії (First steps, Building blocks, та JavaScript objects). Дані модулі, як правило, передбачають просте використання API, тому що зачасту досить важко писати приклади клієнтського JavaScript без них. Для даної інструкції ми припустимо, що ви ознайомлені з основами мови JavaScript, та вивчимо загальні Web APIs більш детально.

- -

Базові знання HTML та CSS також будуть корисними.

- -
-

Note: If you are working on a device where you don't have the ability to create your own files, you could try out (most of) the code examples in an online coding program such as JSBin or Thimble.

-
- -

Guides

- -
-
Introduction to web APIs
-
Перш за все, ми почнемо з розгляду APIs з високого рівня - що вони собою представляють, як вони працюють, як використовувати їх у власному коді та яку вони мають структуру? Ми також розглянемо, що таке різні основні класи APIs та як вони використовуються.
-
- -
-
Manipulating documents
-
При написанні веб-сторінок і додатків однією з найпоширеніших речей, яку ви захочете зробити це маніпуляція веб-документами. Зазвичай це робиться за допомогою об'єктної моделі документа (DOM), набору API для керування HTML та інформацією про стиль, яка використовує об'єкт {{domxref ("Document")}}. У цій статті ми детально розглянемо, як використовувати DOM, а також деякі інші цікаві API, які можуть змінити ваше середовище цікавими способами.
-
Fetching data from the server
-
Іншим дуже поширеним завданням на сучасних веб-сайтах і додатках є отримання окремих елементів даних з сервера для оновлення розділів веб-сторінки без необхідності завантажувати абсолютно нову сторінку. Ця, здавалося б, невелика деталь мала величезний вплив на продуктивність і поведінку сайтів. У цій статті ми пояснимо концепцію і розглянемо технології, які роблять це можливим, наприклад, {{domxref ("XMLHttpRequest")}} і Fetch API.
-
Third party APIs
-
APIs, які ми розглянули є вбудованими в браузер, але не всі APIs є частиною браузерів. Багато великих веб-сайтів і служб, таких як Google Maps, Twitter, Facebook, PayPal тощо, надають API, що дозволяють розробникам використовувати свої дані (наприклад, показувати ваш Twitter  у вашому блозі) або послуги (наприклад, показувати індивідуально налаштовані Google Maps на вашому сайті або використання логіна Facebook для входу в систему користувачів. У цій статті розглядаються відмінності між API браузера та APIs третьої сторони і показано деякі типові використання останнього.
-
- -
-
Drawing graphics
-
Браузер містить деякі дуже потужні засоби графічного програмування, від мови масштабованої векторної графіки (SVG), до APIs для малювання елементів HTML {{htmlelement ("canvas")}} (див. The Canvas API та WebGL). Ця стаття містить вступ до Canvas API, а також додаткові ресурси, які дозволять вам дізнатися більше.
-
Video and audio APIs
-
HTML5 поставляється з елементами для вбудовування мультимедійних даних у документи - {{htmlelement ("відео")}} і {{htmlelement ("аудіо")}} - які, в свою чергу, мають власні APIs для керування відтворенням, пошуком і т.д. Дана стаття демонструє, як виконувати звичайні завдання, наприклад, створювати власні елементи керування відтворенням.
-
Client-side storage
-
Сучасні веб-браузери мають ряд різних технологій, які дозволяють зберігати дані, пов'язані з веб-сайтами, і отримувати їх у разі необхідності, дозволяючи зберігати дані на довгий термін, зберігати сайти в автономному режимі та багато іншого. У цій статті пояснюються основи як це все працює.
-
diff --git a/files/uk/learn/javascript/first_steps/index.html b/files/uk/learn/javascript/first_steps/index.html deleted file mode 100644 index 023c9c97e6..0000000000 --- a/files/uk/learn/javascript/first_steps/index.html +++ /dev/null @@ -1,69 +0,0 @@ ---- -title: Перші кроки у JavaScript -slug: Learn/JavaScript/First_steps -tags: - - Arrays - - Article - - Assessment - - Beginner - - CodingScripting - - Guide - - JavaScript - - Landing - - Module - - Numbers - - Operators - - Variables - - maths - - strings - - Мова - - Україньська -translation_of: Learn/JavaScript/First_steps ---- -
{{LearnSidebar}}
- -

У нашому першому модулі JavaScript ми спочатку відповімо на деякі фундаментальні питання, такі як "Що таке JavaScript?", "Як він виглядає?" Та "Що він може робити?", Перш ніж перейти до першого практичного досвіду написання JavaScript. Після цього ми детально обговоримо деякі основні елементи, такі як змінні, рядки, числа та масиви.

- -

Передумови

- -

Для того щоб почати з цього модуля, вам не потрібні попередні знання JavaScript, однак ви повинні бути добре знайомі з HTML та CSS. Перед початком роботи з JavaScript вам рекомендується виконати такі модулі:

- - - -
-

Примітка: Якщо ви працюєте на комп'ютері / планшеті / іншому пристрої, де ви не можете створювати власні файли, можна спробувати (більшість) прикладів коду в онлайн-програмі кодування, наприклад, JSBin або Thimble.

-
- -

Посібники

- -
-
Що таке JavaScript?
-
Ласкаво просимо до курсу JavaScript для новачків MDN! У цій першій статті ми розглянемо JavaScript з висоти, відповідаючи на такі запитання, як "що це таке?" Та "що воно робить?", і переконаємось у тому, що JavaScript відповідає вашим вимогам.
-
Перші спроби на JavaScript
-
Тепер ви дізнались щось про теорію JavaScript, і що ви можете з ним робити, ми збираємося дати вам курс по написанню основних функцій JavaScript за допомогою повністю практичного підручника. Тут ви створите просту гру "Вгадай номер", крок за кроком.
-
Що пішло не так? Усунення несправностей JavaScript
-
Коли ви створили гру "Вгадай номер" в попередній статті, ви помітили, що программа не працює. Ніколи не бійтеся - ця стаття спрямована на те, щоб позбавити вас від виривання волосся на голові при виникненні таких проблем, надаючи вам прості поради щодо того, як знайти та виправити помилки у програмах JavaScript.
-
Збереження потрібної вам інформації - змінні
-
Тепер прочитавши останні пару статей, ви повинні знати, що таке JavaScript, що він може зробити для вас, як вам використовувати його разом з іншими веб-технологіями та які його функції є високорівневими. У цій статті ми перейдемо до справжніх основ дивлячись як працювати з основними будівельними блоками JavaScript-змінних.
-
Основи математики в JavaScript - цифри та оператори
-
На цьому етапі ми обговорюємо математику в JavaScript - як ми можемо об'єднати оператори та інші функції, щоб успішно оперувати числами в наших командах.
-
Обробка текстових рядків у JavaScript
-
Далі ми звернемо увагу на рядки - що є фрагментами тексту при програмуванні. У цій статті ми розглянемо всі загальні речі, які ви повинні знати про рядки при вивченні JavaScript, такі як створення рядків, використання лапок в рядку, та їх об'єднання.
-
Корисні рядкові методи
-
Тепер коли ми розглянули основи рядків, давайте перейдемо до механізму та почнемо вивчати корисні операції які ми можемо виконувати в рядках за допомогою вбудованих методів, таких як пошук довжини текстового рядка, об'єднання та розбиття рядків, заміна одного символу в рядку іншим, і так далі.
-
Масиви
-
У заключній статті цього модуля ми розглянемо масиви - обережний спосіб зберігання списку елементів даних під одним ім'ям змінної. Тут ми розглянемо, чому це корисно, а потім навчимось створювати масиви, витягувати, додавати і видаляти елементи, що зберігаються в масиві, і інше.
-
- -

Оцінки

- -

Наступна оцінка перевірить ваше розуміння базових правил JavaScript, описаних вище в посібниках.

- -
-
Генератор випадкових історій
-
У цьому оцінюванні вам буде запропоновано застосувати деякі знання, здобуті у статтях цього модуля, і застосувати їх для створення веселого прикладу, який генеруватиме випадкові історії. Порозважайтеся!
-
diff --git a/files/uk/learn/javascript/first_steps/what_is_javascript/index.html b/files/uk/learn/javascript/first_steps/what_is_javascript/index.html deleted file mode 100644 index a3ca8c054d..0000000000 --- a/files/uk/learn/javascript/first_steps/what_is_javascript/index.html +++ /dev/null @@ -1,422 +0,0 @@ ---- -title: What is JavaScript? -slug: Learn/JavaScript/First_steps/What_is_JavaScript -translation_of: Learn/JavaScript/First_steps/What_is_JavaScript ---- -
{{LearnSidebar}}
- -
{{NextMenu("Learn/JavaScript/First_steps/A_first_splash", "Learn/JavaScript/First_steps")}}
- -
Ласкаво просимо до курсу для новачків від MDN! В цій статті ми подивимося на JavaScript в загальному, пробуючи дати відповідь на запитання "Що це таке?" і "Що ти можеш з ним зробити?". Нашою ціллю буде ознайомити тебе з метою JavaScript-та в ІТ сфері.
- - - - - - - - - - - - -
Потрібні знання:Базове розуміння культури програмування, базові знання HTML і CSS
Ціль: -

Отримати розуміння, що таке JavaScript, на що він здатний, і як він забезпечує роботу веб сторінок

-
- -

Поверхневе визначення

- -

JavaScript - це мова програмування, що дозволяє тобі створювати складні речі на веб сторінках. Якщо веб сторінка робить, щось більше ніж просто показує статичну інформацію, наприклад: виконує моніторинг в реальному часі, інтерактивні карти, анімовану 2D/3D графіку, здатна на параллакс-скроллинг - ти можеш бути досить впевненим, що це без JavaScript там не обійшлося. Це є третій шар стандартного веб торту, з двома з них (HTML і CSS) ми ознайомилися в більших деталях в інших частинах курсу Навчальної зони (Learning Area).

- -

- - - -

The three layers build on top of one another nicely. Let's take a simple text label as an example. We can mark it up using HTML to give it structure and purpose:

- -
<p>Player 1: Chris</p>
- -

- -

Then we can add some CSS into the mix to get it looking nice:

- -
p {
-  font-family: 'helvetica neue', helvetica, sans-serif;
-  letter-spacing: 1px;
-  text-transform: uppercase;
-  text-align: center;
-  border: 2px solid rgba(0,0,200,0.6);
-  background: rgba(0,0,200,0.3);
-  color: rgba(0,0,200,0.6);
-  box-shadow: 1px 1px 2px rgba(0,0,200,0.4);
-  border-radius: 10px;
-  padding: 3px 10px;
-  display: inline-block;
-  cursor: pointer;
-}
- -

- -

And finally, we can add some JavaScript to implement dynamic behaviour:

- -
const para = document.querySelector('p');
-
-para.addEventListener('click', updateName);
-
-function updateName() {
-  let name = prompt('Enter a new name');
-  para.textContent = 'Player 1: ' + name;
-}
-
- -

{{ EmbedLiveSample('A_high-level_definition', '100%', 80, "", "", "hide-codepen-jsfiddle") }}

- -

Try clicking on this last version of the text label to see what happens (note also that you can find this demo on GitHub — see the source code, or run it live)!

- -

JavaScript can do a lot more than that — let's explore what in more detail.

- -

So what can it really do?

- -

The core client-side JavaScript language consists of some common programming features that allow you to do things like:

- - - -

What is even more exciting however is the functionality built on top of the client-side JavaScript language. So-called Application Programming Interfaces (APIs) provide you with extra superpowers to use in your JavaScript code.

- -

APIs are ready-made sets of code building blocks that allow a developer to implement programs that would otherwise be hard or impossible to implement. They do the same thing for programming that ready-made furniture kits do for home building — it is much easier to take ready-cut panels and screw them together to make a bookshelf than it is to work out the design yourself, go and find the correct wood, cut all the panels to the right size and shape, find the correct-sized screws, and then put them together to make a bookshelf.

- -

They generally fall into two categories.

- -

- -

Browser APIs are built into your web browser, and are able to expose data from the surrounding computer environment, or do useful complex things. For example:

- - - -
-

Note: Many of the above demos won't work in an older browser — when experimenting, it's a good idea to use a modern browser like Firefox, Chrome, Edge or Opera to run your code in. You will need to consider cross browser testing in more detail when you get closer to delivering production code (i.e. real code that real customers will use).

-
- -

Third party APIs are not built into the browser by default, and you generally have to grab their code and information from somewhere on the Web. For example:

- - - -
-

Note: These APIs are advanced, and we'll not be covering any of these in this module. You can find out much more about these in our Client-side web APIs module.

-
- -

There's a lot more available, too! However, don't get over excited just yet. You won't be able to build the next Facebook, Google Maps, or Instagram after studying JavaScript for 24 hours — there are a lot of basics to cover first. And that's why you're here — let's move on!

- -

What is JavaScript doing on your page?

- -

Here we'll start actually looking at some code, and while doing so explore what actually happens when you run some JavaScript in your page.

- -

Let's briefly recap the story of what happens when you load a web page in a browser (first talked about in our How CSS works article). When you load a web page in your browser, you are running your code (the HTML, CSS, and JavaScript) inside an execution environment (the browser tab). This is like a factory that takes in raw materials (the code) and outputs a product (the web page).

- -

- -

The JavaScript is executed by the browser's JavaScript engine, after the HTML and CSS have been assembled and put together into a web page. This ensures that the structure and style of the page are already in place by the time the JavaScript starts to run.

- -

This is a good thing, as a very common use of JavaScript is to dynamically modify HTML and CSS to update a user interface, via the Document Object Model API (as mentioned above). If the JavaScript loaded and tried to run before the HTML and CSS were there to affect, then errors would occur.

- -

Browser security

- -

Each browser tab is its own separate bucket for running code in (these buckets are called "execution environments" in technical terms) — this means that in most cases the code in each tab is run completely separately, and the code in one tab cannot directly affect the code in another tab — or on another website. This is a good security measure — if this were not the case, then pirates could start writing code to steal information from other websites, and other such bad things.

- -
-

Note: There are ways to send code and data between different websites/tabs in a safe manner, but these are advanced techniques that we won't cover in this course.

-
- -

JavaScript running order

- -

When the browser encounters a block of JavaScript, it generally runs it in order, from top to bottom. This means that you need to be careful what order you put things in. For example, let's return to the block of JavaScript we saw in our first example:

- -
const para = document.querySelector('p');
-
-para.addEventListener('click', updateName);
-
-function updateName() {
-  let name = prompt('Enter a new name');
-  para.textContent = 'Player 1: ' + name;
-}
- -

Here we are selecting a text paragraph (line 1), then attaching an event listener to it (line 3) so that when the paragraph is clicked, the updateName() code block (lines 5–8) is run. The updateName() code block (these types of reusable code blocks are called "functions") asks the user for a new name, and then inserts that name into the paragraph to update the display.

- -

If you swapped the order of the first two lines of code, it would no longer work — instead, you'd get an error returned in the browser developer consoleTypeError: para is undefined. This means that the para object does not exist yet, so we can't add an event listener to it.

- -
-

Note: This is a very common error — you need to be careful that the objects referenced in your code exist before you try to do stuff to them.

-
- -

Interpreted versus compiled code

- -

You might hear the terms interpreted and compiled in the context of programming. In interpreted languages, the code is run from top to bottom and the result of running the code is immediately returned. You don't have to transform the code into a different form before the browser runs it. The code is received in its programmer-friendly text form and processed directly from that.

- -

Compiled languages on the other hand are transformed (compiled) into another form before they are run by the computer. For example, C/C++ are compiled into assembly language that is then run by the computer. The program is executed from a binary format which was generated from the original program source code.

- -

JavaScript is a lightweight interpreted programming language. The web browser receives the JavaScript code in its original text form and runs the script from that. From a technical standpoint, most modern JavaScript interpreters actually use a technique called just-in-time compiling to improve performance; the JavaScript source code gets compiled into a faster, binary, format while the script is being used, so that it can be run as quickly as possible. However, JavaScript is still considered an intepreteted language, since the compilation is being handled at run time, rather than ahead of time.

- -

There are advantages to both types of language, but we won't discuss them right now.

- -

Server-side versus client-side code

- -

You might also hear the terms server-side and client-side code, especially in the context of web development. Client-side code is code that is run on the user's computer — when a web page is viewed, the page's client-side code is downloaded, then run and displayed by the browser. In this module we are explicitly talking about client-side JavaScript.

- -

Server-side code on the other hand is run on the server, then its results are downloaded and displayed in the browser. Examples of popular server-side web languages include PHP, Python, Ruby, ASP.NET and... JavaScript! JavaScript can also be used as a server-side language, for example in the popular Node.js environment — you can find out more about server-side JavaScript in our Dynamic Websites – Server-side programming topic.

- -

Dynamic versus static code

- -

The word dynamic is used to describe both client-side JavaScript, and server-side languages — it refers to the ability to update the display of a web page/app to show different things in different circumstances, generating new content as required. Server-side code dynamically generates new content on the server, e.g. pulling data from a database, whereas client-side JavaScript dynamically generates new content inside the browser on the client, e.g. creating a new HTML table, filling it with data requested from the server, then displaying the table in a web page shown to the user. The meaning is slightly different in the two contexts, but related, and both approaches (server-side and client-side) usually work together.

- -

A web page with no dynamically updating content is referred to as static — it just shows the same content all the time.

- -

How do you add JavaScript to your page?

- -

JavaScript is applied to your HTML page in a similar manner to CSS. Whereas CSS uses {{htmlelement("link")}} elements to apply external stylesheets and {{htmlelement("style")}} elements to apply internal stylesheets to HTML, JavaScript only needs one friend in the world of HTML — the {{htmlelement("script")}} element. Let's learn how this works.

- -

Internal JavaScript

- -
    -
  1. First of all, make a local copy of our example file apply-javascript.html. Save it in a directory somewhere sensible.
  2. -
  3. Open the file in your web browser and in your text editor. You'll see that the HTML creates a simple web page containing a clickable button.
  4. -
  5. Next, go to your text editor and add the following in your head — just before your closing </head> tag: -
    <script>
    -
    -  // JavaScript goes here
    -
    -</script>
    -
  6. -
  7. Now we'll add some JavaScript inside our {{htmlelement("script")}} element to make the page do something more interesting — add the following code just below the "// JavaScript goes here" line: -
    document.addEventListener("DOMContentLoaded", function() {
    -  function createParagraph() {
    -    let para = document.createElement('p');
    -    para.textContent = 'You clicked the button!';
    -    document.body.appendChild(para);
    -  }
    -
    -  const buttons = document.querySelectorAll('button');
    -
    -  for(let i = 0; i < buttons.length ; i++) {
    -    buttons[i].addEventListener('click', createParagraph);
    -  }
    -});
    -
  8. -
  9. Save your file and refresh the browser — now you should see that when you click the button, a new paragraph is generated and placed below.
  10. -
- -
-

Note: If your example doesn't seem to work, go through the steps again and check that you did everything right. Did you save your local copy of the starting code as a .html file? Did you add your {{htmlelement("script")}} element just before the </head> tag? Did you enter the JavaScript exactly as shown? JavaScript is case sensitive, and very fussy, so you need to enter the syntax exactly as shown, otherwise it may not work.

-
- -
-

Note: You can see this version on GitHub as apply-javascript-internal.html (see it live too).

-
- -

External JavaScript

- -

This works great, but what if we wanted to put our JavaScript in an external file? Let's explore this now.

- -
    -
  1. First, create a new file in the same directory as your sample HTML file. Call it script.js — make sure it has that .js filename extension, as that's how it is recognized as JavaScript.
  2. -
  3. Replace your current {{htmlelement("script")}} element with the following: -
    <script src="script.js" defer></script>
    -
  4. -
  5. Inside script.js, add the following script: -
    function createParagraph() {
    -  let para = document.createElement('p');
    -  para.textContent = 'You clicked the button!';
    -  document.body.appendChild(para);
    -}
    -
    -const buttons = document.querySelectorAll('button');
    -
    -for(let i = 0; i < buttons.length ; i++) {
    -  buttons[i].addEventListener('click', createParagraph);
    -}
    -
  6. -
  7. Save and refresh your browser, and you should see the same thing! It works just the same, but now we've got our JavaScript in an external file. This is generally a good thing in terms of organizing your code and making it reusable across multiple HTML files. Plus, the HTML is easier to read without huge chunks of script dumped in it.
  8. -
- -
-

Note: You can see this version on GitHub as apply-javascript-external.html and script.js (see it live too).

-
- -

Inline JavaScript handlers

- -

Note that sometimes you'll come across bits of actual JavaScript code living inside HTML. It might look something like this:

- -
-
function createParagraph() {
-  let para = document.createElement('p');
-  para.textContent = 'You clicked the button!';
-  document.body.appendChild(para);
-}
- -
<button onclick="createParagraph()">Click me!</button>
-
- -

You can try this version of our demo below.

- -

{{ EmbedLiveSample('inline_js_example', '100%', 150, "", "", "hide-codepen-jsfiddle") }}

- -

This demo has exactly the same functionality as in the previous two sections, except that the {{htmlelement("button")}} element includes an inline onclick handler to make the function run when the button is pressed.

- -

Please don't do this, however. It is bad practice to pollute your HTML with JavaScript, and it is inefficient — you'd have to include the onclick="createParagraph()" attribute on every button you wanted the JavaScript to apply to.

- -

Using a pure JavaScript construct allows you to select all the buttons using one instruction. The code we used above to serve this purpose looks like this:

- -
const buttons = document.querySelectorAll('button');
-
-for(let i = 0; i < buttons.length ; i++) {
-  buttons[i].addEventListener('click', createParagraph);
-}
- -

This might be a bit longer than the onclick attribute, but it will work for all buttons — no matter how many are on the page, nor how many are added or removed. The JavaScript does not need to be changed.

- -
-

Note: Try editing your version of apply-javascript.html and add a few more buttons into the file. When you reload, you should find that all of the buttons when clicked will create a paragraph. Neat, huh?

-
- -

Script loading strategies

- -

There are a number of issues involved with getting scripts to load at the right time. Nothing is as simple as it seems! A common problem is that all the HTML on a page is loaded in the order in which it appears. If you are using JavaScript to manipulate elements on the page (or more accurately, the Document Object Model), your code won't work if the JavaScript is loaded and parsed before the HTML you are trying to do something to.

- -

In the above code examples, in the internal and external examples the JavaScript is loaded and run in the head of the document, before the HTML body is parsed. This could cause an error, so we've used some constructs to get around it.

- -

In the internal example, you can see this structure around the code:

- -
document.addEventListener("DOMContentLoaded", function() {
-  ...
-});
- -

This is an event listener, which listens for the browser's "DOMContentLoaded" event, which signifies that the HTML body is completely loaded and parsed. The JavaScript inside this block will not run until after that event is fired, therefore the error is avoided (you'll learn about events later in the course).

- -

In the external example, we use a more modern JavaScript feature to solve the problem, the defer attribute, which tells the browser to continue downloading the HTML content once the <script> tag element has been reached.

- -
<script src="script.js" defer></script>
- -

In this case both the script and the HTML will load simultaneously and the code will work.

- -
-

Note: In the external case, we did not need to use the DOMContentLoaded event because the defer attribute solved the problem for us. We didn't use the defer solution for the internal JavaScript example because defer only works for external scripts.

-
- -

An old-fashioned solution to this problem used to be to put your script element right at the bottom of the body (e.g. just before the </body> tag), so that it would load after all the HTML has been parsed. The problem with this solution is that loading/parsing of the script is completely blocked until the HTML DOM has been loaded. On larger sites with lots of JavaScript, this can cause a major performance issue, slowing down your site.

- -

async and defer

- -

There are actually two ways we can bypass the problem of the blocking script — async and defer. Let's look at the difference between these two.

- -

Async scripts will download the script without blocking rendering the page and will execute it as soon as the script finishes downloading. You get no guarantee that scripts will run in any specific order, only that they will not stop the rest of the page from displaying. It is best to use async when the scripts in the page run independently from each other and depend on no other script on the page.

- -

For example, if you have the following script elements:

- -
<script async src="js/vendor/jquery.js"></script>
-
-<script async src="js/script2.js"></script>
-
-<script async src="js/script3.js"></script>
- -

You can't rely on the order the scripts will load in. jquery.js may load before or after script2.js and script3.js and if this is the case, any functions in those scripts depending on jquery will produce an error because jquery will not be defined at the time the script runs.

- -

defer will run the scripts in the order they appear in the page and execute them as soon as the script and content are downloaded:

- -
<script defer src="js/vendor/jquery.js"></script>
-
-<script defer src="js/script2.js"></script>
-
-<script defer src="js/script3.js"></script>
- -

All the scripts with the defer attribute will load in the order they appear on the page. So in the second example, we can be sure that jquery.js will load before script2.js and script3.js and that script2.js will load before script3.js.

- -

To summarize:

- - - -

Comments

- -

As with HTML and CSS, it is possible to write comments into your JavaScript code that will be ignored by the browser, and exist simply to provide instructions to your fellow developers on how the code works (and you, if you come back to your code after six months and can't remember what you did). Comments are very useful, and you should use them often, particularly for larger applications. There are two types:

- - - -

So for example, we could annotate our last demo's JavaScript with comments like so:

- -
// Function: creates a new paragraph and appends it to the bottom of the HTML body.
-
-function createParagraph() {
-  let para = document.createElement('p');
-  para.textContent = 'You clicked the button!';
-  document.body.appendChild(para);
-}
-
-/*
-  1. Get references to all the buttons on the page in an array format.
-  2. Loop through all the buttons and add a click event listener to each one.
-
-  When any button is pressed, the createParagraph() function will be run.
-*/
-
-const buttons = document.querySelectorAll('button');
-
-for (let i = 0; i < buttons.length ; i++) {
-  buttons[i].addEventListener('click', createParagraph);
-}
- -
-

Note: In general more comments is usually better than less, but you should be careful if you find yourself adding lots of comments to explain what variables are (your variable names perhaps should be more intuitive), or to explain very simple operations (maybe your code is overcomplicated).

-
- -

Summary

- -

So there you go, your first step into the world of JavaScript. We've begun with just theory, to start getting you used to why you'd use JavaScript and what kind of things you can do with it. Along the way, you saw a few code examples and learned how JavaScript fits in with the rest of the code on your website, amongst other things.

- -

JavaScript may seem a bit daunting right now, but don't worry — in this course, we will take you through it in simple steps that will make sense going forward. In the next article, we will plunge straight into the practical, getting you to jump straight in and build your own JavaScript examples.

- - - -

{{NextMenu("Learn/JavaScript/First_steps/A_first_splash", "Learn/JavaScript/First_steps")}}

- -

In this module

- - diff --git a/files/uk/learn/javascript/index.html b/files/uk/learn/javascript/index.html deleted file mode 100644 index 151ff7435e..0000000000 --- a/files/uk/learn/javascript/index.html +++ /dev/null @@ -1,65 +0,0 @@ ---- -title: JavaScript -slug: Learn/JavaScript -tags: - - Beginner - - CodingScripting - - JavaScript - - JavaScripting beginner - - Landing - - Module - - Topic - - Мова - - Українська -translation_of: Learn/JavaScript ---- -
{{LearnSidebar}}
- -

{{Glossary("JavaScript")}} — це мова програмування, що дозволяє вам створювати живі, динамічні веб-сторінки. Кожного разу, коли веб-сторінка робить більше, ніж просто відображає Вам статичну інформацію для перегляду, відображає своєчасне оновлення вмісту або інтерактивні карти або анімовану 2D / 3D-графіку, або прокручує відео в медіапрогравачі, і таке інше — ви можете бути впевнені, що це робота JavaScript.

- -

Навчальний шлях

- -

Навряд чи JavaScript важче вивчати, ніж суміжні технології, такі як HTML та CSS. Але перш ніж намагатися вивчити JavaScript, вам настійно рекомендується спочатку ознайомитись хоча б з цими двома технологіями та, можливо, з деякими іншими. Почніть свою роботу з таких модулів:

- - - -

Попередній досвід роботи з іншими мовами програмування також може допомогти.

- -

Ознайомившись з основами JavaScript, ви повинні бути в курсі більш досконалих тем, наприклад:

- - - -

Модулі

- -

Ця тема містить наступні модулі в запропонованому порядку для роботи з ними.

- -
-
Перші кроки JavaScript
-
У нашому першому модулі JavaScript ми спочатку відповімо на деякі фундаментальні питання, такі як "Що таке JavaScript?", "Як він виглядає?" Та "Що він може робити?", Потім ми перйдемо до першого практичного завданя з написання JavaScript. Після цього ми докладно розглянемо деякі ключові функції JavaScript, такі як змінні, рядки, числа та масиви.
-
Структурні блоки JavaScript
-
У цьому модулі ми продовжуємо охоплювати всі основні фундаментальні функції JavaScript, звертаючи увагу на ті типи блоків коду які нам будуть часто зустрічатися, такі як умовні вирази, цикли, функції та події. Ви вже бачили цей матеріал в курсі, тільки тут ми все це розглянемо дитально.
-
Представляємо об'єкти JavaScript
-
У JavaScript більшість речей - це об'єкти, від основних функцій, як рядки та масиви, до API браузера, побудованого на вершині JavaScript. Ви навіть можете створити свої власні об'єкти, щоб інкапсулювати пов'язані функції та змінні в ефективні пакети. Об'єктно-орієнтований характер JavaScript важливо зрозуміти, якщо ви хочете піти далі з вашими знаннями мови та написати більш ефективний код, тому ми надали цей модуль, щоб допомогти вам. Тут ми детально вивчимо теорію об'єктів та синтаксис, подивимося як створити власні об'єкти, з'ясуємо що таке дані JSON, і як працювати з ним.
-
Веб-API на стороні клієнта
-
Під час написання JavaScript-клієнта для веб-сайтів або програм ви не заходите дуже далеко, перш ніж почати використовувати API-інтерфейси для роботи з різними аспектами браузера та операційної системи, на якому працює сайт, або навіть дані з інших веб-сайтів або послуги. У цьому модулі ми вивчимо, які API існують та як використовувати деякі з найпоширеніших API, які часто зустрічаються в роботі з розробкою.
-
- -

Вирішення загальних проблем JavaScript

- -

Використовуйте JavaScript, щоб вирішувати поширені проблеми, це посилання на розділи, що пояснюють, як використовувати JavaScript для вирішення дуже поширених проблем при створенні веб-сторінок.

- -

Див. також

- -
-
JavaScript на MDN
-
Основне джерело для документації JavaScript на MDN - тут ви знайдете великі довідкові документи з усіх аспектів мови JavaScript та деякі розширені навчальні посібники, націлені на досвідчених JavaScript програмістів.
-
Кодування математики
-
Відмінна серія відео уроків з вивчення математики яку ви повинні розуміти щоб бути ефективним програмістом, від Кейта Пітерса.
-
diff --git a/files/uk/learn/javascript/objects/basics/index.html b/files/uk/learn/javascript/objects/basics/index.html deleted file mode 100644 index e7bc44b38b..0000000000 --- a/files/uk/learn/javascript/objects/basics/index.html +++ /dev/null @@ -1,259 +0,0 @@ ---- -title: Основи об'єктів в JavaScript -slug: Learn/JavaScript/Objects/Basics -tags: - - JavaScript - - this - - Об'єкт - - Основи об'єктів - - Синтаксис -translation_of: Learn/JavaScript/Objects/Basics ---- -
{{LearnSidebar}}
- -
{{NextMenu("Learn/JavaScript/Objects/Object-oriented_JS", "Learn/JavaScript/Objects")}}
- -

В цій статті ми розглянемо основи синтаксису JavaScript об'єктів і заново вивчимо деякий функціонал JavaScript, який ми досліджували  раніше на курсі, підтверджуючи той факт, що велика частина функціоналу, з яким ми вже зіткнулись, в дійсності є об'єктами.

- - - - - - - - - - - - -
Необхідні знання:Елементарна комп'ютерна грамотність, базове розуміння HTML та CSS, знайомство з основами JavaScript (див. First steps та Building blocks).
Мета:Розуміння основ теоріі об'єктно-орієнтованого програмування, як це пов'язано з JavaScript ("більшість речей є об'єктами'), і як почати роботу з об'єктами JavaScript.
- -

Основи об'єктів

- -

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

- -

Щоб почати, скопіюйте собі oojs.html файл. У ньому міститься дуже мало —  {{HTMLElement("script")}} елемент для написання нашого вихідного коду. Ми будемо використовувати це як основу для вивчення основ синтаксису об'єктів. Під час роботи з цим прикладом ви повинні відкрити developer tools JavaScript console, щоб вводити деякі команди.

- -

Як і в багатьох випадках в JavaScript, створення об'єкту часто починається з визначення та ініціалізації змінної. Спробуйте ввести наступний нижче код в завантажений файл JavaScript, а потім збережіть і оновіть сторінку:

- -
var person = {};
- -

Якщо ви введете person в консоль JS і натиснете кнопку, то повинні отримати наступний результат:

- -
[object Object]
- -

Вітаємо, ви щойно створили свій перший об'єкт. Але це порожній об'єкт, тому ми не можемо з ним багато чого зробити. Давайте доповнимо наш об'єкт, щоб він виглядав так:

- -
var person = {
-  name: ['Bob', 'Smith'],
-  age: 32,
-  gender: 'male',
-  interests: ['music', 'skiing'],
-  bio: function() {
-    alert(this.name[0] + ' ' + this.name[1] + ' is ' + this.age + ' years old. He likes ' + this.interests[0] + ' and ' + this.interests[1] + '.');
-  },
-  greeting: function() {
-    alert('Hi! I\'m ' + this.name[0] + '.');
-  }
-};
-
- -

Після збереження та оновлення спробуйте ввести деякі з наведених нижче елементів у консолі JS:

- -
person.name[0]
-person.age
-person.interests[1]
-person.bio()
-person.greeting()
- -

Тепер всередині об'єкта є деякі дані та функціонал, і тепер до них можна отримати доступ за допомогою легкого і простого синтаксису!

- -
-

Заувага: Якщо у вас виникли проблеми із застосуванням файлу в роботі, спробуйте порівняти свій код з нашою версією  — див. oojs-finished.html (також see it running live). Одна з найпоширеніших помилок, коли ви починаєте роботу з об'єктами, ставити кому в кінці останнього члена - це призводить до помилки.

-
- -

Отже, що тут відбувається? Об'єкт складається з декількох елементів, кожен з яких має назву (наприклад, name та age вище), і значення (наприклад, ['Bob', 'Smith'] та 32). Кожна пара назва/значення повинна бути відокремлена комою, а назва і значення в кожному випадку розділяються між собою двокрапкою. Синтаксис завжди дотримується цього шаблону:

- -
var objectName = {
-  member1Name: member1Value,
-  member2Name: member2Value,
-  member3Name: member3Value
-}
- -

Значенням члена об'єкта може бути майже все — в нашому об'єкті person є рядок, число, два масиви та дві функції.  Перші чотири елементи є елементами даних, що відносяться до властивостей об'єкта. Останні два елементи - це функції, які дозволяють об'єкту щось зробити з цими елементами даних, називаються методами об'єкта.

- -

Такі об'єкти називаються літералами об'єкта (object literal) - ми буквально вписали весь вміст об'єкта для його створення. Цей спосіб сильно відрізняється від об'єктів, реалізованих класами, які ми розглянемо пізніше.

- -

Дуже часто створення об'єкта за допомогою літералу використовується, коли вам потрібно перенести  певним чином ряд структурованих, пов'язаних елементів даних, наприклад, надсилаючи запит на сервер для розміщення їх в базі даних. Відправка одного об'єкта набагато ефективніша, ніж відправлення кількох елементів окремо, а також з ним легше працювати, ніж з масивом, коли ви хочете ідентифікувати окремі елементи за назвою.

- -

Крапкова нотація (Dot notation)

- -

Вище ми отримали доступ до властивостей об'єкта та методів використовуючи крапкову нотацію (dot notation). Ім'я об'єкта (person) діє як простір імен (namespace) - його потрібно вводити першим для того, щоб ми могли отримати доступ до всього, що вкладено (encapsulated) всередині об'єкта.  Далі ви ставите крапку, після якої вказуєте елемент, який хочете отримати - це може бути іназва простої властивості,  елемент масиву або виклик одного з методів об'єкту, наприклад:

- -
person.age
-person.interests[1]
-person.bio()
- -

Sub-простори імен (Sub-namespaces)

- -

Значенням елемента об'єкта можна зробити навіть інший об'єкт. Наприклад, спробуйте змінити значення властивості name з такого

- -
name: ['Bob', 'Smith'],
- -

на

- -
name : {
-  first: 'Bob',
-  last: 'Smith'
-},
- -

Тут ми ефективно створюємо sub-простір імен. Звучить складно, але насправді це не так - щоб отримати доступ до необхідних елементів, вам просто потрібно зробити ще один додатковий крок через крапку. Спробуйте це у консолі JS:

- -
person.name.first
-person.name.last
- -

Важливо: на цьому етапі вам також доведеться переглянути код вашого методу і змінити екземпляри з 

- -
name[0]
-name[1]
- -

на 

- -
name.first
-name.last
- -

Інакше ваші методи більше не працюватимуть.

- -

Дужкова нотація (Bracket notation)

- -

Існує ще один спосіб отримати доступ до властивостей об'єкту - використання дужкової нотації (bracket notation). Замість написання цього коду:

- -
person.age
-person.name.first
- -

Ви можете використовувати:

- -
person['age']
-person['name']['first']
- -

Це виглядає дуже схожим на те, як ви отримуєте доступ до елементів у масиві, і в принципі так воно і є - замість використання числових індексів для вибору елемента, ви асоціюєте ім'я для кожного значення. Не дивно, що ці об'єкти іноді називають асоціативними масивами - вони зіставляють рядки зі значеннями так само, як масиви зіставляють числові індекси зі значеннями.

- -

Встановлення елементів об'єкта

- -

Досі ми розглядали лише повернення (або отримання) елементів об'єктів - ви також можете встановити (оновити) значення елемента об'єкта, просто оголосивши елемент, який ви хочете встановити (використовуючи крапкову або дужкову нотацію), наприклад:

- -
person.age = 45;
-person['name']['last'] = 'Cratchit';
- -

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

- -
person.age
-person['name']['last']
- -

Ви можете не просто оновлювати і встановлювати значення властивостей і методів об'єкта, а так сам створювати абсолютно нові елементи. Наприклад:

- -
person['eyes'] = 'hazel';
-person.farewell = function() { alert("Bye everybody!"); }
- -

Тепер ви можете перевірити ваші нові елементи:

- -
person['eyes']
-person.farewell()
- -

Одним із корисних аспектів дужкової нотації є те, що вона може використовуватись не тільки для динамічного встановлення значень елементів, але й для їх імен. Припустимо, ми хочемо, щоб користувачі могли зберігати користувацькі типи даних, ввівши ім'я та значення елемента в два текстові поля? Ми могли б отримати такі значення:

- -
var myDataName = nameInput.value;
-var myDataValue = nameValue.value;
- -

Потім ми могли б додати новий елемент і його значення в об'єкт person таким чином:

- -
person[myDataName] = myDataValue;
- -

Щоб перевірити це, спробуйте додати наступні рядки до свого коду:

- -
var myDataName = 'height';
-var myDataValue = '1.75m';
-person[myDataName] = myDataValue;
- -

Тепер збережіть й оновіть, і введіть наступне:

- -
person.height
- -

Додавання властивості об'єкту з використанням наведеного вище методу неможливе з крапковою нотацією, яка може приймати лише літеральне ім'я елемента, а не значення змінної, що вказує на ім'я. 

- -

Що таке "this"?

- -

Ви могли помітити щось дивне в наших методах. Подивіться на це, наприклад:

- -
greeting: function() {
-  alert('Hi! I\'m ' + this.name.first + '.');
-}
- -

Ймовірно, вас цікавить, що таке "this"?  this - це ключове слово, яке посилається на поточний об'єкт, всередині якого написаний код - тому, в нашому випадку, this рівнозначний об'єкту person. Але чому б просто не написати person? Як ви побачите в статті  Об'єктно-орієнтований JavaScript для початківців, коли ми починаємо створювати конструктори, і т.д., this дуже корисний - він завжди буде гарантувати, що використовується правильне значення, коли контекст елемента змінюється (наприклад, два різні екземпляри об'єкта person можуть мати різні імена, але захочуть використовувати своє власне при вітанні). 

- -

Давайте проілюструємо, що ми маємо на увазі з спрощеною парою об'єктів person:

- -
var person1 = {
-  name: 'Chris',
-  greeting: function() {
-    alert('Hi! I\'m ' + this.name + '.');
-  }
-}
-
-var person2 = {
-  name: 'Brian',
-  greeting: function() {
-    alert('Hi! I\'m ' + this.name + '.');
-  }
-}
- -

В цьому випадку, person1.greeting() виведе "Hi! I'm Chris."; person2.greeting() з іншого боку виведе "Hi! I'm Brian.", хоча код методу однаковий в обох випадках. Як ми вже говорили раніше, this рівнозначний об'єкту, всередині якого знаходиться код - це не дуже корисно, коли ви пишете літерали об'єктів вручну, але це дійсно допомагає, коли ви генеруєте об'єкти динамічно (наприклад, використовуючи конструктори). Пізніше це стане зрозумілішим.

- -

Ви використовували об'єкти постійно

- -

Поки ви проходили ці приклади, ймовірно, ви помітили, що крапкова нотація, яку ви використовували, виглядає дуже знайомо. Це тому, що ви використовували її протягом усього курсу! Кожного разу, коли ми працювали над прикладом, який використовував вбудований API-інтерфейс браузера або JavaScript об'єкт, ми використовували об'єкти, тому що такі функції побудовані з використанням тих же структур об'єктів, які ми тут розглядали, хоча і більш складні, ніж наші власні користувацькі приклади.

- -

Тому, коли ви використовували рядкові методи, такі як:

- -
myString.split(',');
- -

Ви використовували метод, доступний в екземплярі класу String. Кожного разу, створюючи рядок у своєму коді, цей рядок автоматично створюється як екземпляр String, і тому має декілька загальних  методів/властивостей, доступних на ньому.

- -

Коли ви звертались до об'єктної моделі документа (DOM), використовуючи такі рядки:

- -
var myDiv = document.createElement('div');
-var myVideo = document.querySelector('video');
- -

Ви використовували методи доступні в екземплярі класу Document. Для кожної завантаженої веб-сторінки створюється екземпляр Document, так званий document, який представляє структуру і зміст всієї сторінки, а також інші функції, такі як URL.

- -

Те саме стосується і багатьох інших вбудованих об'єктів/API, які ви використовували — Array, Math, і т.д.

- -

Зверніть увагу, що вбудовані об'єкти/API не завжди створюють екземпляри об'єктів автоматично. Наприклад, Notifications API, який дозволяє новим браузерам запускати системні повідомлення, вимагає, щоб ви створювали новий екземпляр об'єкта, за допомогою конструктора, для кожного повідомлення, яке ви хочете запустити. Спробуйте ввести наступне в консоль JavaScript:

- -
var myNotification = new Notification('Hello!');
- -

Ми розглянемо конструктори в наступній статті.

- -
-

Заувага: Корисно подумати про те, як об'єкти взаємодіють шляхом передачі повідомлень - коли об'єкту потрібен інший об'єкт для виконання якої-небудь дії, він часто надсилає повідомлення іншому об'єкту, за допомогою одного з методів, і чекає відповіді, яку ми знаємо як повернене значення (return value).

-
- -

Підсумок

- -

Вітаємо, ви дійшли до завершення нашої першої статті про об'єкти в JS, тепер у вас має бути гарне уявлення про те, як працювати з об'єктами в JavaScript - в тому числі створювати свої власні прості об'єкти. Ви також повинні розуміти, що об'єкти дуже корисні в якості структур для зберігання пов'язаних даних і функціональності - якби ми намагались відстежувати всі властивості і методи в нашому об'єкті person як окремі змінні і функції, цу було б неефективно, і ми б ризикували зіткнутись з іншими змінними і функціями з такими ж іменами. Об'єкти дозволяють нам безпечно зберігати інформацію в своєму власному блоці, поза небезпекою.

- -

У наступній статті ми почнемо розглядати теорію об'єктно-орієнтованого програмування (ООП), і як ці техніки можуть бути використані в JavaScript.

- -

{{NextMenu("Learn/JavaScript/Objects/Object-oriented_JS", "Learn/JavaScript/Objects")}}

- -

В цьому модулі

- - diff --git a/files/uk/learn/javascript/objects/index.html b/files/uk/learn/javascript/objects/index.html deleted file mode 100644 index 48bb0d98f1..0000000000 --- a/files/uk/learn/javascript/objects/index.html +++ /dev/null @@ -1,46 +0,0 @@ ---- -title: Вступ до об'єктів JavaScript -slug: Learn/JavaScript/Objects -tags: - - JavaScript - - Об'єкти -translation_of: Learn/JavaScript/Objects ---- -
{{LearnSidebar}}
- -

Чи не кожна річ у JavaScript є об'єктом — від самих основ, як-от рядки та масиви, до програмних інтерфейсів веб-переглядача. Ба більше, можна створювати власні об'єкти з передбаченою множиною властивостей та функцій для їх обробки. Для дальшого вивчення JavaScript важливим є розуміння об'єктно-орієнтованої природи цієї мови. Саме для того наводимо цю добірку статей. Тут ми докладно вивчатимемо теорію об'єктів та пов'язаний синтаксис, а відтак розглянемо створення власних об'єктів.

- -

Необхідні знання

- -

Перш ніж розпочати, вам слід принаймні ознайомитися з HTML та CSS. Радимо спершу приділити увагу розділам Вступ до HTML та Вступ до CSS, а вже тоді переходити до вивчення JavaScript.

- -

Крім того, докладне вивчення об'єктів JavaScript потребує розуміння певних основ цієї мови. Тож варто спершу переглянути статті Перші кроки з JavaScript та Структурні елементи в JavaScript.

- -
-

Заувага: Якщо ви працюєте за комп'ютером, планшетом тощо, де не маєте змоги створювати власні файли, можете випробувати приклади коду (більшість) в онлайн-редакторах для програмування, як-от JSFiddle, JSBin або Thimble.

-
- -

Путівники

- -
-
Основи об'єктів в JavaScript
-
В першій статті, що розглядає об'єкти JavaScript, ми ознайомимось з основами синтаксису об'єктів JavaScript та пересвідчимось, що велика частина функціоналу, з яким ми вже працювали, є насправді об'єктами.
-
Об'єктно-орієнтований JavaScript для початківців
-
Розібравшись з основами, ми зосередимось на об'єктно-орієнтованому JavaScript (OOJS) — у цій статті представлені основи теорії об'єктно-орієнтованого програмування (ООП), а далі дізнаємось, як за допомогою конструктора функцій JavaScript емулює класи об'єктів та як створювати екземпляри об'єктів.
-
Прототипи об'єктів
-
Прототипи — це механізм, завдяки якому об'єкти JavaScript наслідують функціонал один від одного, але при цьому вони працюють по-іншому, якщо порівнювати з механізмами наслідування в класичних об'єктно-орієнтованих мовах програмування. В цій статті ми дослідимо цю різницю, пояснимо як працюють прототипні ланцюги (prototype chains), і розглянемо як властивість прототипу може використовуватись для додавання методів до існуючих конструкторів.
-
Наслідування в JavaScript
-
Ознайомившись з значною частиною деталей OOJS, ця стаття покаже як створювати "дочірні" класи об'єктів (конструктори), які наслідують функціонал від своїх "батьківських" класів. Крім того, ми дамо декілька порад щод того, де і коли ви можете використовувати OOJS.
-
Робота з даними JSON
-
JavaScript Object Notation (JSON) — це стандартний текстовий формат для представлення структурованих даних на основі об'єктного синтаксису JavaScript, який зазвичай використовується для представлення та передачі даних на веб-сайтах (наприклад, відправлення деяких даних із сервера до клієнта, тому він може відображатись на веб-сторінці). Ви часто стикатиметесь з цим, тому в цій статті ми дамо вам все, що потрібно для роботи з JSON використовуючи JavaScript, включаючи синтаксичний аналіз (parsing) JSON, щоб ви могли отримувати доступ до елементів даних і писати свій власний JSON.
-
Практика побудови об'єктів
-
У попередніх статтях ми розглянули найголовніші моменти в теорії та деталях синтаксису об'єктів JavaScript, що дає вам тверду основу для початку. В цій статті ми перейдемо до практичних занять, отримаємо більше практичної роботи для побудови власних JavaScript об'єктів, щоб створити щось веселе та барвисте — декілька кольорових стрибучих кульок.
-
 
-
- -

Завдання

- -
-
Додавання функціоналу до демо зі стрибучими кульками
-
У цьому завданні, ми очікуємо, що ви, використовуючи демо з стрибаючими кульками з попередньої статті як відправну точку, додасте трохи нового та цікавого функціоналу до нього.
-
diff --git a/files/uk/learn/javascript/objects/object-oriented_js/index.html b/files/uk/learn/javascript/objects/object-oriented_js/index.html deleted file mode 100644 index 67b61867ff..0000000000 --- a/files/uk/learn/javascript/objects/object-oriented_js/index.html +++ /dev/null @@ -1,295 +0,0 @@ ---- -title: Об'єктно-орієнтований JavaScript для початківців -slug: Learn/JavaScript/Objects/Object-oriented_JS -translation_of: Learn/JavaScript/Objects/Object-oriented_JS ---- -
{{LearnSidebar}}
- -
{{PreviousMenuNext("Learn/JavaScript/Objects/Basics", "Learn/JavaScript/Objects/Object_prototypes", "Learn/JavaScript/Objects")}}
- -

Розібравшись з основами, зосередимось на об'єктно-орієнтованому JavaScript (OOJS) - в цій статті представлені основні позиції теорії об'єктно-орієнтованого програмування (ООП) , потім розглянемо, як в JavaScript емулювати класи об'єктів за допомогою функції конструктора, і як створити екземпляри об'єктів.

- - - - - - - -
- - - - - - - - - - - -
Необхідні знання:Елементарна комп'ютерна грамотність, базове розуміння HTML та CSS, знайомство з основами JavaScript (див. First steps та Building blocks) і основи OOJS (див. Основи об'єктів в JS).
Мета:Розуміння основ теоріі об'єктно-орієнтованого програмування, як це пов'язано з JavaScript ("більшість речей є об'єктами'), і як створювати конструктори та екземпляри об'єктів.
-
- -

Об'єктно-орієнтоване програмування - основи

- -

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

- -

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

- -

Визначення шаблону об'єкта

- -

Давайте розглянемо просту програму, яка відображає інформацію про учнів та вчителів в школі. Тут ми розглянемо теорію ООП загалом, а не в контексті будь-якої конкретної мови програмування.

- -

Щоб почати, повернемося до об'єкта person з нашої статті Основи об'єктів в JavaScript, який визначає загальні відомості і функціональні можливості людини. Є багато речей, які ви можете дізнатись про людину (її адресу, зріст, розмір взуття, профіль ДНК, номер паспорта, значні особистісні риси ...) , але в цьому випадку нас цікавлять лише ім'я, вік, стать та інтереси, і ми також хочемо написати коротку інформацію про неї на основі цих даних, і отримувати їх, щоб привітатись. Це відомо як абстракція (abstraction) - створення простої моделі більш складної речі, яка представляє її найважливіші аспекти таким чином, щоб було зручно працювати для виконання цілей нашої програми.

- -

- -

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

- -

Створення реальних об'єктів

- -

З нашого класу ми можемо створити екземпляри об'єктів - об'єкти, що містять дані та функціональні можливості, визначені в класі. З нашого класу Person, можемо створити декілька справжніх людей:

- -

- -

Коли екземпляр об'єкта створюється з класу, функція конструктора класу виконується для його створення. Цей процес створення екземпляра об'єкта з класу називається instantiation - екземпляр об'єкта створюється з класу.

- -

Specialist classes

- -

In this case we don't want generic people — we want teachers and students, which are both more specific types of people. In OOP, we can create new classes based on other classes — these new child classes can be made to inherit the data and code features of their parent class, so you can reuse functionality common to all the object types rather than having to duplicate it.  Where functionality differs between classes, you can define specialized features directly on them as needed.

- -

- -

This is really useful — teachers and students share many common features such as name, gender, and age, so it is convenient to only have to define those features once. You can also define the same feature separately in different classes, as each definition of that feature will be in a different namespace. For example, a student's greeting might be of the form "Yo, I'm [firstName]" (e.g Yo, I'm Sam), whereas a teacher might use something more formal, such as "Hello, my name is [Prefix] [lastName], and I teach [Subject]." (e.g Hello, My name is Mr Griffiths, and I teach Chemistry).

- -
-

Note: The fancy word for the ability of multiple object types to implement the same functionality is polymorphism. Just in case you were wondering.

-
- -

You can now create object instances from your child classes. For example:

- -

- -

In the rest of the article, we'll start to look at how OOP theory can be put into practice in JavaScript.

- -

Constructors and object instances

- -

Some people argue that JavaScript is not a true object-oriented language — for example, its class statement is just syntactical sugar over existing prototypical inheritance and is not a class in a traditional sense. JavaScript, uses special functions called constructor functions to define objects and their features. They are useful because you'll often come across situations in which you don't know how many objects you will be creating; constructors provide the means to create as many objects as you need in an effective way, attaching data and functions to them as required.

- -

When a new object instance is created from a constructor function, its core functionality (as defined by its prototype, which we'll explore in the article Object prototypes) is not all copied over to the new object like "classic" OO languages — instead the functionality is linked to via a reference chain called a prototype chain. So this is not true instantiation, strictly speaking — JavaScript uses a different mechanism to share functionality between objects.

- -
-

Note: Not being "classic OOP" is not necessarily a bad thing; as mentioned above, OOP can get very complex very quickly, and JavaScript has some nice ways to take advantage of OO features without having to get too deep into it.

-
- -

Let's explore creating classes via constructors and creating object instances from them in JavaScript. First of all, we'd like you to make a new local copy of the oojs.html file we saw in our first Objects article.

- -

A simple example

- -
    -
  1. Let's start by looking at how you could define a person with a normal function. Add this function within the script element: - -
    function createNewPerson(name) {
    -  var obj = {};
    -  obj.name = name;
    -  obj.greeting = function() {
    -    alert('Hi! I\'m ' + this.name + '.');
    -  };
    -  return obj;
    -}
    -
  2. -
  3. You can now create a new person by calling this function — try the following lines in your browser's JavaScript console: -
    var salva = createNewPerson('Salva');
    -salva.name;
    -salva.greeting();
    - This works well enough, but it is a bit long-winded; if we know we want to create an object, why do we need to explicitly create a new empty object and return it? Fortunately JavaScript provides us with a handy shortcut, in the form of constructor functions — let's make one now!
  4. -
  5. Replace your previous function with the following: -
    function Person(name) {
    -  this.name = name;
    -  this.greeting = function() {
    -    alert('Hi! I\'m ' + this.name + '.');
    -  };
    -}
    -
  6. -
- -

The constructor function is JavaScript's version of a class. You'll notice that it has all the features you'd expect in a function, although it doesn't return anything or explicitly create an object — it basically just defines properties and methods. You'll see the this keyword being used here as well — it is basically saying that whenever one of these object instances is created, the object's name property will be equal to the name value passed to the constructor call, and the greeting() method will use the name value passed to the constructor call too.

- -
-

Note: A constructor function name usually starts with a capital letter — this convention is used to make constructor functions easier to recognize in code.

-
- -

So how do we call a constructor to create some objects?

- -
    -
  1. Add the following lines below your previous code addition: -
    var person1 = new Person('Bob');
    -var person2 = new Person('Sarah');
    -
  2. -
  3. Save your code and reload it in the browser, and try entering the following lines into your JS console: -
    person1.name
    -person1.greeting()
    -person2.name
    -person2.greeting()
    -
  4. -
- -

Cool! You'll now see that we have two new objects on the page, each of which is stored under a different namespace — when you access their properties and methods, you have to start calls with person1 or person2; they are neatly packaged away so they won't clash with other functionality. They do, however, have the same name property and greeting() method available. Note that they are using their own name value that was assigned to them when they were created; this is one reason why it is very important to use this, so they will use their own values, and not some other value.

- -

Let's look at the constructor calls again:

- -
var person1 = new Person('Bob');
-var person2 = new Person('Sarah');
- -

In each case, the new keyword is used to tell the browser we want to create a new object instance, followed by the function name with its required parameters contained in parentheses, and the result is stored in a variable — very similar to how a standard function is called. Each instance is created according to this definition:

- -
function Person(name) {
-  this.name = name;
-  this.greeting = function() {
-    alert('Hi! I\'m ' + this.name + '.');
-  };
-}
- -

After the new objects have been created, the person1 and person2 variables contain the following objects:

- -
{
-  name: 'Bob',
-  greeting: function() {
-    alert('Hi! I\'m ' + this.name + '.');
-  }
-}
-
-{
-  name: 'Sarah',
-  greeting: function() {
-    alert('Hi! I\'m ' + this.name + '.');
-  }
-}
- -

Note that when we are calling our constructor function, we are defining greeting() every time, which isn't ideal. To avoid this, we can define functions on the prototype instead, which we will look at later.

- -

Creating our finished constructor

- -

The example we looked at above was only a simple example to get us started. Let's now get on and create our final Person() constructor function.

- -
    -
  1. Remove the code you inserted so far, and add in this replacement constructor — this is exactly the same as the simple example in principle, with just a bit more complexity: -
    function Person(first, last, age, gender, interests) {
    -  this.name = {
    -    'first': first,
    -    'last' : last
    -  };
    -  this.age = age;
    -  this.gender = gender;
    -  this.interests = interests;
    -  this.bio = function() {
    -    alert(this.name.first + ' ' + this.name.last + ' is ' + this.age + ' years old. He likes ' + this.interests[0] + ' and ' + this.interests[1] + '.');
    -  };
    -  this.greeting = function() {
    -    alert('Hi! I\'m ' + this.name.first + '.');
    -  };
    -}
    -
  2. -
  3. Now add in the following line below it, to create an object instance from it: -
    var person1 = new Person('Bob', 'Smith', 32, 'male', ['music', 'skiing']);
    -
  4. -
- -

You'll now see that you can access the properties and methods just like we did previously — try these in your JS console:

- -
person1['age']
-person1.interests[1]
-person1.bio()
-// etc.
- -
-

Note: If you are having trouble getting this to work, try comparing your code against our version — see oojs-class-finished.html (also see it running live).

-
- -

Further exercises

- -

To start with, try adding a couple more object creation lines of your own, and try getting and setting the members of the resulting object instances.

- -

In addition, there are a couple of problems with our bio() method — the output always includes the pronoun "He", even if your person is female, or some other preferred gender classification. And the bio will only include two interests, even if more are listed in the interests array. Can you work out how to fix this in the class definition (constructor)? You can put any code you like inside a constructor (you'll probably need a few conditionals and a loop). Think about how the sentences should be structured differently depending on gender, and depending on whether the number of listed interests is 1, 2, or more than 2.

- -
-

Note: If you get stuck, we have provided an answer inside our GitHub repo (see it live) — try writing it yourself first though!

-
- -

Other ways to create object instances

- -

So far we've seen two different ways to create an object instance — declaring an object literal, and using a constructor function (see above).

- -

These make sense, but there are other ways — we want to make you familiar with these in case you come across them in your travels around the Web.

- -

The Object() constructor

- -

First of all, you can use the Object() constructor to create a new object. Yes, even generic objects have a constructor, which generates an empty object.

- -
    -
  1. Try entering this into your browser's JavaScript console: -
    var person1 = new Object();
    -
  2. -
  3. This stores an empty object in the person1 variable. You can then add properties and methods to this object using dot or bracket notation as desired; try these examples in your console: -
    person1.name = 'Chris';
    -person1['age'] = 38;
    -person1.greeting = function() {
    -  alert('Hi! I\'m ' + this.name + '.');
    -};
    -
  4. -
  5. You can also pass an object literal to the Object() constructor as a parameter, to prefill it with properties/methods. Try this in your JS console: -
    var person1 = new Object({
    -  name: 'Chris',
    -  age: 38,
    -  greeting: function() {
    -    alert('Hi! I\'m ' + this.name + '.');
    -  }
    -});
    -
  6. -
- -

Using the create() method

- -

Constructors can help you give your code order—you can create constructors in one place, then create instances as needed, and it is clear where they came from.

- -

However, some people prefer to create object instances without first creating constructors, especially if they are creating only a few instances of an object. JavaScript has a built-in method called create() that allows you to do that. With it, you can create a new object based on any existing object.

- -
    -
  1. With your finished exercise from the previous sections loaded in the browser, try this in your JavaScript console: -
    var person2 = Object.create(person1);
    -
  2. -
  3. Now try these: -
    person2.name
    -person2.greeting()
    -
  4. -
- -

You'll see that person2 has been created based on person1—it has the same properties and method available to it.

- -

One limitation of create() is that IE8 does not support it. So constructors may be more effective if you want to support older browsers.

- -

We'll explore the effects of create() in more detail later on.

- -

Summary

- -

This article has provided a simplified view of object-oriented theory — this isn't the whole story, but it gives you an idea of what we are dealing with here. In addition, we have started to look at how JavaScript relates to and how it differs from "classic OOP", how to implement classes in JavaScript using constructor functions, and different ways of generating object instances.

- -

In the next article, we'll explore JavaScript object prototypes.

- -

{{PreviousMenuNext("Learn/JavaScript/Objects/Basics", "Learn/JavaScript/Objects/Object_prototypes", "Learn/JavaScript/Objects")}}

- -

 

- -

In this module

- - - -

 

diff --git a/files/uk/learn/learning_and_getting_help/index.html b/files/uk/learn/learning_and_getting_help/index.html deleted file mode 100644 index 224cb6f423..0000000000 --- a/files/uk/learn/learning_and_getting_help/index.html +++ /dev/null @@ -1,316 +0,0 @@ ---- -title: Навчання та отримання допомоги -slug: Learn/Learning_and_getting_help -translation_of: Learn/Learning_and_getting_help -original_slug: Learn/Навчання_та_отримання_допомоги ---- -

{{learnsidebar}}

- -

It is great that you are putting some time into learning a new set of skills, but there are good practices to employ that will make your learning more effective. There are also are times when you'll get stuck and feel frustrated — even professional web developers feel like this regularly — and it pays to know about the most effective ways to try and get help so you can progress in your work. This article provides some hints and tips in both of these areas that will help you get more out of learning web development, as well as further reading so you can find out more information about each sub-topic should you wish..

- -

Effective learning

- -

Let's move straight on and think about effective learning.

- -

Different learning methods

- -

It is interesting to consider that there are two main ways in which your brain learns things — focused and diffuse learning:

- - - -

From the studies that neuroscientists have done on brain activity, we have found out that you can't really engage in both ways of learning — or thinking — at once. So which one should you choose? You might think that focused learning is better for studying, but in reality, both are very important.

- -

Focused thinking is great for concentrating hard on specific subjects, getting into deep problem solving, and improving your mastery of the techniques required — strengthening the neural pathways in your brain where that information is stored. It isn't however very good at getting an understanding of "the big picture", and unlocking new neural pathways when you are trying to understand new subjects or solve new problems that you haven't come across before. 

- -

For that, you need diffuse thinking. This is the opposite of focus — you let your brain wander around the wider landscape, searching around for connections you didn't have before, touching on new things (or new combinations of things) that you can then focus on later, to strengthen them and start to really understand what they mean.

- -

This is why it is usually good to read some introductory material first to get a high-level understanding of an area before you leap into the specific details.

- -

It is also why you can sometimes get really stuck on a problem, but then figure out the answer when you go for a coffee break (or a walk). You might:

- -
    -
  1. Know how to fix problem A with tool A.
  2. -
  3. Know how to fix problem B with tool B.
  4. -
  5. Not know how to fix problem C.
  6. -
- -

Let's say you focus on problem C for a while and get frustrated because you can't think how to solve it. But then after going on a walk to get some fresh air, you may well find that as your mind wanders, you suddenly make a connection between tool A and tool B, and realize that you can use them together to fix problem C! It isn't always this simple, but it is also surprising how many times this does happen. This also highlights the importance of taking regular breaks when you are studying in front of the computer.

- -

Different learning materials

- -

It is also worth looking at the different types of learning materials that are available, to see which ones are most effective for you to learn with.

- -

Textual articles

- -

You'll find a lot of written articles on the web to teach you about web design. Like most of this course, for example. Some of the articles will be tutorials, to teach you a certain technique or important concept (such as "learn how to create a video player" or "Learn the CSS box model"), and some of the articles will be reference material, to allow you to look up details you may have forgotten (such as "what is the syntax of the CSS background property"?)

- -

MDN Web Docs is very good for both types — the area you are currently in is great for learning techniques and concepts, and we also have several giant reference sections allowing you to look up any syntax you can't remember.

- -

There are also several other great resources on the web, some of which we'll mention below.

- -
-

Note: The above text should have given you an important fact — you aren't expected to remember everything! Professional web developers use tools like MDN Web Docs to look up things they have forgotten all the time. As you'll discover, learning web development is more about problem-solving and learning patterns than it is about learning lots of syntaxes.

-
- -

Videos

- -

There are also a number of sites that have video learning content on them. YouTube is an obvious one, with channels such as Mozilla Layout Land, MozillaDeveloper, and Google ChromeDevelopers providing many useful videos. Many people prefer textual articles for more in-depth learning and reference material, and videos for quick explanations of concepts and new features, but it is really up to you what you prefer to learn from. There is no right and wrong answer here.

- -

Interactive code playgrounds

- -

You might be the kind of person that prefers minimal instructions and would prefer to jump straight in and start playing with code. This is also a reasonable approach, and some learning sites tend to favor it. Codecademy for example is a learning site where the tutorials mainly consist of interactive code editors where you have to directly write code and see if the desired result was achieved.

- -

Many MDN Web docs reference pages provide interactive examples too, where you can alter the code and see how the live result changes. And there is also nothing wrong with creating your own code examples on your computer, or in an online code editor like JSBin, Codepen, or Glitch. In fact, you'll be called to do so as part of this course when you are learning!

- -
-

Note: Online code editors are also really useful for sharing code you've written, for example, if you are collaborating on learning with someone else who isn't in the same location, or are sending it someone to ask for help with it. You can share the web address of the example with them so they can see it.

-
- -
-

Note: You might favor one learning method over the others, but realistically a hybrid approach is probably what you will end up with. And you'll probably come up with other methods than the three we covered above.

-
- -

Making a plan

- -

It is a good idea to create a plan to help you achieve what you want to achieve through your learning.

- -

A goal statement

- -

It sounds silly, but why not start with a single sentence that says what you want to achieve? The following have different scopes, but are all realistic and achievable:

- - - -

The following are not quite as reasonable:

- - - -

What do you need to get there?

- -

Once you've worked out your goal, it is a good idea to research what you'll need to achieve the goal. For example:

- -

Materials I need:

- - - -

Knowledge I need:

- - - -

How much time and money will it take?

- -

Estimate the time and cost of getting these things. If you'll need to work to earn money to buy the materials required, then the time to do that will have to be factored in. Once you have a time estimate, you can start to build a plan around your life.

- -

How many hours per week do I need to do?

- -

Once you know what you need to do, and how long you think it'll take you, you can start writing out a plan to follow, to achieve your goal. It can be as simple as:

- -

"It'll take me 500 hours to learn what I need to know, and I have a year to do it, so if I assume 2 weeks' holiday I'll need to do work on this for 10 hours per week. I am free on evenings and weekends, so I'll plan my time around those."

- -

How much time you can spend on this of course depends on what your circumstances are. If you are at school, then you've got way more free time than if you have a job and children to provide for. It is still possible to achieve your goals, but you have to be realistic about how quickly you can do it.

- -

If you are doing a university or college course to learn web development, then most of this planning is done for you — lucky you!

- -

When you have worked out a weekly schedule, then you should keep a record of what you manage to do each week in a simple spreadsheet or even in a notebook!

- -

Also, it might be a good idea to have some sub-goals worked out to allow you to keep track of where you are more easily, for example:

- - - -

Keep thinking about how much progress you are making, and adjust your plan if needs be.

- -

Staying motivated

- -

It is hard to stay motivated, especially if you are trying to learn a complex skill like programming or web development. What follows are some tips to stay motivated and keep working:

- - - -

Effective problem solving

- -

There is no one effective way to solve all problems (and learn all things) associated with web design and development, but there are some general bits of advice that will serve you well in most cases.

- -

Break things down into chunks

- -

For a start, when you are trying to implement something specific and it seems really hard to get your head around, you should try to break it down into multiple smaller problems, or chunks.

- -

For example, if you are looking at a task of "Build a simple two-column website", you could break it down as follows:

- - - -

Then you could break it down further, for example, "Implement horizontal navigation menu" could be written out as:

- - - -

Each of these problems doesn't seem nearly as difficult to solve as the one big problem you had initially. Now you've just got to go through and solve them all!

- -

Learn and recognise the patterns

- -

As we said before, web design/programming is mostly about problem solving and patterns. Once you have written out what you'll need to do to solve a specific problem, you can start to figure out what technology features to use to solve it. For example, professional web developers have created lots of horizontal navigation menus, so they'll immediately start thinking of a solution like this:

- -

A nav menu is usually created from a list of links, something like:

- -
<ul>
-  <li>First menu item</li>
-  <li>Second menu item</li>
-  <li>Third menu item</li>
-  <li>etc.</li>
-</ul>
-
- -

To make all the items sit horizontally on a line, the easiest modern way is to use flexbox:

- -
ul {
-  display: flex;
-}
- -

To remove unneeded spacing and bullet points, we can do this:

- -
ul {
-  list-style-type: none;
-  padding: 0;
-}
- -

etc.

- -

If you are a complete beginner to web development, you'll have to do some study and web searches and lookup solutions to such problems. If you are a professional web developer you'll probably remember the last time you solved a similar problem, and only have to look up a few bits of the syntax that you forgot since then.

- -

When you find solutions to such problems, it is worth writing down notes on what you did, and keeping some minimal code examples in a directory somewhere so you can look back on previous work.

- -

In addition, the web has developer tools that allow you to look at the code used to build any site on the web — if you don't have a solution to hand, one good research method is to find websites with similar features in the wild, and find out how they did it.

- -
-

Note: Notice how above we talked about the problem we are trying to solve first, and the technology used to solve it second. This is pretty much always the best way round to do it — don't start with a cool new technology that you want to use, and try to shoehorn it into the use case.

-
- -
-

Note: The simplest solution is often the best.

-
- -

Getting practice

- -

The more you practice solving a problem, the stronger your brain's neural pathways are in that area, and the easier it becomes to recall the details and the logic of that particular problem.

- -

Keep tinkering with code, and getting more practice. If you run out of problems to solve, look up some tests online, do some more courses, or ask your friends and family (or local school or church) if there is anything they'd like you to build for them.

- -

Getting help

- -

Web development requires you to learn a complex set of skills — you are bound to get stuck sometimes and need help. As we said before, even professional developers need regular help working out issues.

- -

There are a variety of ways to get help, and what follows are some tips for doing so more effectively.

- -

Effective web searches

- -

One important skill to learn is the art of effective web searches — what search terms do you need to use in your favorite search engine to find the articles you need? 

- -

It is often fairly obvious what to search for. For example:

- - - -

If you want to search for something that has less obvious buzzwords, you need to think about what is most likely to return what you want.

- - - -

Error messages

- -

If you are having a problem with some code and a specific error message is coming up, it is often a good idea to just copy the error message into your search engine and use it as the search term. If other people have had the same problem, there'll likely be some articles or blog posts about it in places like MDN or Stack Overflow.

- -
-

Note: Stack Overflow is a really useful website — it is basically a huge database of curated questions and answers on various technologies and related techniques. You'll probably find an answer that answers your question. If not, you can ask a question and see if anyone can help you.

-
- -

Browser testing

- -

It is often a good idea to see if your problem is affecting all browsers, or whether it only occurs in one or a small number of browsers. If it is only affecting one browser, for example, you can use that browser to narrow down the search. Example searches might look like:

- - - -

Using MDN

- -

The site you are already on has a wealth of information available to you — both reference material for looking up code syntax, and guides/tutorials for learning techniques.

- -

We've provided most of the answers to the questions you'll have about web development fundamentals in this part of MDN. If you are stuck, then it is good to re-read the associated articles to see if you missed anything.

- -

If you are not sure which article to read, then try searching MDN for some related keywords (as indicated above), or try a general web search. To search on MDN, you can either use the site's in-built search functionality or better still, use your favorite search engine and put "mdn" in front of the search term, for example, "mdn responsive web design" or "mdn background-color".

- -

Other online resources

- -

We already mentioned Stack Overflow, but there are other online resources that can help.

- -

It is good to find a community to be part of, and you'll get a lot of respect if you try to help others answer their questions as well as asking your own. Other good examples include:

- - - -

However, it also makes sense to find useful groups on social networking sites such as Twitter or Facebook. Look for groups that discuss web development subjects you are interested in, and join up. Follow people on twitter you know are influential, smart, or just plain seem to share lots of useful tips.

- -

Physical meetups

- -

Lastly, you should try attending some physical meetups to meet other like-minded people, especially ones that cater to beginners. meetup.com is a good place to find local physical meetups, and you could also try your local press/what's on sites.

- -

You could also try attending full-fledged web conferences. While these can be expensive, you could try volunteering at them, and many conferences offer reduced rate tickets, for example, student or diversity tickets.

- -

See also

- - diff --git a/files/uk/learn/server-side/django/index.html b/files/uk/learn/server-side/django/index.html deleted file mode 100644 index c26c8fbe6b..0000000000 --- a/files/uk/learn/server-side/django/index.html +++ /dev/null @@ -1,60 +0,0 @@ ---- -title: Django веб-фреймворк (Python) -slug: Learn/Server-side/Django -translation_of: Learn/Server-side/Django ---- -
{{LearnSidebar}}
- -

Django є надзвичайно популярним і повнофункціональним серверним веб-фреймворком, що написаний на Python. Даний модуль показує вам, чому Django є одним з найпопулярніших структур веб-сервера, а також як налаштувати середовище розробки, і як приступити до роботи щоб створювати власні веб-додатки.

- -

Передумови

- -

Перед початком цього модуля вам не потрібно володіти будь-якими знаннями про Django. Ви повинні лише розуміти, що таке серверне веб-програмування та веб-фреймворк, для цього читайте тему в нашому модулі - Програмування веб-сайту на стороні сервера, перші кроки.

- -

Вітається володіння загальними знаннями концепцій програмування і мови програмування Python, проте не є необхідним для розуміння основних понять.

- -
-

Примітка: Python є однією із найпростіших мов програмування, легкою для освоєння та розуміння початківцями. Якщо ж ви прагнете зрозуміти цей модуль краще, то для цього є безліч безкоштовних книг і посібників, які є в інтернеті у вільному доступі (початківці у програмуванні можуть переглянути сторінку на wiki.python.org - Python для початківців).

-
- -

Посібники

- -
-
Вступ до Django
-
У цій першій статті про Django ми відповімо на питання "Що таке Django?" і дамо уявлення того що робить веб-фраймворк особливого.  We'll outline the main features, including some of the advanced functionality that we won't have time to cover in detail in this module. We'll also show you some of the main building blocks of a Django application, to give you an idea of what it can do before you then go on to set it up and start playing.
-
Налаштування середовища розробки Django
-
Now that you know what Django is for, we'll show you how to setup and test a Django development environment on Windows, Linux (Ubuntu), and Mac OS X — whatever common operating system you are using, this article should give you what you need to be able to start developing Django apps.
-
Посібник Django: "Локальна бібліотека" - приклад веб-сайту
-
The first article in our practical tutorial series explains what you'll learn, and provides an overview of the "local library" example website we'll be working through and evolving in subsequent articles.
-
Посібник Django, частина 2: Створення скелету веб-сайту
-
This article shows how you can create a "skeleton" website project as a basis, which you can then go on to populate with site-specific settings, urls, models, views, and templates.
-
Посібник Django, частина 3: Використання моделей
-
This article shows how to define models for the LocalLibrary website — models represent the data structures we want to store our app's data in, and also allow Django to store data in a database for us (and modify it later on). It explains what a model is, how it is declared, and some of the main field types. It also briefly shows a few of the main ways you can access model data.
-
Посібник Django, частина 4: Адміністрування сайту
-
Now that we've created models for the LocalLibrary website, we'll use the Django Admin site to add some "real" book data. First we'll show you how to register the models with the admin site, then we'll show you how to login and create some data. At the end we show some of ways you can further improve the presentation of the admin site.
-
Посібник Django, частина 5: Створення домашньої сторінки
-
We're now ready to add the code to display our first full page — a home page for the LocalLibrary that shows how many records we have of each model type and provides sidebar navigation links to our other pages. Along the way we'll gain practical experience in writing basic URL maps and views, getting records from the database, and using templates.
-
Посібник Django Tutorial Part 6: Загальний список і детальний перегляд
-
This tutorial extends our LocalLibrary website, adding list and detail pages for books and authors. Here we'll learn about generic class-based views, and show how they can reduce the amount of code you have to write for common use cases. We'll also go into URL handling in greater detail, showing how to perform basic pattern matching.
-
Посібник Django, частина 7: Фреймворк сесій
-
This tutorial extends our LocalLibrary website, adding a session-based visit-counter to the home page. This is a relatively simple example, but it does shows how you can use the session framework to provide peristent behaviour for anonymous users in your own sites.
-
Посібник Django, частина 8: Аутентифікація користувачів і права доступу
-
In this tutorial we'll show you how to allow users to login to your site with their own accounts, and how to control what they can do and see based on whether or not they are logged in and their permissions. As part of this demonstration we'll extend the LocalLibrary website, adding login and logout pages, and user- and staff-specific pages for viewing books that have been borrowed.
-
Посібник Django, частина 9: Робота з формами
-
In this tutorial we'll show you how to work with HTML Forms in Django, and in particular the easiest way to write forms to create, update, and delete model instances. As part of this demonstration we'll extend the LocalLibrary website so that librarians can renew books, and create, update, and delete authors using our own forms (rather than using the admin application).
-
Посібник Django, частина 10: Тестування веб-додатку Django
-
As websites grow they become harder to test manually — not only is there more to test, but, as the interactions between components become more complex, a small change in one area can require many additional tests to verify its impact on other areas. One way to mitigate these problems is to write automated tests, which can easily and reliably be run every time you make a change. This tutorial shows how to automate unit testing of your website using Django's test framework.
-
Посібник Django, частина 11: Розгортання веб-додатку Django на веб-сервері
-
Now you've created (and tested) an awesome LocalLibrary website, you're going to want to install it on a public web server so that it can be accessed by library staff and members over the Internet. This article provides an overview of how you might go about finding a host to deploy your website, and what you need to do in order to get your site ready for production.
-
Django безпека веб-додатків
-
Protecting user data is an essential part of any website design. We previously explained some of the more common security threats in the article Web security — this article provides a practical demonstration of how Django's in-built protections handle such threats.
-
- -

Оцінювання

- -

The following assessment will test your understanding of how to create a website using Django, as described in the guides listed above.

- -
-
DIY Django міні блог
-
In this assessment you'll use some of the knowledge you've learned from this module to create your own blog.
-
diff --git a/files/uk/learn/server-side/django/introduction/index.html b/files/uk/learn/server-side/django/introduction/index.html deleted file mode 100644 index 26ef60a53a..0000000000 --- a/files/uk/learn/server-side/django/introduction/index.html +++ /dev/null @@ -1,285 +0,0 @@ ---- -title: Введення в Django -slug: Learn/Server-side/Django/Introduction -tags: - - CodingScripting - - Intro - - Learn - - Python - - Server-side programming - - django - - Джанго - - Кодування - - Програмування - - Пітон - - уроки -translation_of: Learn/Server-side/Django/Introduction ---- -
{{LearnSidebar}}
- -
{{NextMenu("Learn/Server-side/Django/development_environment", "Learn/Server-side/Django")}}
- -

У цій першій статті Django, ми відповімо на питання "Що таке Django?" і даємо вам обзор того, що робить цей веб-фреймворк особливим. Ми розглянемо основні характеристики, включаючи деякі додаткові функціональні можливості модуля, які ми не встигли ще обговорити. Ми також покажемо вам деякі з основних блоків програми Django (хоча на даний момент у вас ще немає середовища розробки, в якій можна було б її протестувати).

- - - - - - - - - - - - -
Передумови::Basic computer literacy. A general understanding of server-side website programming, and in particular the mechanics of client-server interactions in websites.
Завдання:To gain familiarity with what Django is, what functionality it provides, and the main building blocks of a Django application.
- -

Що таке Django?

- -

Django - це високорівневий веб-фреймворк Python, що дозволяє швидко розвивати безпечні та підтримувані сайти. Побудований досвідченими розробниками, Django піклується про більшу частину турбот про веб-розробку, тому ви можете зосередитися на написанні програми без необхідності винаходити колесо.Це вільний і відкритий код, має процвітаюче і активне співтовариство, велику документацію, і безліч варіантів для безкоштовної і платної підтримки.

- -

Django допоможе вам написати програмне забезпечення, яке:

- -
-
Complete
-
Django слідує філософії "Батарейки включені" і забезпечує майже все, що розробники можуть захотіти зробити "з коробки". Оскільки все, що вам потрібно, є частиною одного "продукту", все працює безперешкодно, слідує послідовним принципам дизайну і має велику й найновішу документацію.
-
Універсальний
-
Django використовується для створення майже будь-якого типу веб-сайту — fвід систем управління контентом та вікі, через соціальні мережі та сайти новин. Він може працювати з будь-якою стороною клієнта, і може надавати вміст практично в будь-якому форматі (у тому числі HTML, RSS feeds, JSON, XML, etc). Сайт, який ви зараз читаєте, заснований на Django!                                                                                                
- Internally, while it provides choices for almost any functionality you might want (e.g. several popular databases, templating engines, etc.), it can also be extended to use other components if needed.
-
Безпечний
-
Django helps developers avoid many common security mistakes by providing a framework that has been engineered to "do the right things" to protect the website automatically. For example, Django provides a secure way to manage user accounts and passwords, avoiding common mistakes like putting session information in cookies where it is vulnerable (instead cookies just contain a key, and the actual data is stored in the database) or directly storing passwords rather than a password hash.
-
- A password hash is a fixed-length value created by sending the password through a cryptographic hash function. Django can check if an entered password is correct by running it through the hash function and comparing the output to the stored hash value. However due to the "one-way" nature of the function, even if a stored hash value is compromised it is hard for an attacker to work out the original password.
-
- Django enables protection against many vulnerabilities by default, including SQL injection, cross-site scripting, cross-site request forgery and clickjacking (see Website security for more details of such attacks).
-
Масштабованість
-
Django uses a component-based “shared-nothing” architecture (each part of the architecture is independent of the others, and can hence be replaced or changed if needed). Having a clear separation between the different parts means that it can scale for increased traffic by adding hardware at any level: caching servers, database servers, or application servers. Some of the busiest sites have successfully scaled Django to meet their demands (e.g. Instagram and Disqus, to name just two).
-
Підтримується
-
Django code is written using design principles and patterns that encourage the creation of maintainable and reusable code. In particular, it makes use of the Don't Repeat Yourself (DRY) principle so there is no unnecessary duplication, reducing the amount of code. Django also promotes the grouping of related functionality into reusable "applications" and, at a lower level, groups related code into modules (along the lines of the Model View Controller (MVC) pattern).
-
Портативний
-
Django is written in Python, which runs on many platforms. That means that you are not tied to any particular server platform, and can run your applications on many flavours of Linux, Windows, and Mac OS X. Furthermore, Django is well-supported by many web hosting providers, who often provide specific infrastructure and documentation for hosting Django sites.
-
- -

Звідки він?

- -

Django was initially developed between 2003 and 2005 by a web team who were responsible for creating and maintaining newspaper websites. After creating a number of sites, the team began to factor out and reuse lots of common code and design patterns. This common code evolved into a generic web development framework, which was open-sourced as the "Django" project in July 2005. 

- -

Django has continued to grow and improve, from its first milestone release (1.0) in September 2008 through to the recently-released version 2.0 (2017). Each release has added new functionality and bug fixes, ranging from support for new types of databases, template engines, and caching, through to the addition of "generic" view functions and classes (which reduce the amount of code that developers have to write for a number of programming tasks). 

- -
-

Note: Check out the release notes on the Django website to see what has changed in recent versions, and how much work is going into making Django better.

-
- -

Django is now a thriving, collaborative open source project, with many thousands of users and contributors. While it does still have some features that reflect its origin, Django has evolved into a versatile framework that is capable of developing any type of website. 

- -

Наскільки популярним є Django?

- -

There isn't any readily-available and definitive measurement of popularity of server-side frameworks (although sites like Hot Frameworks attempt to assess popularity using mechanisms like counting the number of GitHub projects and StackOverflow questions for each platform). A better question is whether Django is "popular enough" to avoid the problems of unpopular platforms. Is it continuing to evolve? Can you get help if you need it? Is there an opportunity for you to get paid work if you learn Django? 

- -

Based on the number of high profile sites that use Django, the number of people contributing to the codebase, and the number of people providing both free and paid for support, then yes, Django is a popular framework!

- -

High-profile sites that use Django include: Disqus, Instagram, Knight Foundation, MacArthur Foundation, Mozilla, National Geographic, Open Knowledge Foundation, Pinterest, and Open Stack (source: Django home page).

- -

Is Django opinionated?

- -

Web frameworks often refer to themselves as "opinionated" or "unopinionated".

- -

Opinionated frameworks are those with opinions about the "right way" to handle any particular task. They often support rapid development in a particular domain (solving problems of a particular type) because the right way to do anything is usually well-understood and well-documented. However they can be less flexible at solving problems outside their main domain, and tend to offer fewer choices for what components and approaches they can use.

- -

Unopinionated frameworks, by contrast, have far fewer restrictions on the best way to glue components together to achieve a goal, or even what components should be used. They make it easier for developers to use the most suitable tools to complete a particular task, albeit at the cost that you need to find those components yourself.
-
- Django is "somewhat opinionated", and hence delivers the "best of both worlds". It provides a set of components to handle most web development tasks and one (or two) preferred ways to use them. However, Django's decoupled architecture means that you can usually pick and choose from a number of different options, or add support for completely new ones if desired.

- -

Як виглядає код Django?

- -

In a traditional data-driven website, a web application waits for HTTP requests from the web browser (or other client). When a request is received the application works out what is needed based on the URL and possibly information in POST data or GET data. Depending on what is required it may then read or write information from a database or perform other tasks required to satisfy the request. The application will then return a response to the web browser, often dynamically creating an HTML page for the browser to display by inserting the retrieved data into placeholders in an HTML template.

- -

Django web applications typically group the code that handles each of these steps into separate files:

- -

- - - -
-

Note: Django refers to this organisation as the "Model View Template (MVT)" architecture. It has many similarities to the more familiar Model View Controller architecture. 

-
- - - -

The sections below will give you an idea of what these main parts of a Django app look like (we'll go into more detail later on in the course, once we've set up a development environment).

- -

Sending the request to the right view (urls.py)

- -

A URL mapper is typically stored in a file named urls.py. In the example below, the mapper  (urlpatterns) defines a list of mappings between routes (specific URL patterns) and corresponding view functions. If an HTTP Request is received that has a URL matching a specified pattern then the associated view function will be called and passed the request.

- -
urlpatterns = [
-    path('admin/', admin.site.urls),
-    path('book/<int:id>/', views.book_detail, name='book_detail'),
-    path('catalog/', include('catalog.urls')),
-    re_path(r'^([0-9]+)/$', views.best),
-]
-
- -

The urlpatterns object is a list of path() and/or re_path() functions (Python lists are defined using square brackets, where items are separated by commas and may have an optional trailing comma. For example: [item1, item2, item3,]).

- -

The first argument to both methods is a route (pattern) that will be matched. The path() method uses angle brackets to define parts of a URL that will be captured and passed through to the view function as named arguments. The re_path() function uses a flexible pattern matching approach known as a regular expression. We'll talk about these in a later article!

- -

The second argument is another function that will be called when the pattern is matched. The notation views.book_detail indicates that the function is called book_detail() and can be found in a module called views (i.e. inside a file named views.py)

- -

Handling the request (views.py)

- -

Views are the heart of the web application, receiving HTTP requests from web clients and returning HTTP responses. In between, they marshall the other resources of the framework to access databases, render templates, etc. 

- -

The example below shows a minimal view function index(), which could have been called by our URL mapper in the previous section.  Like all view functions it receives an HttpRequest object as a parameter (request) and returns an HttpResponse object. In this case we don't do anything with the request, and our response simply returns a hard-coded string. We'll show you a request that does something more interesting in a later section.

- -
# filename: views.py (Django view functions)
-
-from django.http import HttpResponse
-
-def index(request):
-    # Get an HttpRequest - the request parameter
-    # perform operations using information from the request.
-    # Return HttpResponse
-    return HttpResponse('Hello from Django!')
-
- -
-

Note: A little bit of Python:

- - -
- - - -

Views are usually stored in a file called views.py.

- -

Defining data models (models.py)

- -

Django web applications manage and query data through Python objects referred to as models. Models define the structure of stored data, including the field types and possibly also their maximum size, default values, selection list options, help text for documentation, label text for forms, etc. The definition of the model is independent of the underlying database — you can choose one of several as part of your project settings. Once you've chosen what database you want to use, you don't need to talk to it directly at all — you just write your model structure and other code, and Django handles all the dirty work of communicating with the database for you.

- -

The code snippet below shows a very simple Django model for a Team object. The Team class is derived from the django class models.Model. It defines the team name and team level as character fields and specifies a maximum number of characters to be stored for each record. The team_level can be one of several values, so we define it as a choice field and provide a mapping between choices to be displayed and data to be stored, along with a default value. 

- -
# filename: models.py
-
-from django.db import models
-
-class Team(models.Model):
-    team_name = models.CharField(max_length=40)
-
-    TEAM_LEVELS = (
-        ('U09', 'Under 09s'),
-        ('U10', 'Under 10s'),
-        ('U11', 'Under 11s'),
-        ...  #list other team levels
-    )
-    team_level = models.CharField(max_length=3, choices=TEAM_LEVELS, default='U11')
-
- -
-

Note: A little bit of Python:

- - -
- -

Querying data (views.py)

- -

The Django model provides a simple query API for searching the database. This can match against a number of fields at a time using different criteria (e.g. exact, case-insensitive, greater than, etc.), and can support complex statements (for example, you can specify a search on U11 teams that have a team name that starts with "Fr" or ends with "al"). 

- -

The code snippet shows a view function (resource handler) for displaying all of our U09 teams. The line in bold shows how we can use the model query API to filter for all records where the team_level field has exactly the text 'U09' (note how this criteria is passed to the filter() function as an argument with the field name and match type separated by a double underscore: team_level__exact).

- -
## filename: views.py
-
-from django.shortcuts import render
-from .models import Team
-
-def index(request):
-    list_teams = Team.objects.filter(team_level__exact="U09")
-    context = {'youngest_teams': list_teams}
-    return render(request, '/best/index.html', context)
-
- -
-
- -

This function uses the render() function to create the HttpResponse that is sent back to the browser. This function is a shortcut; it creates an HTML file by combining a specified HTML template and some data to insert in the template (provided in the variable named "context"). In the next section we show how the template has the data inserted in it to create the HTML.

- -

Rendering data (HTML templates)

- -

Template systems allow you to specify the structure of an output document, using placeholders for data that will be filled in when a page is generated. Templates are often used to create HTML, but can also create other types of document. Django supports both its native templating system and another popular Python library called Jinja2 out of the box (it can also be made to support other systems if needed). 

- -

The code snippet shows what the HTML template called by the render() function in the previous section might look like. This template has been written under the assumption that it will have access to a list variable called youngest_teams when it is rendered (contained in the context variable inside the render() function above). Inside the HTML skeleton we have an expression that first checks if the youngest_teams variable exists, and then iterates it in a for loop. On each iteration the template displays each team's team_name value in an {{htmlelement("li")}} element.

- -
## filename: best/templates/best/index.html
-
-<!DOCTYPE html>
-<html lang="en">
-<head>
-  <meta charset="utf-8">
-  <title>Home page</title>
-</head>
-<body>
-  {% if youngest_teams %}
-    <ul>
-      {% for team in youngest_teams %}
-        <li>\{\{ team.team_name \}\}</li>
-      {% endfor %}
-    </ul>
-  {% else %}
-    <p>No teams are available.</p>
-  {% endif %}
-</body>
-</html>
- -

What else can you do?

- -

The preceding sections show the main features that you'll use in almost every web application: URL mapping, views, models and templates. Just a few of the other things provided by Django include:

- - - -

Summary

- -

Congratulations, you've completed the first step in your Django journey! You should now understand Django's main benefits, a little about its history, and roughly what each of the main parts of a Django app might look like. You should have also learned a few things about the Python programming language, including the syntax for lists, functions, and classes.

- -

You've already seen some real Django code above, but unlike with client-side code, you need to set up a development environment to run it. That's our next step.

- -
{{NextMenu("Learn/Server-side/Django/development_environment", "Learn/Server-side/Django")}}
- -

У цьому модулі

- - diff --git a/files/uk/learn/server-side/express_nodejs/index.html b/files/uk/learn/server-side/express_nodejs/index.html deleted file mode 100644 index 968f3e40e2..0000000000 --- a/files/uk/learn/server-side/express_nodejs/index.html +++ /dev/null @@ -1,77 +0,0 @@ ---- -title: Express web framework (Node.js/JavaScript) -slug: Learn/Server-side/Express_Nodejs -tags: - - Beginner - - CodingScripting - - Express - - Express.js - - Intro - - JavaScript - - Learn - - NeedsTranslation - - Node - - Server-side programming - - TopicStub - - node.js -translation_of: Learn/Server-side/Express_Nodejs ---- -
{{LearnSidebar}}
- -

Express is a popular unopinionated web framework, written in JavaScript and hosted within the node.js runtime environment. The module explains some of the key benefits of this framework, how to set up your development environment and how to perform common web development and deployment tasks.

- -

Prerequisites

- -

Before starting this module you will need to understand what server-side web programming and web frameworks are, ideally by reading the topics in our Server-side website programming first steps module. A general knowledge of programming concepts and JavaScript is highly recommended, but not essential to understanding the core concepts.

- -
-

Note: This website has many useful resources for learning JavaScript in the context of client-side development: JavaScriptJavaScript Guide, JavaScript BasicsJavaScript (learning). The core JavaScript language and concepts are the same for server-side development on Node.js and this material will be relevant. Node.js offers additional APIs for supporting functionality that is useful in browserless environments, e.g. to create HTTP servers and access the file system, but does not support JavaScript APIs for working with the browser and DOM.

- -

This guide will provide some information about working with Node.js and Express, and there are numerous other excellent resources on the Internet and in books — some of these linked from How do I get started with Node.js (StackOverflow) and What are the best resources for learning Node.js? (Quora).

-
- -

Guides

- -
-
Express/Node introduction
-
In this first Express article we answer the questions "What is Node?" and "What is Express?" and give you an overview of what makes the Express web framework special. We'll outline the main features, and show you some of the main building blocks of an Express application (although at this point you won't yet have a development environment in which to test it).
-
Setting up a Node (Express) development environment
-
Now that you know what Express is for, we'll show you how to set up and test a Node/Express development environment on Windows, Linux (Ubuntu), and Mac OS X. Whatever common operating system you are using, this article should give you what you need to be able to start developing Express apps.
-
Express Tutorial: The Local Library website
-
The first article in our practical tutorial series explains what you'll learn, and provides an overview of the "local library" example website we'll be working through and evolving in subsequent articles.
-
Express Tutorial Part 2: Creating a skeleton website
-
This article shows how you can create a "skeleton" website project, which you can then go on to populate with site-specific routes, templates/views, and databases.
-
Express Tutorial Part 3: Using a Database (with Mongoose)
-
This article briefly introduces databases for Node/Express. It then goes on to show how we can use Mongoose to provide database access for the LocalLibrary website. It explains how object schema and models are declared, the main field types, and basic validation. It also briefly shows a few of the main ways you can access model data.
-
Express Tutorial Part 4: Routes and controllers
-
In this tutorial we'll set up routes (URL handling code) with "dummy" handler functions for all the resource endpoints that we'll eventually need in the LocalLibrary website. On completion, we'll have a modular structure for our route handling code, that we can extend with real handler functions in the following articles. We'll also have a really good understanding of how to create modular routes using Express.
-
Express Tutorial Part 5: Displaying library data
-
We're now ready to add the pages that display the LocalLibrary website books and other data. The pages will include a home page that shows how many records we have of each model type, and list and detail pages for all of our models. Along the way we'll gain practical experience in getting records from the database, and using templates.
-
Express Tutorial Part 6: Working with forms
-
In this tutorial we'll show you how to work with HTML Forms in Express, using Pug, and in particular how to write forms to create, update, and delete documents from the database.
-
Express Tutorial Part 7: Deploying to production
-
Now you've created an awesome LocalLibrary website, you're going to want to install it on a public web server so that it can be accessed by library staff and members over the Internet. This article provides an overview of how you might go about finding a host to deploy your website, and what you need to do in order to get your site ready for production.
-
- -

See also

- -
-
Installing LocalLibrary on PWS/Cloud Foundry
-
This article provides a practical demonstration of how to install LocalLibrary on the Pivotal Web Services PaaS cloud — this is a full-featured, open source alternative to Heroku, the PaaS cloud service used in Part 7 of the tutorial, listed above. PWS/Cloud Foundry is definitely worth checking out if you are looking for an alternative to Heroku (or another PaaS cloud service), or simply feel like trying something different.
-
- -

Adding more tutorials

- -
-

That's the end of the tutorial articles (for now). If you would like to extend it, other interesting topics to cover are:

- - - -

And of course it would be excellent to have an assessment task!

-
diff --git a/files/uk/learn/server-side/express_nodejs/routes/index.html b/files/uk/learn/server-side/express_nodejs/routes/index.html deleted file mode 100644 index 9f9e704565..0000000000 --- a/files/uk/learn/server-side/express_nodejs/routes/index.html +++ /dev/null @@ -1,644 +0,0 @@ ---- -title: 'Express Tutorial Part 4: Routes and controllers' -slug: Learn/Server-side/Express_Nodejs/routes -translation_of: Learn/Server-side/Express_Nodejs/routes ---- -
{{LearnSidebar}}
- -
{{PreviousMenuNext("Learn/Server-side/Express_Nodejs/mongoose", "Learn/Server-side/Express_Nodejs/Displaying_data", "Learn/Server-side/Express_Nodejs")}}
- -

У цій статті ми настроїмо (URL handling code) з "штучною" функцією обробки всіх можливих шляхів (endpoints) які потрібні у LocalLibrary сайті. У підсумку ми матимемо модульну структуру відладки для всіх шляхів, яку ми зможемо використати у наступній статті.  Ми матимемо хороше розуміння, як створювати модульну структуру для шляхів які використовує Express!

- - - - - - - - - - - - -
Передумови:Прочитайте Express/Node introduction. Закінчіть попередні частини (включаючи Express Tutorial Part 3: Using a Database (with Mongoose)).
Мета:Вміти створити простий шляхи. Настроїти обробку всі URL шляхів.
- -

Overview

- -

In the last tutorial article we defined Mongoose models to interact with the database, and used a (standalone) script to create some initial library records. We can now write the code to present that information to users. The first thing we need to do is determine what information we want to be able to display in our pages, and then define appropriate URLs for returning those resources. Then we're going to need to create the routes (URL handlers) and views (templates) to display those pages.

- -

The diagram below is provided as a reminder of the main flow of data and things that need to be implemented when handling an HTTP request/response. In addition to the views and routes the diagram shows "controllers" — functions that separate out the code to route requests from the code that actually processes requests.

- -

As we've already created the models, the main things we'll need to create are:

- - - -

- -

Ultimately we might have pages to show lists and detail information for books, genres, authors and bookinstances, along with pages to create, update, and delete records. That's a lot to document in one article. Therefore most of this article will concentrate on setting up our routes and controllers to return "dummy" content. We'll extend the controller methods in our subsequent articles to work with model data.

- -

The first section below provides a brief "primer" on how to use the Express Router middleware. We'll then use that knowledge in the following sections when we set up the LocalLibrary routes.

- -

Routes primer

- -

A route is a section of Express code that associates an HTTP verb (GET, POST, PUT, DELETE, etc.), an URL path/pattern, and a function that is called to handle that pattern.

- -

There are several ways to create routes. For this tutorial we're going to use the express.Router middleware as it allows us to group the route handlers for a particular part of a site together and access them using a common route-prefix. We'll keep all our library-related routes in a "catalog" module, and, if we add routes for handling user accounts or other functions, we can keep them grouped separately.

- -
-

Note: We discussed Express application routes briefly in our Express Introduction > Creating route handlers. Other than providing better support for modularization (as discussed in the first subsection below), using Router is very similar to defining routes directly on the Express application object.

-
- -

The rest of this section provides an overview of how the Router can be used to define the routes.

- -

Defining and using separate route modules

- -

The code below provides a concrete example of how we can create a route module and then use it in an Express application.

- -

First we create routes for a wiki in a module named wiki.js. The code first imports the Express application object, uses it to get a Router object and then adds a couple of routes to it using the get() method. Last of all the module exports the Router object.

- -
// wiki.js - Wiki route module.
-
-var express = require('express');
-var router = express.Router();
-
-// Home page route.
-router.get('/', function (req, res) {
-  res.send('Wiki home page');
-})
-
-// About page route.
-router.get('/about', function (req, res) {
-  res.send('About this wiki');
-})
-
-module.exports = router;
-
-
- -
-

Note: Above we are defining our route handler callbacks directly in the router functions. In the LocalLibrary we'll define these callbacks in a separate controller module.

-
- -

To use the router module in our main app file we first require() the route module (wiki.js). We then call use() on the Express application to add the Router to the middleware handling path, specifying an URL path of 'wiki'.

- -
var wiki = require('./wiki.js');
-// ...
-app.use('/wiki', wiki);
- -

The two routes defined in our wiki route module are then accessible from /wiki/ and /wiki/about/.

- -

Route functions

- -

Our module above defines a couple of typical route functions. The "about" route (reproduced below) is defined using the Router.get() method, which responds only to HTTP GET requests. The first argument to this method is the URL path while the second is a callback function that will be invoked if an HTTP GET request with the path is received.

- -
router.get('/about', function (req, res) {
-  res.send('About this wiki');
-})
-
- -

The callback takes three arguments (usually named as shown: req, res, next), that will contain the HTTP Request object, HTTP response, and the next function in the middleware chain.

- -
-

Note: Router functions are Express middleware, which means that they must either complete (respond to) the request or call the next function in the chain. In the case above we complete the request using send(), so the next argument is not used (and we choose not to specify it).

- -

The  router function above takes a single callback, but you can specify as many callback arguments as you want, or an array of callback functions. Each function is part of the middleware chain, and will be called in the order it is added to the chain (unless a preceding function completes the request).

-
- -

The callback function here calls send() on the response to return the string "About this wiki" when we receive a GET request with the path ('/about'). There are a number of other response methods for ending the request/response cycle. For example, you could call res.json() to send a JSON response or res.sendFile() to send a file. The response method that we'll be using most often as we build up the library is render(), which creates and returns HTML files using templates and data—we'll talk a lot more about that in a later article!

- -

HTTP verbs

- -

The example routes above use the Router.get() method to respond to HTTP GET requests with a certain path.

- -

The Router also provides route methods for all the other HTTP verbs, that are mostly used in exactly the same way: post(), put(), delete(), options(), trace(), copy(), lock(), mkcol(), move(), purge(), propfind(), proppatch(), unlock(), report(), ​​​​​​ mkactivity(), checkout(), merge(), m-search(), notify(), subscribe(), unsubscribe(), patch(), search(), and connect().

- -

For example, the code below behaves just like the previous /about route, but only responds to HTTP POST requests.

- -
router.post('/about', function (req, res) {
-  res.send('About this wiki');
-})
- -

Route paths

- -

The route paths define the endpoints at which requests can be made. The examples we've seen so far have just been strings, and are used exactly as written: '/', '/about', '/book', '/any-random.path'.

- -

Route paths can also be string patterns. String patterns use a subset of regular expression syntax to define patterns of endpoints that will be matched. The subset is listed below (note that the hyphen (-) and the dot (.) are interpreted literally by string-based paths):

- - - -

The route paths can also be JavaScript regular expressions. For example, the route path below will match catfish and dogfish, but not catflap, catfishhead, and so on. Note that the path for a regular expression uses regular expression syntax (it is not a quoted string as in the previous cases).

- -
app.get(/.*fish$/, function (req, res) {
-  ...
-})
- -
-

Note: Most of our routes for the LocalLibrary will simply use strings and not string patterns and regular expressions. We'll also use route parameters as discussed in the next section.

-
- -

Route parameters

- -

Route parameters are named URL segments used to capture the values specified at their position in the URL. The named segments are prefixed with a colon and then the name (e.g. /:your_parameter_name/. The captured values are stored in the req.params object using the parameter names as keys (e.g. req.params.your_parameter_name).

- -

So for example, consider a URL encoded to contain information about users and books: http://localhost:3000/users/34/books/8989. We can extract this information as shown below, with the userId and bookId path parameters:

- -
app.get('/users/:userId/books/:bookId', function (req, res) {
-  // Access userId via: req.params.userId
-  // Access bookId via: req.params.bookId
-  res.send(req.params);
-})
-
- -

The names of route parameters must be made up of “word characters” (A-Z, a-z, 0-9, and _).

- -
-

Note: The URL /book/create will be matched by a route like /book/:bookId (which will extract a "bookId" value of 'create'). The first route that matches an incoming URL will be used, so if you want to process /book/create URLs separately, their route handler must be defined before your /book/:bookId route.

-
- -

That's all you need to get started with routes - if needed you can find more information in the Express docs: Basic routing and Routing guide. The following sections show how we'll set up our routes and controllers for the LocalLibrary.

- -

Routes needed for the LocalLibrary

- -

The URLs that we're ultimately going to need for our pages are listed below, where object is replaced by the name of each of our models (book, bookinstance, genre, author), objects is the plural of object, and id is the unique instance field (_id) that is given to each Mongoose model instance by default.

- - - -

The first home page and list pages don't encode any additional information. While the results returned will depend on the model type and the content in the database, the queries run to get the information will always be the same (similarly the code run for object creation will always be similar).

- -

By contrast the other URLs are used to act on a specific document/model instance—these encode the identity of the item in the URL (shown as <id> above). We'll use path parameters to extract the encoded information and pass it to the route handler (and in a later article we'll use this to dynamically determine what information to get from the database). By encoding the information in our URL we only need one route for every resource of a particular type (e.g. one route to handle the display of every single book item).

- -
-

Note: Express allows you to construct your URLs any way you like — you can encode information in the body of the URL as shown above or use URL GET parameters (e.g. /book/?id=6). Whichever approach you use, the URLs should be kept clean, logical and readable (check out the W3C advice here).

-
- -

Next we create our route handler callback functions and route code for all the above URLs.

- -

Create the route-handler callback functions

- -

Before we define our routes, we'll first create all the dummy/skeleton callback functions that they will invoke. The callbacks will be stored in separate "controller" modules for Books, BookInstances, Genres, and Authors (you can use any file/module structure, but this seems an appropriate granularity for this project).

- -

Start by creating a folder for our controllers in the project root (/controllers) and then create separate controller files/modules for handling each of the models:

- -
/express-locallibrary-tutorial  //the project root
-  /controllers
-    authorController.js
-    bookController.js
-    bookinstanceController.js
-    genreController.js
- -

Author controller

- -

Open the /controllers/authorController.js file and copy in the following code:

- -
var Author = require('../models/author');
-
-// Display list of all Authors.
-exports.author_list = function(req, res) {
-    res.send('NOT IMPLEMENTED: Author list');
-};
-
-// Display detail page for a specific Author.
-exports.author_detail = function(req, res) {
-    res.send('NOT IMPLEMENTED: Author detail: ' + req.params.id);
-};
-
-// Display Author create form on GET.
-exports.author_create_get = function(req, res) {
-    res.send('NOT IMPLEMENTED: Author create GET');
-};
-
-// Handle Author create on POST.
-exports.author_create_post = function(req, res) {
-    res.send('NOT IMPLEMENTED: Author create POST');
-};
-
-// Display Author delete form on GET.
-exports.author_delete_get = function(req, res) {
-    res.send('NOT IMPLEMENTED: Author delete GET');
-};
-
-// Handle Author delete on POST.
-exports.author_delete_post = function(req, res) {
-    res.send('NOT IMPLEMENTED: Author delete POST');
-};
-
-// Display Author update form on GET.
-exports.author_update_get = function(req, res) {
-    res.send('NOT IMPLEMENTED: Author update GET');
-};
-
-// Handle Author update on POST.
-exports.author_update_post = function(req, res) {
-    res.send('NOT IMPLEMENTED: Author update POST');
-};
-
- -

The module first requires the model that we'll later be using to access and update our data. It then exports functions for each of the URLs we wish to handle (the create, update and delete operations use forms, and hence also have additional methods for handling form post requests — we'll discuss those methods in the "forms article" later on).

- -

All the functions have the standard form of an Express middleware function, with arguments for the request, response, and the next function to be called if the method does not complete the request cycle (in all these cases it does!). The methods simply return a string indicating that the associated page has not yet been created. If a controller function is expected to receive path parameters, these are output in the message string (see req.params.id above).

- -

BookInstance controller

- -

Open the /controllers/bookinstanceController.js file and copy in the following code (this follows an identical pattern to the Author controller module):

- -
var BookInstance = require('../models/bookinstance');
-
-// Display list of all BookInstances.
-exports.bookinstance_list = function(req, res) {
-    res.send('NOT IMPLEMENTED: BookInstance list');
-};
-
-// Display detail page for a specific BookInstance.
-exports.bookinstance_detail = function(req, res) {
-    res.send('NOT IMPLEMENTED: BookInstance detail: ' + req.params.id);
-};
-
-// Display BookInstance create form on GET.
-exports.bookinstance_create_get = function(req, res) {
-    res.send('NOT IMPLEMENTED: BookInstance create GET');
-};
-
-// Handle BookInstance create on POST.
-exports.bookinstance_create_post = function(req, res) {
-    res.send('NOT IMPLEMENTED: BookInstance create POST');
-};
-
-// Display BookInstance delete form on GET.
-exports.bookinstance_delete_get = function(req, res) {
-    res.send('NOT IMPLEMENTED: BookInstance delete GET');
-};
-
-// Handle BookInstance delete on POST.
-exports.bookinstance_delete_post = function(req, res) {
-    res.send('NOT IMPLEMENTED: BookInstance delete POST');
-};
-
-// Display BookInstance update form on GET.
-exports.bookinstance_update_get = function(req, res) {
-    res.send('NOT IMPLEMENTED: BookInstance update GET');
-};
-
-// Handle bookinstance update on POST.
-exports.bookinstance_update_post = function(req, res) {
-    res.send('NOT IMPLEMENTED: BookInstance update POST');
-};
-
- -

Genre controller

- -

Open the /controllers/genreController.js file and copy in the following text (this follows an identical pattern to the Author and BookInstance files):

- -
var Genre = require('../models/genre');
-
-// Display list of all Genre.
-exports.genre_list = function(req, res) {
-    res.send('NOT IMPLEMENTED: Genre list');
-};
-
-// Display detail page for a specific Genre.
-exports.genre_detail = function(req, res) {
-    res.send('NOT IMPLEMENTED: Genre detail: ' + req.params.id);
-};
-
-// Display Genre create form on GET.
-exports.genre_create_get = function(req, res) {
-    res.send('NOT IMPLEMENTED: Genre create GET');
-};
-
-// Handle Genre create on POST.
-exports.genre_create_post = function(req, res) {
-    res.send('NOT IMPLEMENTED: Genre create POST');
-};
-
-// Display Genre delete form on GET.
-exports.genre_delete_get = function(req, res) {
-    res.send('NOT IMPLEMENTED: Genre delete GET');
-};
-
-// Handle Genre delete on POST.
-exports.genre_delete_post = function(req, res) {
-    res.send('NOT IMPLEMENTED: Genre delete POST');
-};
-
-// Display Genre update form on GET.
-exports.genre_update_get = function(req, res) {
-    res.send('NOT IMPLEMENTED: Genre update GET');
-};
-
-// Handle Genre update on POST.
-exports.genre_update_post = function(req, res) {
-    res.send('NOT IMPLEMENTED: Genre update POST');
-};
-
- -

Book controller

- -

Open the /controllers/bookController.js file and copy in the following code. This follows the same pattern as the other controller modules, but additionally has an index() function for displaying the site welcome page:

- -
var Book = require('../models/book');
-
-exports.index = function(req, res) {
-    res.send('NOT IMPLEMENTED: Site Home Page');
-};
-
-// Display list of all books.
-exports.book_list = function(req, res) {
-    res.send('NOT IMPLEMENTED: Book list');
-};
-
-// Display detail page for a specific book.
-exports.book_detail = function(req, res) {
-    res.send('NOT IMPLEMENTED: Book detail: ' + req.params.id);
-};
-
-// Display book create form on GET.
-exports.book_create_get = function(req, res) {
-    res.send('NOT IMPLEMENTED: Book create GET');
-};
-
-// Handle book create on POST.
-exports.book_create_post = function(req, res) {
-    res.send('NOT IMPLEMENTED: Book create POST');
-};
-
-// Display book delete form on GET.
-exports.book_delete_get = function(req, res) {
-    res.send('NOT IMPLEMENTED: Book delete GET');
-};
-
-// Handle book delete on POST.
-exports.book_delete_post = function(req, res) {
-    res.send('NOT IMPLEMENTED: Book delete POST');
-};
-
-// Display book update form on GET.
-exports.book_update_get = function(req, res) {
-    res.send('NOT IMPLEMENTED: Book update GET');
-};
-
-// Handle book update on POST.
-exports.book_update_post = function(req, res) {
-    res.send('NOT IMPLEMENTED: Book update POST');
-};
-
- -

Create the catalog route module

- -

Next we create routes for all the URLs needed by the LocalLibrary website, which will call the controller functions we defined in the previous section.

- -

The skeleton already has a ./routes folder containing routes for the index and users. Create another route file — catalog.js — inside this folder, as shown.

- -
/express-locallibrary-tutorial //the project root
-  /routes
-    index.js
-    users.js
-    catalog.js
- -

Open /routes/catalog.js and copy in the code below:

- -
var express = require('express');
-var router = express.Router();
-
-// Require controller modules.
-var book_controller = require('../controllers/bookController');
-var author_controller = require('../controllers/authorController');
-var genre_controller = require('../controllers/genreController');
-var book_instance_controller = require('../controllers/bookinstanceController');
-
-/// BOOK ROUTES ///
-
-// GET catalog home page.
-router.get('/', book_controller.index);
-
-// GET request for creating a Book. NOTE This must come before routes that display Book (uses id).
-router.get('/book/create', book_controller.book_create_get);
-
-// POST request for creating Book.
-router.post('/book/create', book_controller.book_create_post);
-
-// GET request to delete Book.
-router.get('/book/:id/delete', book_controller.book_delete_get);
-
-// POST request to delete Book.
-router.post('/book/:id/delete', book_controller.book_delete_post);
-
-// GET request to update Book.
-router.get('/book/:id/update', book_controller.book_update_get);
-
-// POST request to update Book.
-router.post('/book/:id/update', book_controller.book_update_post);
-
-// GET request for one Book.
-router.get('/book/:id', book_controller.book_detail);
-
-// GET request for list of all Book items.
-router.get('/books', book_controller.book_list);
-
-/// AUTHOR ROUTES ///
-
-// GET request for creating Author. NOTE This must come before route for id (i.e. display author).
-router.get('/author/create', author_controller.author_create_get);
-
-// POST request for creating Author.
-router.post('/author/create', author_controller.author_create_post);
-
-// GET request to delete Author.
-router.get('/author/:id/delete', author_controller.author_delete_get);
-
-// POST request to delete Author.
-router.post('/author/:id/delete', author_controller.author_delete_post);
-
-// GET request to update Author.
-router.get('/author/:id/update', author_controller.author_update_get);
-
-// POST request to update Author.
-router.post('/author/:id/update', author_controller.author_update_post);
-
-// GET request for one Author.
-router.get('/author/:id', author_controller.author_detail);
-
-// GET request for list of all Authors.
-router.get('/authors', author_controller.author_list);
-
-/// GENRE ROUTES ///
-
-// GET request for creating a Genre. NOTE This must come before route that displays Genre (uses id).
-router.get('/genre/create', genre_controller.genre_create_get);
-
-//POST request for creating Genre.
-router.post('/genre/create', genre_controller.genre_create_post);
-
-// GET request to delete Genre.
-router.get('/genre/:id/delete', genre_controller.genre_delete_get);
-
-// POST request to delete Genre.
-router.post('/genre/:id/delete', genre_controller.genre_delete_post);
-
-// GET request to update Genre.
-router.get('/genre/:id/update', genre_controller.genre_update_get);
-
-// POST request to update Genre.
-router.post('/genre/:id/update', genre_controller.genre_update_post);
-
-// GET request for one Genre.
-router.get('/genre/:id', genre_controller.genre_detail);
-
-// GET request for list of all Genre.
-router.get('/genres', genre_controller.genre_list);
-
-/// BOOKINSTANCE ROUTES ///
-
-// GET request for creating a BookInstance. NOTE This must come before route that displays BookInstance (uses id).
-router.get('/bookinstance/create', book_instance_controller.bookinstance_create_get);
-
-// POST request for creating BookInstance.
-router.post('/bookinstance/create', book_instance_controller.bookinstance_create_post);
-
-// GET request to delete BookInstance.
-router.get('/bookinstance/:id/delete', book_instance_controller.bookinstance_delete_get);
-
-// POST request to delete BookInstance.
-router.post('/bookinstance/:id/delete', book_instance_controller.bookinstance_delete_post);
-
-// GET request to update BookInstance.
-router.get('/bookinstance/:id/update', book_instance_controller.bookinstance_update_get);
-
-// POST request to update BookInstance.
-router.post('/bookinstance/:id/update', book_instance_controller.bookinstance_update_post);
-
-// GET request for one BookInstance.
-router.get('/bookinstance/:id', book_instance_controller.bookinstance_detail);
-
-// GET request for list of all BookInstance.
-router.get('/bookinstances', book_instance_controller.bookinstance_list);
-
-module.exports = router;
-
- -

The module requires Express and then uses it to create a Router object. The routes are all set up on the router, which is then exported.

- -

The routes are defined either using .get() or .post() methods on the router object. All the paths are defined using strings (we don't use string patterns or regular expressions). Routes that act on some specific resource (e.g. book) use path parameters to get the object id from the URL.

- -

The handler functions are all imported from the controller modules we created in the previous section.

- -

Update the index route module

- -

We've set up all our new routes, but we still have a route to the original page. Let's instead redirect this to the new index page that we've created at the path '/catalog'.

- -

Open /routes/index.js and replace the existing route with the function below.

- -
// GET home page.
-router.get('/', function(req, res) {
-  res.redirect('/catalog');
-});
- -
-

Note: This is our first use of the redirect() response method. This redirects to the specified page, by default sending HTTP status code "302 Found". You can change the status code returned if needed, and supply either absolute or relative paths.

-
- -

Update app.js

- -

The last step is to add the routes to the middleware chain. We do this in app.js.

- -

Open app.js and require the catalog route below the other routes (add the third line shown below, underneath the other two):

- -
var index = require('./routes/index');
-var users = require('./routes/users');
-var catalog = require('./routes/catalog');  //Import routes for "catalog" area of site
- -

Next, add the catalog route to the middleware stack below the other routes (add the third line shown below, underneath the other two):

- -
app.use('/', index);
-app.use('/users', users);
-app.use('/catalog', catalog);  // Add catalog routes to middleware chain.
- -
-

Note: We have added our catalog module at a path '/catalog'. This is prepended to all of the paths defined in the catalog module. So for example, to access a list of books, the URL will be: /catalog/books/.

-
- -

That's it. We should now have routes and skeleton functions enabled for all the URLs that we will eventually support on the LocalLibrary website.

- -

Testing the routes

- -

To test the routes, first start the website using your usual approach

- - - -

Then navigate to a number of LocalLibrary URLs, and verify that you don't get an error page (HTTP 404). A small set of URLs are listed below for your convenience:

- - - -

Summary

- -

We've now created all the routes for our site, along with dummy controller functions that we can populate with a full implementation in later articles. Along the way we've learned a lot of fundamental information about Express routes, and some approaches for structuring our routes and controllers.

- -

In our next article we'll create a proper welcome page for the site, using views (templates) and information stored in our models.

- -

See also

- - - -

{{PreviousMenuNext("Learn/Server-side/Express_Nodejs/mongoose", "Learn/Server-side/Express_Nodejs/Displaying_data", "Learn/Server-side/Express_Nodejs")}}

- -

 

- -

In this module

- - - -

 

diff --git a/files/uk/learn/server-side/index.html b/files/uk/learn/server-side/index.html deleted file mode 100644 index c79d8ea81e..0000000000 --- a/files/uk/learn/server-side/index.html +++ /dev/null @@ -1,52 +0,0 @@ ---- -title: Server-side website programming -slug: Learn/Server-side -tags: - - Beginner - - CodingScripting - - Intro - - Landing - - Learn - - NeedsTranslation - - Server - - Server-side programming - - Topic - - TopicStub -translation_of: Learn/Server-side ---- -
{{LearnSidebar}}
- -

The Dynamic Websites  Server-side programming topic is a series of modules that show how to create dynamic websites; websites that deliver customised information in response to HTTP requests. The modules provide a generic introduction to server-side programming, along with specific beginner-level guides on how to use the Django (Python) and Express (Node.js/JavaScript) web frameworks to create basic applications.

- -

Most major websites use some kind of server-side technology to dynamically display different data as required. For example, imagine how many products are available on Amazon, and imagine how many posts have been written on Facebook? Displaying all of these using completely different static pages would be completely inefficient, so instead such sites display static templates (built using HTML, CSS, and JavaScript), and then dynamically update the data displayed inside those templates when needed, e.g. when you want to view a different product on Amazon.

- -

In the modern world of web development, learning about server-side development is highly recommended.

- -

Learning pathway

- -

Getting started with server-side programming is usually easier than with client-side development, because dynamic websites tend to perform a lot of very similar operations (retrieving data from a database and displaying it in a page, validating user-entered data and saving it in a database, checking user permissions and logging users in, etc.), and are constructed using web frameworks that make these and other common web server operations easy.

- -

A basic knowledge of programming concepts (or of a particular programming language) is useful, but not essential. Simlarly, expertise in client-side coding is not required, but a basic knowledge will help you work better with the developers creating your client-side web "front end".

- -

You will need to understand "how the web works". We recommend that you first read the following topics:

- - - -

With that basic understanding you'll be ready to work your way through the modules in this section. 

- -

Modules

- -

This topic contains the following modules. You should start with the first module, then go on to one of the following modules, which show how to work with two very popular server-side languages using appropriate web frameworks . 

- -
-
Server-side website programming first steps
-
This module provides server-technology-agnostic information about server-side website programming, including answers to fundamental questions about server-side programming — "what it is", "how it differs from client-side programming", and "why it is so useful" — and an overview of some of the more popular server-side web frameworks and guidance on how to select the most suitable for your site. Lastly we provide an introductory section on web server security.
-
Django Web Framework (Python)
-
Django is an extremely popular and fully featured server-side web framework, written in Python. The module explains why Django is such a good web server framework, how to set up a development environment and how to perform common tasks with it.
-
Express Web Framework (Node.js/JavaScript)
-
Express is a popular web framwork, written in JavaScript and hosted within the node.js runtime environment. The module explains some of the key benefits of this framework, how to set up your development environment and how to perform common web development and deployment tasks.
-
diff --git a/files/uk/learn/tools_and_testing/client-side_javascript_frameworks/index.html b/files/uk/learn/tools_and_testing/client-side_javascript_frameworks/index.html deleted file mode 100644 index 39daad4acb..0000000000 --- a/files/uk/learn/tools_and_testing/client-side_javascript_frameworks/index.html +++ /dev/null @@ -1,139 +0,0 @@ ---- -title: Розуміння JavaScript-фреймворків на стороні клієнта -slug: Learn/Tools_and_testing/Client-side_JavaScript_frameworks -translation_of: Learn/Tools_and_testing/Client-side_JavaScript_frameworks -original_slug: Learn/Tools_and_testing/Розуміння_JavaScript-фреймворків_на_стороні_клієнта ---- -
{{LearnSidebar}}
- -

JavaScript frameworks are an essential part of modern front-end web development, providing developers with tried and tested tools for building scalable, interactive web applications. Many modern companies use frameworks as a standard part of their tooling, so many front-end development jobs now require framework experience.

- -

As an aspiring front-end developer, it can be hard to work out where to begin when learning frameworks — there are so many different frameworks to choose from, new ones appear all the time, they mostly work in a similar way but do some things differently, and there are some specific things to be careful about when using frameworks.

- -

In this set of articles, we are aiming to give you a comfortable starting point to help you begin learning frameworks. We are not aiming to exhaustively teach you everything you need to know about React/ReactDOM, or Vue, or some other specific framework; the framework teams' own docs do that job already. Instead, we want to back up and first answer more fundamental questions such as:

- - - -

After that, we'll provide some tutorials covering the essentials of some of the major frameworks, to provide you with enough context and familiarity to start going into greater depth yourself. We want you to go forward and learn about frameworks in a pragmatic way that doesn't forget about web platform fundamental best practices such as accessibility.

- -

Get started now, with "Introduction to client-side frameworks"

- -

Prerequisites

- -

You should really learn the basics of the core web languages first before attempting to move on to learning client-side frameworks — HTML, CSS, and especially JavaScript.

- -

Your code will be richer and more professional as a result, and you'll be able to troubleshoot problems with more confidence if you understand the fundamental web platform features that the frameworks are building on top of.

- -
-

Looking to become a front-end web developer?

- -

We have put together a course that includes all the essential information you need to work towards your goal.

- -

Get started

-
- -

Introductory guides

- -
-
1. Introduction to client-side frameworks
-
We begin our look at frameworks with a general overview of the area, looking at a brief history of JavaScript and frameworks, why frameworks exist and what they give us, how to start thinking about choosing a framework to learn, and what alternatives there are to client-side frameworks.
-
2. Framework main features
-
Each major JavaScript framework has a different approach to updating the DOM, handling browser events, and providing an enjoyable developer experience. This article will explore the main features of “the big 4” frameworks, looking at how frameworks tend to work from a high level and the differences between them.
-
- -

React tutorials

- -
-

Note: React tutorials last tested in May 2020, with React/ReactDOM 16.13.1 and create-react-app 3.4.1.

- -

If you need to check your code against our version, you can find a finished version of the sample React app code in our todo-react repository. For a running live version, see https://mdn.github.io/todo-react-build/.

-
- -
-
1. Getting started with React
-
In this article we will say hello to React. We'll discover a little bit of detail about its background and use cases, set up a basic React toolchain on our local computer, and create and play with a simple starter app, learning a bit about how React works in the process.
-
2. Beginning our React todo list
-
Let's say that we’ve been tasked with creating a proof-of-concept in React – an app that allows users to add, edit, and delete tasks they want to work on, and also mark tasks as complete without deleting them. This article will walk you through putting the basic App component structure and styling in place, ready for individual component definition and interactivity, which we'll add later.
-
3. Componentizing our React app
-
At this point, our app is a monolith. Before we can make it do things, we need to break it apart into manageable, descriptive components. React doesn’t have any hard rules for what is and isn’t a component – that’s up to you! In this article, we will show you a sensible way to break our app up into components.
-
4. React interactivity: Events and state
-
With our component plan worked out, it's now time to start updating our app from a completely static UI to one that actually allows us to interact and change things. In this article we'll do this, digging into events and state along the way.
-
5. React interactivity: Editing, filtering, conditional rendering
-
As we near the end of our React journey (for now at least), we'll add the finishing touches to the main areas of functionality in our Todo list app. This includes allowing you to edit existing tasks and filtering the list of tasks between all, completed, and incomplete tasks. We'll look at conditional UI rendering along the way.
-
6. Accessibility in React
-
In our final tutorial article, we'll focus on (pun intended) accessibility, including focus management in React, which can improve usability and reduce confusion for both keyboard-only and screen reader users.
-
7. React resources
-
Our final article provides you with a list of React resources that you can use to go further in your learning.
-
- -

Ember tutorials

- -
-

Note: Ember tutorials last tested in May 2020, with Ember/Ember CLI version 3.18.0.

- -

If you need to check your code against our version, you can find a finished version of the sample Ember app code in the ember-todomvc-tutorial repository. For a running live version, see https://nullvoxpopuli.github.io/ember-todomvc-tutorial/ (this also includes a few additional features not covered in the tutorial).

-
- -
-
1. Getting started with Ember
-
In our first Ember article we will look at how Ember works and what it's useful for, install the Ember toolchain locally, create a sample app, and then do some initial setup to get it ready for development.
-
2. Ember app structure and componentization
-
In this article we'll get right on with planning out the structure of our TodoMVC Ember app, adding in the HTML for it, and then breaking that HTML structure into components.
-
3. Ember interactivity: Events, classes and state
-
At this point we'll start adding some interactivity to our app, providing the ability to add and display new todo items. Along the way, we'll look at using events in Ember, creating component classes to contain JavaScript code to control interactive features, and setting up a service to keep track of the data state of our app.
-
4. Ember Interactivity: Footer functionality, conditional rendering
-
Now it's time to start tackling the footer functionality in our app. Here we'll get the todo counter to update to show the correct number of todos still to complete, and correctly apply styling to completed todos (i.e. where the checkbox has been checked). We'll also wire up our "Clear completed" button. Along the way, we'll learn about using conditional rendering in our templates.
-
5. Routing in Ember
-
In this article we learn about routing or URL-based filtering as it is sometimes referred to. We'll use it to provide a unique URL for each of the three todo views — "All", "Active", and "Completed".
-
6. Ember resources and troubleshooting
-
Our final Ember article provides you with a list of resources that you can use to go further in your learning, plus some useful troubleshooting and other information.
-
- -

Vue tutorials

- -
-

Note: Vue tutorials last tested in May 2020, with Vue 2.6.11.

- -

If you need to check your code against our version, you can find a finished version of the sample Vue app code in our todo-vue repository. For a running live version, see https://mdn.github.io/todo-vue/dist/.

-
- -
-
1. Getting started with Vue
-
Now let's introduce Vue, the third of our frameworks. In this article, we'll look at a little bit of Vue background, learn how to install it and create a new project, study the high-level structure of the whole project and an individual component, see how to run the project locally, and get it prepared to start building our example.
-
2. Creating our first Vue component
-
Now it's time to dive deeper into Vue, and create our own custom component — we'll start by creating a component to represent each item in the todo list. Along the way, we'll learn about a few important concepts such as calling components inside other components, passing data to them via props and saving data state.
-
3. Rendering a list of Vue components
-
At this point we've got a fully working component; we're now ready to add multiple ToDoItem components to our App. In this article we'll look at adding a set of todo item data to our App.vue component, which we'll then loop through and display inside ToDoItem components using the v-for directive.
-
4. Adding a new todo form: Vue events, methods, and models
-
We now have sample data in place and a loop that takes each bit of data and renders it inside a ToDoItem in our app. What we really need next is the ability to allow our users to enter their own todo items into the app, and for that, we'll need a text <input>, an event to fire when the data is submitted, a method to fire upon submission to add the data and rerender the list, and a model to control the data. This is what we'll cover in this article.
-
5. Styling Vue components with CSS
-
The time has finally come to make our app look a bit nicer. In this article, we'll explore the different ways of styling Vue components with CSS.
-
6. Using Vue computed properties
-
In this article we'll add a counter that displays the number of completed todo items, using a feature of Vue called computed properties. These work similarly to methods but only re-run when one of their dependencies changes.
-
7. Vue conditional rendering: editing existing todos
-
Now it is time to add one of the major parts of functionality that we're still missing — the ability to edit existing todo items. To do this, we will take advantage of Vue's conditional rendering capabilities — namely v-if and v-else — to allow us to toggle between the existing todo item view and an edit view where you can update todo item labels. We'll also look at adding functionality to delete todo items.
-
8. Focus management with Vue refs
-
We are nearly done with Vue. The last bit of functionality to look at is focus management, or put another way, how we can improve our app's keyboard accessibility. We'll look at using Vue refs to handle this — an advanced feature that allows you to have direct access to the underlying DOM nodes below the virtual DOM, or direct access from one component to the internal DOM structure of a child component.
-
9. Vue resources
-
Now we'll round off our study of Vue by giving you a list of resources that you can use to go further in your learning, plus some other useful tips.
-
- -

Which frameworks did we choose?

- -

We are publishing our initial set of articles with guides focusing on three of the major frameworks out there — React/ReactDOM, Ember, and Vue. There is a variety of reasons for this:

- - - -

We want to say this upfront — we've not chosen the frameworks we are focusing on because we think they are the best, or because we endorse them in any way. We just think they score highly on the above criteria.

- -

Note that we were hoping to have more frameworks included upon initial publication, but we decided to release the content and then add more framework guides later, rather than delay it longer. If your favourite framework is not represented in this content and you'd like to help change that, feel free to discuss it with us! Get in touch with us via Matrix, or Discourse, or drop us a mail on the mdn-admins list.

diff --git a/files/uk/learn/tools_and_testing/client-side_javascript_frameworks/svelte_getting_started/index.html b/files/uk/learn/tools_and_testing/client-side_javascript_frameworks/svelte_getting_started/index.html deleted file mode 100644 index 1e8b54054a..0000000000 --- a/files/uk/learn/tools_and_testing/client-side_javascript_frameworks/svelte_getting_started/index.html +++ /dev/null @@ -1,538 +0,0 @@ ---- -title: Знайомимось зі Свелт -slug: >- - Learn/Tools_and_testing/Client-side_JavaScript_frameworks/Svelte_getting_started -translation_of: >- - Learn/Tools_and_testing/Client-side_JavaScript_frameworks/Svelte_getting_started -original_slug: >- - Learn/Tools_and_testing/Розуміння_JavaScript-фреймворків_на_стороні_клієнта/znayomymos_zi_svelte ---- -
{{LearnSidebar}}
-{{PreviousMenuNext("Learn/Tools_and_testing/Client-side_JavaScript_frameworks/Vue_resources","Learn/Tools_and_testing/Client-side_JavaScript_frameworks/Svelte_todo_list_beginning", "Learn/Tools_and_testing/Client-side_JavaScript_frameworks")}}
- -

У цій статті ми коротко ознайомимося з фреймворком Свелт. Ми побачимо як Свелт працює і що виокремлює його від інших фреймворків та інструментів, які ми вже бачили. Далі ми навчимося налаштовувати наше середовище розробки, створимо простий додаток, зрозуміємо структуру проекту, та побачимо як його запускати локально і збирати для продакшна.

- - - - - - - - - - - - -
Передумови:Для початку, рекомендуємо ознайомитись з основними мовами – HTML, CSS та JavaScript, та володіти терміналом/командним рядком. -


- Свелт – компілятор, який генерує маленький та високооптимізований JavaScript код з нашого; вам знадобиться термінал з Нодою та NPM – для компіляції та збирання вашої програми.

-
Мета: -

Налаштувати локальне середовище розробки Svelte, створити та зібрати перший додаток, зрозуміти основи того, як це працює.

-
- -

Свелт: новий підхід до створення складних інтерфейсів

- -

Светл пропонує інший підхід до створення веб-додатків, ніж деякі інші фреймворки у цьому модулі. Тоді як Реакт або В'ю виконують основну частину своєї роботи в браузері користувача, під час роботи програми, Свелт зміщує цю роботу на етап компіляції, який відбувається лише під час збирання програми, створюючи високооптимізований ванільний JavaScript.
-
- Результатом такого підходу є не тільки менші бандли та краща швидкість додатків, але й приємнішний досвід розробки – більш доступний для людей, які мають обмежений досвід роботи з екосистемою сучасних інструментів.
-
- Свелт тісно притримується класичної моделі веб-розробки HTML, CSS та JS, лише додаючи кілька розширень до HTML та JavaScript. Напевно, в ньому є менше понять та інструментів для вивчення, ніж в деякі інших фреймворках.
-
- Головними нинішніми недоліками є те, що це молодий фреймворк – тому його екосистема є більш обмеженою щодо інструментарію, підтримки, плагінів, чітких моделей використання тощо, ніж у більш зрілих фреймворків, а також є менше вакансій. Але його переваг повинно бути достатньо, щоб зацікавити вас дослідити його.

- -
-

Примітка: нещодавно Свелт додав офіційну підтримку TypeScript, одну з найочікуваніших можливостей. Ми розглянемо її згодом у цій серії уроків.

-
- -

Перед тим, як повернутися до цієї серії уроків, ми рекомендуємо вам прочитати навчальний посібник Свелт, щоб по-справжньому швидко познайомитися з основними поняттями, а потім навчитися будувати щось більш глибоке. Це займе близько 30 хвилин.

- -

Use cases

- -

Svelte can be used to develop small pieces of an interface or whole applications. You can either start from scratch letting Svelte drive your UI or you can incrementally integrate it into an existing application.

- -

Nevertheless, Svelte is particularly appropriate to tackle the following situations:

- - - -

Moreover, with the help of Sapper (a framework based on Svelte), you can also develop applications with advanced features like server-side rendering, code splitting, file-based routing and offline support. And then there's also Svelte Native, which lets you build native mobile applications.

- -

How does Svelte work?

- -

Being a compiler, Svelte can extend HTML, CSS, and JavaScript, generating optimal JavaScript code without any runtime overhead. To achieve this, Svelte extends vanilla web technologies in the following ways:

- - - -

The compiler only intervenes in very specific situations and only in the context of Svelte components. Extensions to the JavaScript language are minimal and carefully picked in order to not break JavaScript syntax nor alienate developers. In fact, you will be mostly working with vanilla JavaScript.

- -

First steps with Svelte

- -

Being a compiler, you can't just add a <script src="svelte.js"> tag to your page and import it into your app. You'll have to set up your development environment in order to let the compiler do its job.

- -

Requirements

- -

In order to work with Svelte you need to have Node.js installed. It's recommended that you use the long-term support (LTS) version. Node includes npm (the node package manager), and npx (the node package runner). Note that you can also use the Yarn package manager in place of npm, but we'll assume you are using npm in this set of tutorials. See Package management basics for more information on npm and yarn.

- -

If you're using Windows, you will need to install some software to give you parity with Unix/macOS terminal in order to use the terminal commands mentioned in this tutorial. Gitbash (which comes as part of the git for Windows toolset) or Windows Subsystem for Linux (WSL) are both suitable. Cmder is another very good and complete alternative. See Command line crash course for more information on these, and on terminal commands in general.

- -

Also see the following for more information:

- - - -

Creating your first Svelte app

- -

The easiest way to create a starter app template is to just download the starter template application. You can do that by visiting sveltejs/template on GitHub or you can avoid having to download and unzip it and just use degit.

- -

To create your starter app template, run the following terminal commands:

- -
npx degit sveltejs/template moz-todo-svelte
-cd moz-todo-svelte
-npm install
-npm run dev
- -
-

Note: degit doesn't do any kind of magic — it just lets you download and unzip the latest version of a git repo's contents. This is much quicker than using git clone because it will not download all the history of the repo, or create a complete local clone.

-
- -

After running npm run dev, Svelte will compile and build your application. It will start a local server at localhost:5000. Svelte will watch for file updates, and automatically recompile and refresh the app for you when changes are made to the source files. Your browser will display something like this:

- -

A simple start page that says hello world, and gives a link to the official svelte tutorials

- -

Application structure

- -

The starter template comes with the following structure:

- -
moz-todo-svelte
-├── readme.md
-├── package.json
-├── package-lock.json
-├── rollup.config.js
-├── .gitignore
-├── node_modules
-├── public
-│   ├── favicon.ico
-│   ├── index.html
-│   ├── global.css
-│   └── build
-│       ├── bundle.css
-│       ├── bundle.css.map
-│       ├── bundle.js
-│       └── bundle.js.map
-└── src
-    ├── App.svelte
-    └── main.js
- -

The contents are as follows:

- - - -

Having a look at our first Svelte component

- -

Components are the building blocks of Svelte applications. They are written into .svelte files using a superset of HTML.

- -

All three sections — <script>, <styles>, and markup — are optional, and can appear in any order you like.

- -
<script>
-  // logic goes here
-</script>
-
-<style>
-  /* styles go here */
-</style>
-
-<!-- markup (zero or more HTML elements) goes here -->
- -
-

Note: For more information on the component format, have a look at the svelte documentation.

-
- -

With this in mind, let's have a look at the src/App.svelte file that came with the starter template. You should see something like the following:

- -
<script>
-  export let name;
-</script>
-
-<main>
-  <h1>Hello {name}!</h1>
-  <p>Visit the <a href="https://svelte.dev/tutorial">Svelte tutorial</a> to learn how to build Svelte apps.</p>
-</main>
-
-<style>
-  main {
-    text-align: center;
-    padding: 1em;
-    max-width: 240px;
-    margin: 0 auto;
-  }
-
-  h1 {
-    color: #ff3e00;
-    text-transform: uppercase;
-    font-size: 4em;
-    font-weight: 100;
-  }
-
-  @media (min-width: 640px) {
-    main {
-      max-width: none;
-    }
-  }
-</style>
- -

The <script> section

- -

The <script> block contains JavaScript that runs when a component instance is created. Variables declared (or imported) at the top level are 'visible' from the component's markup. Top-level variables is the way Svelte handles the component state, and they are reactive by default. We will explain in detail what this means later on.

- -
<script>
-  export let name;
-</script>
- -

Svelte uses the export keyword to mark a variable declaration as a property (or prop), which means it becomes accessible to consumers of the component (e.g. other components). This is one example of Svelte extending JavaScript syntax to make it more useful, while keeping it familiar.

- -

The markup section

- -

In the markup section you can insert any HTML you like, and in addition you can insert valid JavaScript expression inside single curly brackets ({}). In this case we are embedding the value of the name prop right after the Hello text.

- -
<main>
-  <h1>Hello {name}!</h1>
-  <p>Visit the <a href="https://svelte.dev/tutorial">Svelte tutorial</a> to learn how to build Svelte apps.</p>
-</main>
- -

Svelte also supports tags like {#if...}, {#each...}, and {#await...} — these examples allow you to conditionally render a portion of the markup, iterate through a list of elements, and work with async values, respectively.

- -

The <style> section

- -

If you have experience working with CSS, the following snippet should make sense:

- -
<style>
-  main {
-    text-align: center;
-    padding: 1em;
-    max-width: 240px;
-    margin: 0 auto;
-  }
-
-  h1 {
-    color: #ff3e00;
-    text-transform: uppercase;
-    font-size: 4em;
-    font-weight: 100;
-  }
-
-  @media (min-width: 640px) {
-    main {
-      max-width: none;
-    }
-  }
-</style>
- -

We are applying a style to our <h1> element. What will happen other components with <h1> elements in them?

- -

In Svelte, CSS inside a component's <style> block will be scoped only to that component. This works by adding a class to selected elements, which is based on a hash of the component styles.

- -

You can see this in action by opening localhost:5000 in a new browser tab, right/Ctrl-clicking on the HELLO WORLD! label, and choosing Inspect:

- -

Svelte starter app with devtools open, showing classes for scoped styles

- -

When compiling the app, Svelte changes our h1 styles definition to h1.svelte-1tky8bj, and then modifies every <h1> element in our component to <h1 class="svelte-1tky8bj">, so that it picks up the styles as required.

- -
-

Note: You can override this behavior and apply styles to a selector globally using the :global(...) modifier (see the Svelte <style> docs for more information).

-
- -

Making a couple of changes

- -

Now that we have a general idea of how it all fits together, we can start making a few changes.
- At this point you can try updating your App.svelte component — for example change the <h1> element on line 6 of App.svelte so that it reads like this:

- -
<h1>Hello {name} from MDN!</h1>
- -

Just save your changes and the app running at localhost:5000 will be automatically updated.

- -

A first look at Svelte reactivity

- -

In the context of a UI framework, reactivity means that the framework can automatically update the DOM when the state of any component is changed.

- -

In Svelte, reactivity is triggered simply by assigning a new value to any top level variable in a component. For example, we could include a toggleName() function in our App component, and a button to run it.

- -

Try updating your <script> and markup sections like so:

- -
<script>
-  export let name;
-
-  function toggleName() {
-    if (name === 'world') {
-      name = 'svelte'
-    } else {
-      name = 'world'
-    }
-  }
-</script>
-
-<main>
-  <h1>Hello {name}!</h1>
-  <button on:click={toggleName}>Toggle name</button>
-  <p>Visit the <a href="https://svelte.dev/tutorial">Svelte tutorial</a> to learn how to build Svelte apps.</p>
-</main>
- -

Whenever the button is clicked, Svelte executes the toggleName() function, which in turn updates the value of the name variable.

- -

As you can see, the <h1> label is automatically updated. Behind the scenes, Svelte created the JavaScript code to update the DOM whenever the value of the name variable changes, without using any virtual DOM or other complex reconciliation mechanism.

- -

Note the use of : in on:click. That's Svelte's syntax for listening to DOM events.

- -

Inspecting main.js: the entry point of our app

- -

Let’s open src/main.js, which is where the App component is being imported and used. This file is the entry point for our app, and it initially looks like this:

- -
import App from './App.svelte';
-
-const app = new App({
-  target: document.body,
-  props: {
-    name: 'world'
-  }
-});
-
-export default app;
- -

main.js starts by importing the Svelte component that we are going to use. Then in line 3 it instantiates it, passing an option object with the following properties:

- - - -

A look under the hood

- -

How does Svelte manage to make all these files work together nicely?

- -

The Svelte compiler processes the <style> section of every component and compiles them into the public/build/bundle.css file.

- -

It also compiles the markup and <script> section of every component and stores the result in public/build/bundle.js. It also adds the code in src/main.js to reference the features of each component.

- -

Finally the file public/index.html includes the generated bundle.css and bundle.js files:

- -
<!DOCTYPE html>
-<html lang="en">
-<head>
-  <meta charset='utf-8'>
-  <meta name='viewport' content='width=device-width,initial-scale=1'>
-
-  <title>Svelte app</title>
-
-  <link rel='icon' type='image/png' href='/favicon.png'>
-  <link rel='stylesheet' href='/global.css'>
-  <link rel='stylesheet' href='/build/bundle.css'>
-
-  <script defer src='/build/bundle.js'></script>
-</head>
-
-<body>
-</body>
-</html>
- -

The minified version of bundle.js weighs a little more than 3KB, which includes the "Svelte runtime" (just 300 lines of JavaScript code) and the App.svelte compiled component. As you can see, bundle.js is the only JavaScript file referenced by index.html. There are no other libraries loaded into the web page.

- -

This is a much smaller footprint than compiled bundles from other frameworks. Take into account that, in the case of code bundles, it's not just the size of the files you have to download that matter. This is executable code that needs to be parsed, executed, and kept in memory. So this really makes a difference, especially in low-powered devices or CPU-intensive applications.

- -

Following this tutorial

- -

In this tutorial series you will be building a complete web application. We'll learn all the basics about Svelte and also quite a few advanced topics.

- -

You can just read the content to get a good understanding of Svelte features, but you'll get the most out of this tutorial if you follow along coding the app with us as you go. To make it easier for you to follow each article, we provide a GitHub repository with a folder containing the source for the app as it is at the start of each tutorial.

- -

Svelte also provides an online repl, which is a playground for live-coding Svelte apps on the web without having to install anything on your machine. We provide a repl for each article so you can start coding along right away. Let's talk a bit more about how to use these tools.

- -

Using Git

- -

The most popular version control system is Git, along with GitHub, a site that provides hosting for your repositories and several tools for working with them.

- -

We'll be using GitHub so that you can easily download the source code for each article. You will also be able to get the code as it should be after completing the article, just in case you get lost.

- -

After installing git, to clone the repository you should execute:

- -
git clone https://github.com/opensas/mdn-svelte-tutorial.git
- -

Then at the beginning of each article, you can just cd into the corresponding folder and start the app in dev mode to see what its current state should be, like this:

- -
cd 02-starting-our-todo-app
-npm install
-npm run dev
- -

If you want lo learn more about git and GitHub, we've compiled a list of links to useful guides — see Git and GitHub.

- -
-

Note: If you just want to download the files without cloning the git repo, you can use the degit tool like this — npx degit opensas/mdn-svelte-tutorial. You can also download a specific folder with npx degit opensas/mdn-svelte-tutorial/01-getting-started. Degit won't create a local git repo, it will just download the files of the specified folder.

-
- -

Using the Svelte REPL

- -

A REPL (read–eval–print loop) is an interactive environment that allows you to enter commands and immediately see the results — many programming languages provide a REPL.

- -

Svelte's REPL is much more than that. It's an online tool that allows you to create complete apps, save them online, and share with others.

- -

It's the easiest way to start playing with Svelte from any machine, without having to install anything. It is also widely used by Svelte community. If you want to share an idea, ask for help, or report an issue, it's always extremely useful to create a REPL instance demomstrating the issue.

- -

Let's have a quick look at the Svelte REPL and how you'd use it. It looks like so:

- -

the svelte repl in action, showing component code on the left, and output on the right

- -

To start a REPL, open your browser and navigate to https://svelte.dev/repl.

- - - -

Whenever you change any file on the REPL, Svelte will recompile the app and update the Result tab. To share your app simply share the url. For example, here's the link for a REPL running our complete app: https://svelte.dev/repl/378dd79e0dfe4486a8f10823f3813190?version=3.23.2.

- -
-

Note: Notice how you can specify Svelte's version in the URL. This is useful when reporting issues related to a specific version of Svelte.

-
- -

We will provide a REPL at the beginning and end of each article so that you can start coding with us right away.

- -
-

Note: at the moment the REPL can't handle folder names properly. If you are following the tutorial on the REPL, just create all your components inside the root folder. Then when you see a path in the code, for example import Todos from './components/Todos.svelte', just replace it with a flat URL, e.g. import Todos from './Todos.svelte'.

-
- -

The code so far

- -

Git

- -

Clone the github repo (if you haven't already done it) with:

- -
git clone https://github.com/opensas/mdn-svelte-tutorial.git
- -

Then to get to the current app state, run

- -
cd mdn-svelte-tutorial/01-getting-started
- -

Or directly download the folder's content:

- -
npx degit opensas/mdn-svelte-tutorial/01-getting-started
- -

Remember to run npm install && npm run dev to start your app in development mode.

- -

REPL

- -

To code along with us using the REPL, start at

- -

https://svelte.dev/repl/fc68b4f059d34b9c84fa042d1cce586c?version=3.23.2

- -

Summary

- -

This brings us to the end of our initial look at Svelte, including how to install it locally, create a starter app, and how the basics work. In the next article we'll start building our first proper application — a todo list. Before we do that, however, let's recap some of the things we’ve learned.

- -

In Svelte:

- - - -

{{PreviousMenuNext("Learn/Tools_and_testing/Client-side_JavaScript_frameworks/Vue_resources","Learn/Tools_and_testing/Client-side_JavaScript_frameworks/Svelte_todo_list_beginning", "Learn/Tools_and_testing/Client-side_JavaScript_frameworks")}}

- -

In this module

- - diff --git a/files/uk/learn/tools_and_testing/cross_browser_testing/index.html b/files/uk/learn/tools_and_testing/cross_browser_testing/index.html deleted file mode 100644 index 1437b545ea..0000000000 --- a/files/uk/learn/tools_and_testing/cross_browser_testing/index.html +++ /dev/null @@ -1,42 +0,0 @@ ---- -title: Тестування кросбраузерності -slug: Learn/Tools_and_testing/Cross_browser_testing -translation_of: Learn/Tools_and_testing/Cross_browser_testing -original_slug: Learn/Tools_and_testing/Тестування_кросбраузерності ---- -
{{LearnSidebar}}
- -

This module focuses on testing web projects across different browsers. We look at identifying your target audience (e.g. what users, browsers, and devices do you most need to worry about?), how to go about doing testing, the main issues that you'll face with different types of code and how to mitigate them, what tools are most useful in helping you test and fix problems, and how to use automation to speed up testing.

- -
-

Looking to become a front-end web developer?

- -

We have put together a course that includes all the essential information you need to work towards your goal.

- -

Get started

-
- -

Prerequisites

- -

You should really learn the basics of the core HTML, CSS, and JavaScript languages first before attempting to use the tools detailed here.

- -

Guides

- -
-
Introduction to cross browser testing
-
This article starts the module off by providing an overview of the topic of cross browser testing, answering questions such as "what is cross browser testing?", "what are the most common types of problems you'll encounter?", and "what are the main approaches for testing, identifying, and fixing problems?"
-
Strategies for carrying out testing
-
Next, we drill down into carrying out testing, looking at identifying a target audience (e.g. what browsers, devices, and other segments should you make sure are tested), lo-fi testing strategies (get yourself a range of devices and some virtual machines and do ad-hoc tests when needed), higher tech strategies (automation, using dedicated testing apps), and testing with user groups.
-
Handling common HTML and CSS problems
-
With the scene set, we'll now look specifically at the common cross-browser problems you will come across in HTML and CSS code, and what tools can be used to prevent problems from happening, or fix problems that occur. This includes linting code, handing CSS prefixes, using browser dev tools to track down problems, using polyfills to add support into browsers, tackling responsive design problems, and more.
-
Handling common JavaScript problems
-
Now we'll look at common cross-browser JavaScript problems and how to fix them. This includes information on using browser dev tools to track down and fix problems, using polyfills and libraries to work around problems, getting modern JavaScript features working in older browsers, and more.
-
Handling common accessibility problems
-
Next we turn our attention to accessibility, providing information on common problems, how to do simple testing, and how to make use of auditing/automation tools for finding accessibility issues.
-
Implementing feature detection
-
Feature detection involves working out whether a browser supports a certain block of code, and running different code dependent on whether it does (or doesn't), so that the browser can always provide a working experience rather than crashing/erroring in some browsers. This article details how to write your own simple feature detection, how to use a library to speed up implementation, and native features for feature detection such as @supports.
-
Introduction to automated testing
-
Manually running tests on several browsers and devices, several times per day, can get tedious and time-consuming. To handle this efficiently, you should become familiar with automation tools. In this article, we look at what is available, how to use task runners, and the basics of how to use commercial browser test automation apps such as Sauce Labs and Browser Stack.
-
Setting up your own test automation environment
-
In this article, we will teach you how to install your own automation environment and run your own tests using Selenium/WebDriver and a testing library such as selenium-webdriver for Node. We will also look at how to integrate your local testing environment with commercial apps like the ones discussed in the previous article.
-
diff --git a/files/uk/learn/tools_and_testing/github/index.html b/files/uk/learn/tools_and_testing/github/index.html deleted file mode 100644 index 6af5a10937..0000000000 --- a/files/uk/learn/tools_and_testing/github/index.html +++ /dev/null @@ -1,87 +0,0 @@ ---- -title: Git та GitHub -slug: Learn/Tools_and_testing/GitHub -translation_of: Learn/Tools_and_testing/GitHub -original_slug: Learn/Tools_and_testing/Git_та_GitHub ---- -
{{LearnSidebar}}
- -

All developers will use some kind of version control system (VCS), a tool to allow them to collaborate with other developers on a project without danger of them overwriting each other's work, and roll back to previous versions of the code base if a problem is discovered later on. The most popular VCS (at least among web developers) is Git, along with GitHub, a site that provides hosting for your repositories and several tools for working with them. This module aims to teach you what you need to know about both of them.

- -

Overview

- -

VCSes are essential for software development:

- - - -

VCSes provide tools to meet the above needs. Git is an example of a VCS, and GitHub is a web site + infrastructure that provides a Git server plus a number of really useful tools for working with git repositories individually or in teams, such as reporting issues with the code, reviewing tools, project management features such as assigning tasks and task statuses, and more.

- -
-

Note: Git is actually a distributed version control system, meaning that a complete copy of the repository containing the codebase is made on your computer (and everyone else's). You make changes to your own copy, and then push those changes back up to the server, where an administrator will decide whether to merge your changes with the master copy.

-
- -
-

Looking to become a front-end web developer?

- -

We have put together a course that includes all the essential information you need to work towards your goal.

- -

Get started

-
- -

Prerequisites

- -

To use Git and GitHub, you need:

- - - -

In terms of prerequisite knowledge, you don't need to know anything about web development, Git/GitHub or VCSes to start this module. However, it is recommended that you know some coding so that you have reasonable computer literacy, and some code to store in your repositories!

- -

It is also preferrable that you have some basic terminal knowledge, so for example moving between directories, creating files, and modifying the system PATH.

- -
-

Note: Github is not the only site/toolset you can use with Git. There are other alternatives such as GitLab that you could try, and you could also try setting your own Git server up and using it instead of GitHub. We've only stuck with GitHub in this course to provide a single way that works.

-
- -

Guides

- -

Note that the links below take you to resources on external sites. Eventually we will are aiming to have our own dedicated Git/GitHub course, but for now, these will help you get to grips with the subject in hand.

- -
-
Hello World (from GitHub)
-
This is a good place to start — this practical guide gets you to jump right into using GitHub, learning the basics of Git such as creating repositories and branches, making commits, and opening and merging pull requests.
-
Git Handbook (from GitHub)
-
This Git Handbook goes into a little more depth, explaining what a VCS is, what a repository is, how the basic GitHub model works, Git commands and examples, and more.
-
Forking Projects (from GitHub)
-
Forking projects is essential when you want to contribute to someone else's code. This guide explains how.
-
About Pull Requests (from GitHub)
-
A useful guide to managing pull requests, the way that your suggested code changes are delivered to people's repositories for consideration.
-
Mastering issues (from GitHub)
-
Issues are like a forum for your GitHub project, where people can ask questions and report problems, and you can manage updates (for example assigning people to fix issues, clarifying the issue, letting people know things are fixed). This articles gives you what you need to know about issues.
-
- -
-

Note: There is a lot more that you can do with Git and GitHub, but we feel that the above represents the minimum you need to know to start using Git effectively. As you get deeper into Git, you'll start to realise that it is easy to go wrong when you start using more complicated commands. Don't worry, even professional web developers find Git confusing sometimes, and often solve problems by searching for solutions on the web, or consulting sites like Flight rules for Git and Dangit, git!

-
- -

See also

- - diff --git a/files/uk/learn/tools_and_testing/index.html b/files/uk/learn/tools_and_testing/index.html deleted file mode 100644 index 2cb51ee8d2..0000000000 --- a/files/uk/learn/tools_and_testing/index.html +++ /dev/null @@ -1,61 +0,0 @@ ---- -title: Tools and testing -slug: Learn/Tools_and_testing -tags: - - Accessibility - - Automation - - Beginner - - CSS - - CodingScripting - - HTML - - JavaScript - - Landing - - Learn - - NeedsTranslation - - Testing - - Tools - - Topic - - TopicStub - - cross browser - - user testing -translation_of: Learn/Tools_and_testing ---- -
{{LearnSidebar}}
- -

Once you've started to become comfortable programming with core web technologies (like HTML, CSS, and JavaScript), and you start to get more experience, read more resources, and learn more tips and tricks, you'll start to come across all kind of tools, from JavaScript frameworks, to testing and automation tools, and more besides. As your web projects become larger and more complex, you'll want to start taking advantage of some of these tools, working out a reliable toolchain to give your development process superpowers.

- -

On top of that, we still need to keep cross-browser support in the forefront of our minds, and make sure that our code follows best practices that allow our projects to work across different browsers and devices that our users are using to browse the Web, and be usable by people with disabilities.

- -

Working out what tools you should be using can be a difficult process, so we have written this set of articles to inform you of what types of tool are available, what they can do for you, and how to make use of the current industry favourites.

- -
-

Note: We have referenced a number of tools in this topic, not because we endorse them or think they are the best, but because we know they work and have good industry support. In most cases there are other tools available, old ones will go out of fashion, and new ones will no doubt appear.

-
- - -
-

Looking to become a front-end web developer?

- -

We have put together a course that includes all the essential information you need to work towards your goal.

- -

Get started

-
- -

Prerequisites

- -

You should really learn the basics of the core HTML, CSS, and JavaScript languages first before attempting to use many the tools detailed here. For example, you'll need to know the fundamentals of these languages before you start debugging problems in complex web code, making effective use of JavaScript frameworks, or writing tests and running them against your code using test runners.

- -

In addition, you should start with the first module in this topic, which gives a useful overview of the general area.

- -

Modules

- -
-
Understanding client-side web development tools
-
Client-side tooling can be intimidating, but this series of articles aims to illustrate the purpose of some of the most common client-side tool types, explain the tools you can chain together, how to install them using package managers, and control them using the command line. We finish up by providing a complete toolchain example showing you how to get productive.
-
Understanding client-side JavaScript frameworks
-
JavaScript frameworks are an essential part of modern front-end web development, providing developers with tried and tested tools for building scalable, interactive web applications. Many modern companies use frameworks as a standard part of their tooling, so many front-end development jobs now require framework experience. This module gives you some fundamental background knowledge about how client-side frameworks work and how they fit into your toolset, before moving on to tutorial series covering some of today's most popular ones.
-
Git and GitHub
-
All developers will use some kind of version control system (VCS), a tool to allow them to collaborate with other developers on a project without danger of them overwriting each other's work, and roll back to previous versions of the code base if a problem is discovered later on. The most popular VCS (at least among web developers) is Git, along with GitHub, a site that provides hosting for your repositories and several tools for working with them. This module aims to teach you what you need to know about both of them.
-
Cross browser testing
-
This module looks specifically at the area of testing web projects across different browsers. Here we look at identifying your target audience (e.g. what users, browsers and devices do you most need to worry about?), how to go about testing, the main issues that you'll face with different types of code and how to fix/mitigate those, what tools are most useful in helping you test and fix problems, and how to use automation to speed up testing.
-
diff --git a/files/uk/learn/tools_and_testing/understanding_client-side_tools/index.html b/files/uk/learn/tools_and_testing/understanding_client-side_tools/index.html deleted file mode 100644 index 61bc35ac77..0000000000 --- a/files/uk/learn/tools_and_testing/understanding_client-side_tools/index.html +++ /dev/null @@ -1,38 +0,0 @@ ---- -title: Розуміння інструментів веб-розробки на стороні клієнта -slug: Learn/Tools_and_testing/Understanding_client-side_tools -translation_of: Learn/Tools_and_testing/Understanding_client-side_tools -original_slug: Learn/Tools_and_testing/Розуміння_інструментів_веб-розробки_на_стороні_клієнта ---- -
{{LearnSidebar}}
- -

Client-side tooling can be intimidating, but this series of articles aims to illustrate the purpose of some of the most common client-side tool types, explain the tools you can chain together, how to install them using package managers, and control them using the command line. We finish up by providing a complete toolchain example showing you how to get productive.

- -

Get started now, with our "Client-side tooling overview"

- -

Prerequisites

- -

You should really learn the basics of the core HTML, CSS, and JavaScript languages first before attempting to use the tools detailed here.

- -
-

Looking to become a front-end web developer?

- -

We have put together a course that includes all the essential information you need to work towards your goal.

- -

Get started

-
- -

Guides

- -
-
1. Client-side tooling overview
-
In this article we provide an overview of modern web tooling, what kinds of tools are available and where you’ll meet them in the lifecycle of web app development, and how to find help with individual tools.
-
2. Command line crash course
-
In your development process you'll undoubtedly be required to run some command in the terminal (or on the "command line" — these are effectively the same thing). This article provides an introduction to the terminal, the essential commands you'll need to enter into it, how to chain commands together, and how to add your own command line interface (CLI) tools.
-
3. Package management basics
-
In this article we'll look at package managers in some detail to understand how we can use them in our own projects — to install project tool dependencies, keep them up-to-date, and more.
-
4. Introducing a complete toolchain
-
In the final couple of articles in the series we will solidify your tooling knowledge by walking you through the process of building up a sample case study toolchain. We'll go all the way from setting up a sensible development environment and putting transformation tools in place to actually deploying your app on Netlify. In this article we'll introduce the case study, set up our development environment, and set up our code transformation tools.
-
5. Deploying our app
-
In the final article in our series, we take the example toolchain we built up in the previous article and add to it so that we can deploy our sample app. We push the code to GitHub, deploy it using Netlify, and even show you how to add a simple test into the process.
-
diff --git a/files/uk/mdn/about/index.html b/files/uk/mdn/about/index.html deleted file mode 100644 index 687b08f8cb..0000000000 --- a/files/uk/mdn/about/index.html +++ /dev/null @@ -1,116 +0,0 @@ ---- -title: Про MDN -slug: MDN/About -tags: - - MDN Meta - - Путівник - - Спільнота -translation_of: MDN/About -original_slug: MDN/Про ---- -
{{MDNSidebar}}
- -
{{IncludeSubNav ("/uk/docs/MDN")}}
- -

MDN Web Docs — це постійно оновлюваний навчальний майданчик з веб-технологій та програмного забезпечення, яке живить {{Glossary("Тенета", "всесвітнє павутиння")}}, зокрема:

- - - -

Наша мета

- -

Мета MDN дуже проста: надати розробникам всі необхідні відомості для створення проектів у всесвітній мережі. Якщо є відкрита технологія, доступна для тенет, ми маємо її задокументувати.

- -

Ми також надаємо документацію продуктів Mozilla і відомості те, як складати проекти Mozilla та брати участь у їх розробці.

- -

Якщо ви не впевнені, чи слід висвітлювати на MDN якусь тему, прочитайте: чи належить це MDN?

- -

Як можна допомогти?

- -

Допомога MDN не конче потребує фахових навичок з написання коду чи письменницького хисту! Існує чимало різних способів допомоги: від загальної пере́вірки статей на змістовність та легкочитність до набору тексту та додавання зразків коду. Насправді, шляхів допомоги так багато, що ми цьому присвятили окрему сторінку «Початок роботи», яка допоможе вам обрати завдання залежно від того, що вам цікаво та скільки часу ви готові приділити цій справі.

- -

Ви також можете допомогти розповівши про MDN у власному блозі чи веб-сайті.

- -

Спільнота MDN

- -

Наша спільнота є всесвітньою! До неї належать люди з усього світу, носії низки різних мов. Якщо ви хочете дізнатись про нас більше, чи вам потрібна якась допомога з MDN, не соромтеся звернутись до нашого форуму або каналу IRC! Крім того, ми маємо обліковий запис @MozDevNet у Twitter. Там можна стежити за нашою діяльністю або навіть надсилати нам повідомлення, якщо раптом щось не так, або ви хочете лишити відгук (чи то пак щиру подяку) нашим учасникам та укладачам!

- -

Використання вмісту MDN

- -

Вміст MDN є безкоштовним та поширюється на умовах ліцензії відкритого доступу.

- -

Авторські права та ліцензії

- -

Вміст MDN повністю доступний під різними ліцензіями відкритого доступу. Цей розділ охоплює різновиди вмісту, який ми надаємо, та ліцензії, що на нього поширюються.

- -

Документація та статті

- -

Вікі-документи MDN було укладено за участю багатьох авторів, як у межах Mozilla Foundation, так і поза ними. Якщо не зазначено інше, вміст доступний на умовах ліцензії Creative Commons Attribution-ShareAlike (CC-BY-SA), v2.5 або будь-якої пізнішої версії. Будь ласка, наводьте «Mozilla Contributors» та посилання (якщо в мережі) або URL (якщо для друку) на відповідну вікі-сторінку, яку мали за джерело. Наприклад, передруковуючи цю статтю, можна написати таке:

- -
Про MDN від Mozilla Contributors ліцензовано під CC-BY-SA 2.5.
- -

Зверніть увагу, що в наведеному прикладі «Mozilla Contributors» є посиланням на історію цитованої сторінки. Докладніше див. у статті Поради щодо ліцензійних позначок.

- -
-

Див. вміст MDN на WebPlatform.org для отримання відомостей про передрук та ліцензійні позначки статей MDN на сторінках webplatform.org.

-
- -

Приклади й уривки коду

- -

Зразки коду, додані 20 серпня 2010 року чи пізніше, перебувають у відкритому доступі (CC0). Загалом згадка про ліцензію не потрібна, та якщо ви хочете, можете зазначити таке: "Всі авторські права передаються у суспільне надбання. http://creativecommons.org/publicdomain/zero/1.0/".

- -

На зразки коду, додані раніше 20 серпня 2010 року, поширюються умови ліцензії MIT; ви маєте лише доповнити шаблон ліцензації MIT таким рядком: "© <дата останньої версії вікі-сторінки> <ім'я особи, що додала її до вікі>".

- -

Внесок

- -

Якщо ви хочете взяти участь в укладанні документації, вам доведеться погодитись на поширення вашого внеску на умовах ліцензії Attribution-ShareAlike (або іншої ліцензії, що може бути зазначена на сторінці, яку ви редагуєте) та зразків коду на умовах Creative Commons CC-0 (суспільне надбання). Будь-який внесок у документацію MDN означає вашу згоду на поширення власного доробку на умовах цих ліцензій.

- -

Деякі старі статті використовують інші ліцензії, про що свідчить відповідна позначка Alternate License Block наприкінці кожної такої сторінки.

- -
-

Для створення нових сторінок вживати інші ліцензії не дозволено.

-
- -

Авторське право на кожен внесок належить авторові, якщо він не передавав його іншій особі.

- -

Якщо маєте сумніви чи запитання щодо викладеного тут, зв'яжіться з очільниками MDN.

- -

Товарні знаки й логотипи

- -
-

Дія ліцензії Creative Commons не поширюється на товарні знаки й логотипи Mozilla Foundation, як і на вигляд та оздоблення цього сайту. Вони, як витвір окремого авторства, не є частиною вмісту MDN, та ліцензовані на інших умовах. Якщо деякі з них ви хочете використати разом із текстом статей, чи маєте якісь питання щодо ліцензійних умов, ви мусите звернутись до Mozilla Foundation за адресою licensing@mozilla.org.

- -

Посилання на MDN

- -

Різні види посилань та відповідні поради див. у статті посилання на MDN.

- -

Завантаження вмісту

- -

Ви можете завантажити повне дзеркало MDN (2,1 Гб на лютий 2017 року).

- -

Окремі сторінки

- -

Ви можете завантажити вміст окремої сторінки MDN, додавши до URL-адреси відповідні параметри, що вказують бажаний формат.

- -

Сторонні засоби

- -

Ви можете переглядати вміст MDN за допомогою сторонніх засобів, як-от Dash (для macOS) та Zeal (для Linux та Windows).

- -

Поза тим, Kapeli поширює офлайнові документи MDN що охоплюють HTML, CSS, JavaScript, SVG та XSLT.

- -

Негаразди з MDN Web Docs

- -

Про те, куди і як звертатися з повідомленням про помилки в роботі чи на сторінках документації MDN, див. у статті як повідомити про помилку в MDN.

- -

Історія MDN Web Docs

- -

MDN Web Docs (раніше Mozilla Developer Network (MDN), а до того Mozilla Developer Center (MDC), також відомий як Devmo) з'явився на початку 2005 року, коли Mozilla Foundation отримала від AOL ліцензію на використання вмісту Netscape DevEdge. Вміст DevEdge опрацювали і все, що становило цінність, добровольці згодом перенесли до MDN.

- -

Докладнішу історію MDN, зокрема оповідки декого з причетних осіб, викладено в статті про наше святкування десятої річниці.

- -

Про Mozilla

- -

Якщо вас цікавить хто ми є і як бути частиною Mozilla, чи просто де нас шукати, — ви прийшли куди треба. Дізнайтеся, що нас спонукає і що робить особливими, на сторінці нашої місії.

diff --git a/files/uk/mdn/contribute/getting_started/index.html b/files/uk/mdn/contribute/getting_started/index.html deleted file mode 100644 index 08d86d068b..0000000000 --- a/files/uk/mdn/contribute/getting_started/index.html +++ /dev/null @@ -1,107 +0,0 @@ ---- -title: З чого почати на MDN -slug: MDN/Contribute/Getting_started -tags: - - MDN Meta - - Вступ - - Початківець - - Путівник -translation_of: MDN/Contribute/Getting_started ---- -
{{MDNSidebar}}
{{IncludeSubnav("/uk/docs/MDN")}}
- -
Ми — відкрита спільнота розробників та редакторів, що створюють ресурси для кращого вебу, незалежно від компанії, {{glossary("Browser", "переглядача")}} та платформи. Будь-хто може долучитися й кожна нова особа нас посилює. Разом ми можемо й надалі запроваджувати новації в царині веб-технологій, що слугуватимуть спільній меті. Все починається саме тут, завдяки вам.
-Кожна частина MDN (від коду, що уможливлює роботу сайту, до прикладів, зразків коду та документації) створена спільнотою розробників та редакторів. Усі можуть запропонувати щось від себе, і ми сподіваємося, що ви приєднаєтесь до нас!
- -

Три прості кроки до MDN

- -

MDN побудована за принципом Вікіпедії, де будь-хто може додавати й редагувати вміст. Вам не треба бути програмістом чи багато знати про технології. Є безліч завдань, що потребують вирішення: від простих, таких як коректура та виправлення помилок, до складних, як написання документації API. Цей путівник допоможе вам зробити перші кроки та з'ясувати, чим саме ви можете найбільше посприяти поліпшенню MDN.

- -

Брати учать у розвитку MDN легко і цілком безпечно. Навіть якщо ви десь схибите, це легко виправити; якщо ви не певні того, як щось має виглядати, або маєте прогалини в знаннях граматики, не хвилюйтеся про це! У нас є команда людей, робота яких — пильнувати, щоб вміст MDN був якісним наскільки це можливо. Завжди хтось буде поруч, щоб переконатися, що ваше викладення є охайним та зрозумілим. Поширюйте свої знання, діліться тим, на чому знаєтесь найліпше, а решта спільноти допоможе зробити вашу роботу навіть кращою.

- -
-

Заувага: Над перекладом MDN українською мовою працюють лише добровольці (жодної команди постійних учасників немає) але ви завжди можете покладатися на допомогу більш досвідчених членів україномовної частини спільноти.

-
- -

Крок 1: Створіть обліковий запис на MDN

- -

Щоб взяти участь у творенні MDN, вам потрібен обліковий запис. Докладно про це читайте у статті «Як створити обліковий запис MDN». Завважте, що для створення профілю MDN необхідно мати обліковий запис на GitHub, бо зараз ми використовуємо GitHub для аутентифікації.

- -

Якщо ваша задача потребує створення нових сторінок, читайте відповідний розділ статті «Як створювати й редагувати сторінки» про те, як отримати відповідний дозвіл. З міркувань безпеки нові користувачі спершу позбавлені цієї можливості.

- -

Крок 2: Оберіть завдання

- -

Тепер, коли ви увійшли в систему, прочитайте опис {{anch("Можливі типи завдань", "різних типів завдань")}} й оберіть те, що вам найбільш до вподоби. Ви можете обрати будь-яке завдання, що подобається, і почати робити свій внесок.

- -

Крок 3: Виконайте завдання

- -

Тепер, коли ви знаєте, що саме хочете робити, просто знайдіть якусь сторінку чи то приклад коду, що потребує вашої участі, та виконайте своє завдання!

- -

Не переймайтеся надмірно довершеністю зробленого. Інші учасники спільноти працюють зокрема й над виправленням помилок, що їх ви можете припуститися. Якщо у Вас виникли запитання під час роботи, на сторінці «Спільнота» Ви знайдете списки розсилки та канали чатів, де можна отримати відповідь.

- -
-

Заувага: Якщо ви хочете перевірити якісь зміни на MDN перш ніж робити щось «насправді», у нас саме для того є сторінка «Пісочниця». Будьте ласкаві, грайтеся лише там. Не варто робити непотрібних змін на звичайних сторінках, аби побачити, що станеться; це створює безлад, який комусь доведеться прибирати, чи навіть гірше — спантеличує читачів, які щось вивчають або намагаються знайти.

-
- -

Як завершите розпочате завдання, можете братися до наступного. Або ж зверніть увагу на інші речі, які ви можете зробити на MDN.

- -

Можливі типи завдань

- -

Існує кілька напрямків, які ви можете обрати, щоб внести свій внесок у розвиток MDN залежно від вашого хисту й уподобань. Хоча деякі завдання можуть бути складними, у нас є багато простих. Чимало завдань потребує лише п'яти хвилин (або й менше!) вашого часу. Нижче наведено різні типи завдань та приблизний час, що кожне з них зазвичай потребує.

- -

Варіант 1: Мені подобаються слова

- -

Ви можете допомогти нам перевірити чи зредагувати наявні документи, а також позначити їх належними мітками.

- - - -
Заувага: Якщо ви перевіряєте статті або пишете нові, ознайомтеся, будь ласка, спершу зі Style Guide. Це допоможе забезпечити однорідність та послідовність викладення.
- -

Варіант 2: Мені подобається код

- -

Нам потрібно більше зразків коду! Ви також можете допомогти із розробкою Kuma — платформи MDN.

- - - -

Варіант 3: Мені однаково подобається писати слова і код

- -

У нас є завдання, які вимагають технічних та мовних навичок, як написання нових статей, перевірка на технічну точність або адаптація документів.

- - - -

Варіант 4: Я хочу перекласти MDN своєю мовою

- -

Всю роботу з перекладу й умісцевлення MDN здійснює наша дивовижна спільнота добровольців.

- - - -

Варіант 5: Я знайшов хибну інформацію, але не знаю, як це виправити

- -

Ви можете повідомити про негаразди надіславши звіт. (5 хвилин)

- -

Інші речі, які ви можете зробити на MDN

- - diff --git a/files/uk/mdn/contribute/howto/create_and_edit_pages/index.html b/files/uk/mdn/contribute/howto/create_and_edit_pages/index.html deleted file mode 100644 index 900b4fa71f..0000000000 --- a/files/uk/mdn/contribute/howto/create_and_edit_pages/index.html +++ /dev/null @@ -1,181 +0,0 @@ ---- -title: Як створювати й редагувати сторінки -slug: MDN/Contribute/Howto/Create_and_edit_pages -tags: - - Вступ - - Початківець - - Путівник -translation_of: MDN/Contribute/Howto/Create_and_edit_pages -original_slug: MDN/Contribute/Howto/Як_створювати_й_редагувати_сторінки ---- -
{{MDNSidebar}}
- -

Ця стаття знайомить новачків із тим, як здійснюється редагування наявних сторінок та створення нових.

- -

Редагування наявних сторінок

- -

Редагування сторінки:

- - - -

Попередній перегляд змін

- -

Щоб продивитись, як ваші зміни будуть відображатись:

- - - -

Будьте уважні! Попередній перегляд сторінки не зберігає ваші зміни, тому не закривайте вкладку з редактором, поки не збережете свою роботу.

- -

Коментар до ревізії

- -

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

- -

Зміст

- -

В розділі "У цій статті" знаходиться автоматично створений список посилань до заголовків на сторінці. Формулювання цих посилань можна змінювати, редагуючи заголовки. Також можна видалити вміст секції або зменшити кількість посилань в ній, вибравши "Редагувати назву сторінки та властивості" і змінити значення спадного списку пункту "зміст".

- -

Мітки

- -

Ви можете додавати або видаляти теги, які описують вміст сторінки і функцію під розділом редагування сторінки. Дивіться розділ Як правильно поставити теги сторінок для отримання інформації про теги.

- -

Потрібна перевірка?

- -

Якщо експерт або досвідчений дописувач повинен переглянути ваші зміни, ви можете надіслати запит на технічний огляд (для коду, API чи технологій), редакційний огляд (прозу, граматику та вміст), переконавшись, що відповідний прапорець встановлено перед збереженням.

- -

Вкладення файлів

- -

Якщо ви хочете долучити файл до існуючої сторінки або додати ілюстрацію для подальшого роз'яснення, його можна ввести внизу сторінки. Завантажуючи зображення, будь ласка, використовуйте інструмент для оптимізації зображень, щоб зробити файл якомога меншим для завантаження. Це покращує час завантаження сторінки та сприяє загальній продуктивності MDN. Ви можете скористатись улюбленим інструментом, якщо він у вас є. В іншому випадку ми пропонуємо TinyPNG, зручний веб-інструмент.

- -

Оприлюднити, скасувати чи продовжити редагування

- -

Коли ви закінчите редагування і будете задоволені своїм попереднім переглядом, ви ви можете опублікувати свою роботу та коментарі, натиснувши зелену кнопку Оприлюднити праворуч від заголовка сторінки або внизу сторінки. Якщо ви хочете продовжувати працювати, натисніть кнопку Оприлюднити та продовжити редагуваннящо публікує ваші зміни, зберігаючи інтерфейс редагування відкритим.

- -

Якщо ви передумали, ви можете скасувати свої зміни, натиснувши червону кнопку Відхилити. Зауважте, що відкидання змін назавжди відкидає їх.

- -

Натискання Enter в полі редагування коментарів еквівалентне натисканню Оприлюднити та продовжити редагування.

- -
-

Якщо ви намагаєтесь зберегти свою сторінку і ваші зміни відхиляються як недійсні, коли ви намагаєтесь зберегти їх, але вміст насправді підходить для MDN, вам слід звернутися на email the MDN admin team, щоб допомогли розмістити ваш контент.

-
- -

Отримання дозволу на створення сторінки

- -

For security reasons, newly-created accounts don't have the ability to create new pages. If you try to do so, you'll see a page instructing you how to go about getting the page created. There are two options:

- - - -

Створення нової сторінки

- -

Once you have page-creation permission, you can start creating new pages.

- -

If you do not know where to put a new article, do not worry about it! Put it anywhere and we will find it and move it to where it belongs or merge it into existing content if that makes the most sense. You also do not need to worry about making it perfect. We have happy helper gnomes that will help make your content clean and luscious.

- -

There are a few ways to create a new page:

- - - -
-
- -

Посилання на відсутню сторінку

- -

As with most wikis, on MDN it is possible to create a link to a page that doesn't yet exist. For example, an author might create a list of all the members of an API, before creating the pages for those members. On MDN, links to non-existent pages are typically displayed in red.

- -

To create a page from a "missing page" link:

- -
    -
  1. Make sure that you are logged into MDN, and have page-creation permission. (If you aren't logged in, clicking a "missing page" link gives a 404 (page not found) error.)
  2. -
  3. Click the "missing page" link. If you have page creation permission, the MDN Editor UI opens, ready for you to create the missing page.
  4. -
  5. Write the content of the page, and save it.
  6. -
- -

Нова сторінка без посилань

- -

To create a new page without linking from another page, enter a unique page name in the URL field of your browser. For example, if you enter:

- -
https://developer.mozilla.org/uk/docs/FooBar
- -

MDN creates a new page with the title "FooBar" and opens the editor so you can add content to the new page. Refer to the Editing an existing page section of this article for how to use the editor mode.

- -

To create a new page without linking from another page:

- -
    -
  1. Make sure that you are logged in, and have page-creation permission.
  2. -
  3. Enter the following in the URL field of your browser.
  4. -
- -
https://developer.mozilla.org/uk/docs/new
- -

MDN creates a new page with a place for a title and opens the editor so you can add content to the new page. Refer to the Editing an existing page section of this article for how to use the editor mode.

- -

Підстаття наявної статті

- -

To create a page that you want to be below an existing page in the page hierarchy:

- -
    -
  1. On the "parent" page, click the Advanced menu (the gear icon in the toolbar), and click New sub-page. An editor view opens for creating a new document.
  2. -
  3. Type a title for the document in the Title field.
  4. -
  5. Change the Slug field if needed (for example, if the title is very long and you want a shorter URL). This field is automatically filled by the editor, by substituting underscores for spaces in the title. In this case, you can change only the last part of the URL of the document.
  6. -
  7. In the TOC field, select the heading levels you want to be automatically displayed in the table of contents for the page, or "No table of contents" if the page doesn't need one.
  8. -
  9. Write content of the page in the editor pane, and save your changes. Refer to the Editing an existing page section of this article for how to use the editor mode.
  10. -
- -

Створення клона наявної сторінки

- -

If there is an existing page whose format you want to use for your new page, you can "clone" that page and then change the content.

- -
    -
  1. On the original page, click the Advanced menu (the gear icon in the toolbar), and click Clone this page. An editor view opens for creating a new document.
  2. -
  3. Change the Title of the page as appropriate for the new content. The Slug field is updated automatically as you change the Title field.
  4. -
  5. If needed, change the path portion of the Slug field, to put the new document in a different part of the document hierarchy. (In most cases, this is not needed, because the cloned page has similar content to the original, and therefore should be located in a similar place.)
  6. -
  7. In the TOC field, select the heading levels you want to be automatically displayed in the table of contents for the page, or "No table of contents" if the page doesn't need one.
  8. -
  9. Write content of the page in the editor pane, and save your changes. Refer to the Editing an existing page section of this article for how to use the editor mode.
  10. -
- -

Посилання з наявної сторінки

- -

This method is a bit of a hybrid. You can create a link on another page, and then click the link you just inserted, to create the new page.

- -
    -
  1. Enter the name of the new page anywhere (that makes sense) in the text of an existing page.
  2. -
  3. Highlight the name and click the Link icon () in the editor's toolbar. The "Update Link" dialog opens, with the highlighted text in the "Link To" field.
  4. -
  5. "/en-US/docs/" is inserted by default at the beginning of the URL field. Enter the name of the page after "/en-US/docs/". (The page name doesn't have to be the same as the link text.)
  6. -
  7. Click OK to create and insert the link.
  8. -
- -

If the page does not already exist, the link is displayed in red. If the page does already exist, the link is displayed in blue. If you want to create a new page but the page title you want is already taken, check first if it makes more sense to help edit and improve the page that is already there. Otherwise, think of a different title for your new page and create a link for it. Refer to the page naming guide for guidelines.

- -

To add content to your new page, click on the red link you just created (after saving and closing the editor). The new page opens in editor mode, so you can start writing. Refer to the Editing an existing page section of this article for how to use the editor mode.

- -

Оновлення вмісту сторінки

- -

MDN's support for KumaScript macros and transclusion of content from one page into another can sometimes be hampered slightly by the need for caching of generated pages for performance reasons. Pages are built from their source, and that output is cached for future requests. From then on, any macros (templates) or transclusions (using the macroPage on that page will not reflect changes made to the macro, the macro's output, or the contents of the transcluded material.

- - - -

Див. також

- - diff --git a/files/uk/mdn/contribute/howto/index.html b/files/uk/mdn/contribute/howto/index.html deleted file mode 100644 index 5bde5d4a0a..0000000000 --- a/files/uk/mdn/contribute/howto/index.html +++ /dev/null @@ -1,13 +0,0 @@ ---- -title: Покрокові путівники -slug: MDN/Contribute/Howto -tags: - - Landing - - MDN Meta -translation_of: MDN/Contribute/Howto ---- -
{{MDNSidebar}}
{{IncludeSubnav("/uk/docs/MDN")}}
- -

Кожна з наведених статей являє собою покроковий путівник для досягнення певної мети пов'язаної із внеском до MDN.

- -

{{LandingPageListSubpages}}

diff --git a/files/uk/mdn/contribute/index.html b/files/uk/mdn/contribute/index.html deleted file mode 100644 index b265149f28..0000000000 --- a/files/uk/mdn/contribute/index.html +++ /dev/null @@ -1,18 +0,0 @@ ---- -title: Внесок до MDN -slug: MDN/Contribute -tags: - - Landing - - MDN Meta - - Путівник -translation_of: MDN/Contribute ---- -
{{MDNSidebar}}
{{IncludeSubnav("/uk/docs/MDN")}}
- -

Ласкаво просимо! Відвідавши цю сторінку, ви зробили перший крок до того, щоб стати учасником MDN!

- -

Наведені тут вказівки охоплюють всі питання щодо участі в творенні MDN, зокрема, настанови зі стилю, посібники з використання нашого редактора та інструментів тощо. Будь ласка, зверніть увагу, що перш ніж редагувати або створювати будь-які сторінки, Ви маєте ознайомитись та погодитись з умовами Mozilla.

- -

Якщо ви раніше не допомагали MDN, зверніться спершу до статті «З чого почати на MDN» — вона допоможе Вам з вибором першого завдання і його виконанням.

- -

{{LandingPageListSubPages()}}

diff --git a/files/uk/mdn/guidelines/index.html b/files/uk/mdn/guidelines/index.html deleted file mode 100644 index d16a0b0be8..0000000000 --- a/files/uk/mdn/guidelines/index.html +++ /dev/null @@ -1,13 +0,0 @@ ---- -title: Путівники -slug: MDN/Guidelines -tags: - - MDN Meta - - Путівник -translation_of: MDN/Guidelines ---- -
{{MDNSidebar}}
{{IncludeSubnav("/uk/docs/MDN")}}
- -

Перелічені тут путівники наводять докладні відомості щодо того, як слід писати й оформлювати документацію MDN, як мають виглядати зразки коду та інший вміст. Наслідуючи їх ви можете бути певні, що ваше викладення буде виразним та легкочитним.

- -

{{LandingPageListSubpages}}

diff --git a/files/uk/mdn/guidelines/writing_style_guide/index.html b/files/uk/mdn/guidelines/writing_style_guide/index.html deleted file mode 100644 index f14340877a..0000000000 --- a/files/uk/mdn/guidelines/writing_style_guide/index.html +++ /dev/null @@ -1,727 +0,0 @@ ---- -title: Настанови зі стилю -slug: MDN/Guidelines/Writing_style_guide -tags: - - MDN Meta - - Style guide - - Настанови зі стилю - - Путівник -translation_of: MDN/Guidelines/Writing_style_guide -original_slug: MDN/Guidelines/Настанови_зі_стилю ---- -
{{MDNSidebar}}
- -
{{IncludeSubnav("/uk/docs/MDN")}}
- -

Щоб зробити викладення документації на MDN Web Docs однорідним, виразним та легкочитним, в цих настановах зазначено, як слід писати, форматувати й упорядковувати текст. Втім, це радше посібник, аніж перелік суворих вимог. Звісно, нас більше цікавить вміст, аніж форма викладення, тож не переймайтесь надмірно докладним вивченням настанов зі стилю. Але й не дивуйтесь, якщо хтось із сумлінних добровольців згодом виправить ваш доробок задля дотримання наведених тут правил.

- -

Мовознавчі настанови цього посібника стосуються здебільшого англійської мови. Для інших мов можна й варто створювати окремі стильові посібники. Їх слід оприлюднювати як підстатті основної сторінки перекладацької команди.

- -

Стандарти стилю, що стосуються вмісту на інших (окрім MDN) сайтах, наведено у Єдиному посібнику зі стилю Mozilla.

- -

Основи

- -

Найкраще місце для початку в будь-якому великому керівництві - це певні базові текстові стандарти, які допомагають дотримуватись сумісності документації. Наступні розділи описуються деякі із цих основ, які допоможуть вам.

- -

Назви сторінок

- -

Назви сторінок використовуються в результатах пошуку, а також для структурування ієрархії сторінок у списку "хлібних крихт" зверху сторінки. Назви сторінок (які відображаються зверху сторінки, а також у результатах пошуку) можуть відрізнятись від "slug" (унікальний ідентифікатор) соторінки, яка є частиною URL адреси після "<locale>/docs/".

- -

Регістр заголовків сторінок та розділів

- -

Заголовки сторінок та заголовки розділів мають починатись з великої літери (використовується лише для першого слова в реченні та власних імен), але не кожне слово:

- - - -

У нас є багато старих сторінок, які було написано до встановлення цього правила. За бажанням ви можете оновити їх, аби вони стали більш читабильними. Поступово ми доберемось до їх редагування.

- -

Вибір заголовків та коротких заголовків.

- -

Унікальний ідентифікатор має бути коротким; коли створюєте новий рівень ієрархії, компонент нового рівня у вигляді "slug" ідентифікатора має складатись із одного-двох слів.

- -

Заголовки сторінок, з іншої сторони, можуть бути такими довгими на скільки це потрібно і мають описувати суть статті.

- -

Створення нових піддерев

- -

Коли вам потрібно додати якісь статті до певної теми чи області обговорення, ви можете зробити це створивши цільову сторінку, після цього додавайте підсторінки для кожної окремої статті. Цільова сторінка має описуватись за допомогою одного або двох абзаців, які розкривають тему чи технологію, потім відобразіть список підсторінок з поясненням до кожної з них. Ви можете автоматизувати вставку сторінок в список, використовуючи макроси, які ми створили.

- -

For example, consider the JavaScript guide, which is structured as follows:

- - - -

Try to avoid putting your article at the top of the hierarchy, which slows the site down and makes search and site navigation less effective.

- -

General article content guidelines

- -

When writing any document, it's important to know how much to say. If you ramble on too long, the article becomes tedious to read and nobody will use it. Getting the amount of coverage right is important for several reasons. Among those reasons: to ensure that the reader finds the information they truly need, and to provide enough quality material for search engines to adequately analyze and rank the article. We'll discuss the former (providing the information the reader may need) here. To learn a little about ensuring that pages are properly classified and ranked by search engines, see the article How to write for SEO on MDN.

- -

The goal is to write pages that include all the information that readers may need without going on too long about it all. We have a few recommendations in this area.

- -

Consider your audience

- -

Keep in mind that these are guidelines. Some of these tips may not apply in every case. Certainly keep your article's audience in mind. An article on advanced network techniques likely doesn't need to go into as much detail about basic networking concepts as the typical article on networking code, for instance.

- -

Provide a useful summary

- -

Make sure the article's summary—that is, the opening paragraph or paragraphs before the first heading—provides enough information for the reader to understand if the article is likely to be covering what they're interested in reading about. In guide or tutorial content, the summary should let the reader know what topics will be covered and what they're already expected to know, if anything. It should mention the technology, technologies, and/or APIs that are being documented or discussed, with links to those, and it should offer hints as to the situations in which the article's contents might be useful.

- -
Example: Too short!
- -

This example of a summary is far too short. It leaves out too much information, such as what it means exactly to "stroke" text, where the text is drawn, and so forth.

- -
-

CanvasRenderingContext2D.strokeText() draws a string.

-
- -
Example: Too long!
- -

Here, we've updated the summary, but now it's far too long. Too much detail is included, and the text gets far too much into other methods and properties. Instead, the summary should focus on the strokeText() method, and should refer to the appropriate guide where the other details are offered.

- -
-

When called, the Canvas 2D API method CanvasRenderingContext2D.strokeText() strokes the characters in the specified string beginning at the coordinates specified, using the current pen color. In the terminology of computer graphics, "stroking" text means to draw the outlines of the glyphs in the string without filling in the contents of each character with color.

- -

The text is drawn using the context's current font as specified in the context's {{domxref("CanvasRenderingContext2D.font", "font")}} property.

- -

The placement of the text relative to the specified coordinates are determined by the context's textAlign, textBaseline, and direction properties. textAlign controls the placement of the string relative to the X coordinate specified; if the value is "center", then the string is drawn starting at x - (stringWidth / 2), placing the specified X-coordinate in the middle of the string. If the value is "left", the string is drawn starting at the specified value of x. And if textAlign is "right", the text is drawn such that it ends at the specified X-coordinate.

- -

(etc etc etc...)

- -

You can, optionally, provide a fourth parameter that lets you specify a maximum width for the string, in pixels. If you provide this parameter, the text is compressed horizontally or scaled (or otherwise adjusted) to fit inside a space that wide when being drawn.

- -

You can call the fillText() method to draw a string's characters as filled with color instead of only drawing the outlines of the characters.

-
- -
Example: Much better!
- -

Here we see a much better overview for the strokeText() method.

- -
-

The {{domxref("CanvasRenderingContext2D")}} method strokeText(), part of the Canvas 2D API, strokes—that is, draws the outlines of—the characters of a specified string, anchored at the position indicated by the given X and Y coordinates. The text is drawn using the context's current {{domxref("CanvasRenderingContext2D.font", "font")}}, and is justified and aligned according to the {{domxref("CanvasRenderingContext2D.textAlign", "textAlign")}}, {{domxref("CanvasRenderingContext2D.textBaseline", "textBaseline")}}, and {{domxref("CanvasRenderingContext2D.direction", "direction")}} properties.

- -

For more details and further examples, see {{SectionOnPage("/uk/docs/Learn/JavaScript/Client-side_web_APIs/Drawing_graphics", "Text")}} in the Learning Area as well as our main article on the subject, Drawing text.

-
- -

Include all relevant examples

- -

More pages should have examples than should not have them. The majority of pages most likely deserve multiple examples, in fact. It's important to ensure that you use examples to clarify what every parameter is used for, and to clarify any edge cases that may exist. You should also use examples to demonstrate solutions for common tasks, and you should use examples to demonstrate solutions to problems that may arise.

- -

Each example should be preceded by text explaining what the example does and anything the reader should know before beginning to read or try out the example.

- -

In addition, each piece of code should include an explanation of how it works. Keep in mind that it may make sense to break up a large piece of code into smaller portions so they can be described individually. The text following each piece of code should explain anything relevant, using an appropriate level of detail. If the code is very simple and doesn't really feature anything directly related to the API being documented, you may only give a quick summary of what it is and why it's there. If the code is intricate, uses the API being documented, or is technically creative, you should provide a more detailed explanation.

- -

When using the live sample system, it's helpful to be aware that all of the {{HTMLElement("pre")}} blocks in the area that contains the sample are concatenated together before running the example, which lets you break any or all of the HTML, CSS, and JavaScript into multiple segments, each optionally with its own descriptions, headings, and so forth. This makes documenting code incredibly powerful and flexible.

- -

Overly-short articles are hard to find

- -

If an article is "thin"—that is, too short—it may not be indexed properly (or at all) by search engines. As a rule of thumb, the article's body text should be at least 250-300 words. Don't artificially inflate a page that simply can't reasonably be made longer than that, but treat this guideline as a target to shoot for as a minimum when possible.

- -

Sections, paragraphs, and newlines

- -

Use heading levels in decreasing order: {{HTMLElement("h2")}} then {{HTMLElement("h3")}} then {{HTMLElement("h4")}}, without skipping levels. H2 is the highest level allowed because H1 is reserved for the page title. If you need more than three or four levels of headers you should consider breaking up the article into several smaller articles with a landing page, linking them together using the {{TemplateLink("Next")}}, {{TemplateLink("Previous")}}, and {{TemplateLink("PreviousNext")}} macros.

- -

The Enter (or Return) key on your keyboard starts a new paragraph. To insert a newline without a space, hold down the Shift key while pressing Enter.

- -

Don't create single subsections — you don't subdivide a topic into one. It's either two subheadings or more or none at all.

- -

Don't have bumping heads, which are headings followed immediately by headings. Aside from looking horrible, it's helpful to readers if every heading has at least a brief intro after it to introduce the subsections beneath.

- -

Lists

- -

Lists should be written in a similar format across all contributions. Correct procedures should include suitable punctuation and sentence structure regardless of the list format. However dependent on the type of list you are writing, you must adjust your format accordingly. Refer to the documentation below to understand the differences of each.

- -

Bulleted Lists

- -

Bulleted lists should be used for grouping purposes to create concise but effective pieces of information. Each new piece of information must start with a '•' to signify a new piece. Bulleted lists must follow standard punctuation usage, pay attention to the use of full stops; they must be included at the end of each sentence just like standard writing practice.

- -

An example of a correctly structured bulleted list:

- -
-

In this example we should include:

- - -
- -

Note how the format remains the same from bullet to bullet. Create a bullet point, state a condition that has relevence to your indented topic and add some pausing punctuation in order to follow up the condition with a concise explanation.

- -

Numbered Lists

- -

Instruction lists must follow suitable numbering and format. It is important to include these attributes as with instructions, being clear is a key priority. Create the list in a similar style to a bulleted list, however numbered or instruction lists can be extensive where necessary, meaning correct punctuation is vital as you will be forming complex sentences.

- -

An example of a correctly structured numbered list:

- -
-

In order for you to structure a correct numbered list you must:

- -

1. Begin with creating an introductory heading to lead into the instructions. This way we can provide the user with context before beginning the instructions.

- -

2. Start creating your instructions, listing your instructions with numbers. This is a standard format of a numbered list that is easily recognizable by the user. Your instructions may be quite extensive, so it is important to write effectively and use correct punctuation where necessary.

- -

3. After you have finished your instructions, close off the numbered list with a brief explanation of the outcome upon completion.

- -

This is an example of writing your closing explanation. We have created a short numbered list which provides instructive steps to produce a numbered list with the correct formatting.

-
- -

Numbered lists are almost exclusive for instructive purposes, so before writing consider your approach based on the context of the information you are trying to relay.

- -

Text formatting and styles

- -

Use the "Formatting Styles" drop-down list to apply predefined styles to selected content.

- -
The "Note" style is used to call out important notes, like this one.
- -
Similarly, the "Warning" style creates warning boxes like this.
- -

Unless specifically instructed to do so, do not use the HTML style attribute to manually style content. If you can't do it using a predefined class, drop into {{IRCLink("mdn")}} and ask for help.

- -

Code sample style and formatting

- -
-

Note: This section deals with the styling/formatting of code as it appears on an MDN article. If you want guidelines on actually writing code examples, see our Code sample guidelines.

-
- -

Tabs and line breaks

- -

Use two spaces per tab in all code examples. Indent the code cleanly, with open-brace ("{") characters on the same line as the statement that opens the block. For example:

- -
if (condition) {
-  /* handle the condition */
-} else {
-  /* handle the "else" case */
-}
-
- -

Long lines shouldn't be allowed to stretch off horizontally to the extent that they require horizontal scrolling to read. Instead, break at natural breaking points. Some examples follow:

- -
if (class.CONDITION || class.OTHER_CONDITION || class.SOME_OTHER_CONDITION
-       || class.YET_ANOTHER_CONDITION ) {
-  /* something */
-}
-
-var toolkitProfileService = Components.classes["@mozilla.org/toolkit/profile-service;1"]
-                           .createInstance(Components.interfaces.nsIToolkitProfileService);
-
- -

Inline code formatting

- -

Use the "Code" button (labeled with two angle brackets "<>") to apply inline code-style formatting to function names, variable names, and method names (this uses the {{HTMLElement("code")}} element). For example, "the frenchText() function".

- -

Method names should be followed by a pair of parentheses: doSomethingUseful(). The parentheses help differentiate methods from other code terms.

- -

Syntax highlighting

- -

Screenshot of the 'Syntax Highlighter' menu.Entire lines (or multiple lines) of code should be formatted using syntax highlighting rather than the {{HTMLElement("code")}} element. Select the appropriate language from the language list button (the one with the two code blocks), as seen in the screenshot to the right. This will insert a preformatted code box with line numbers and syntax highlighting for the chosen language.

- -

The following example shows text with JavaScript formatting:

- -
-
for (var i = 0, j = 9; i <= 9; i++, j--)
-  document.writeln("a[" + i + "][" + j + "]= " + a[i][j]);
-
- -

If no appropriate language is available, use ("No Highlight" in the language menu). This will result in code without syntax highlighting:

- -
x = 42;
- -

Syntax definitions

- -

If you want to insert a syntax definition, you can choose the "Syntax Box" option from the "Styles" drop-down menu in the editor toolbar. This will give the syntax definition a special formatting distinguishing it from normal code.

- -

Blocks not referring to code

- -

There are a few use cases where a <pre> block does not refer to code and doesn't have syntax highlighting nor line numbers. In such cases you should add a <pre> without class. Those cases include things like tree structures:

- -
root/
-
-    folder1/
-        file1
-
-    folder2/
-        file2
-        file3
-
- -

To create preformatted content without syntax highlighting and line numbers click the "pre" button in the toolbar. Then start to type the text.

- -

Styling HTML element references

- -

There are specific rules to follow when writing about HTML elements. These rules produce consistent descriptions of elements and their components. They also ensure correct linking to detailed documentation.

- -
-
Element names
-
Use the {{TemplateLink("HTMLElement")}} macro, which creates a link to the page for that element. For example, writing \{{HTMLElement("title")}} produces "{{HTMLElement("title")}}". If you don't want to create a link, enclose the name in angle brackets and use "Code (inline)" style (e.g., <title>).
-
Attribute names
-
Use bold face.
-
Attribute definitions
-
Use the {{TemplateLink("htmlattrdef")}} macro (e.g., \{{htmlattrdef("type")}}) for the definition term, so that it can be linked to from other pages, then use the {{TemplateLink("htmlattrxref")}} macro (e.g., \{{htmlattrxref("attr","element")}}) to reference attribute definitions.
-
Attribute values
-
Use "Code (inline)" style, and do not use quotation marks around strings, unless needed by the syntax of a code sample. For example: When the type attribute of an <input> element is set to email or tel ...
-
Labeling attributes
-
Use labels like {{HTMLVersionInline(5)}} thoughtfully. For example, use them next to the bold attribute name but not for every occurrence in your body text.
-
- -

Latin abbreviations

- -

In notes and parentheses

- - - -

In running text

- - - -

Meanings and English equivalents of Latin abbreviations

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
AbbrevLatinEnglish
cf.confercompare
e.g.exempli gratiafor example
et al.et aliiand others
etc.et ceteraand so forth, and so on
i.e.id estthat is, in other words
N.B.nota benenote well
P.S.post scriptumpostscript
- -
-

Always consider whether it's truly beneficial to use a Latin abbreviation. Some of these are used so rarely that many readers won't understand the meaning, and others are often confused with one another. And be sure that you use them correctly, if you choose to do so. For example, be careful not to confuse "e.g." with "i.e.", which is a common error.

-
- -

Acronyms and abbreviations

- -

Capitalization and periods

- -

Use full capitals and delete periods in all acronyms and abbreviations, including organizations such as "US" and "UN".

- - - -

Expansion

- -

On the first mention of a term on a page, expand acronyms likely to be unfamiliar to users. When in doubt, expand it, or, better, link it to the article or glossary entry describing the technology.

- - - -

Plurals of acronyms and abbreviations

- -

For plurals of acronyms or abbreviations, add s. Don't use an apostrophe. Ever. Please.

- - - -

"Versus", "vs.", and "v."

- -

The contraction "vs." is preferred.

- - - -

Capitalization

- -

Use standard English capitalization rules in body text, and capitalize "World Wide Web." It is acceptable to use lower case for "web" (used alone or as a modifier) and "internet;" this guideline is a change from a previous version of this guide, so you may find many instances of "Web" and "Internet" on MDN. Feel free to change these as you are making other changes, but editing an article just to change capitalization is not necessary.

- -

Keyboard keys should use sentence-style capitalization, not all-caps capitalization. For example, "Enter" not "ENTER."

- -

Contractions

- -

Our writing style tends to be casual, so you should feel free to use contractions (e.g., "don't", "can't", "shouldn't") if you prefer.

- -

Pluralization

- -

Use English-style plurals, not the Latin- or Greek-influenced forms.

- - - -

Hyphenation

- -

Hyphenate compounds when the last letter of the prefix is a vowel and is the same as the first letter of the root.

- - - -

Gender-neutral language

- -

It is a good idea to use gender-neutral language in any writing where gender is irrelevant to the subject matter, to make the text as inclusive as possible. So for example, if you are talking about the actions of a specific man, usage of he/his would be fine, but if the subject is a person of either gender, he/his isn't appropriate.
-
- Let's take the following example:

- -
-

A confirmation dialog appears, asking the user if he allows the Web page to make use of his Web cam.

-
- -
-

A confirmation dialog appears, asking the user if she allows the Web page to make use of her Web cam.

-
- -

Both versions are gender-specific. To fix this, use gender-neutral pronouns:

- -
-

A confirmation dialog appears, asking the user if they allow the Web page to make use of their Web cam.

-
- -
-

MDN allows the use of this very common syntax (which is controversial among usage authorities), to make up for the lack of a neutral gender in English. The use of the third-person plural as a gender neutral pronoun (that is, using "they," "them", "their," and "theirs") is an accepted practice, commonly known as "singular 'they.'"

-
- -

You can use both genders:

- -
-

A confirmation dialog appears, asking the user if he or she allows the web page to make use of his/her web cam.

-
- -

making the users plural:

- -
-

A confirmation dialog appears, asking the users if they allow the web page to make use of their web cams.

-
- -

The best solution, of course, is to rewrite and eliminate the pronouns:

- -
-

A confirmation dialog appears, requesting the user's permission for web cam access.

-
- -
-

A confirmation dialog box appears, which asks the user for permission to use the web cam.

-
- -

The last way of dealing with the problem is arguably better, as it is not only grammatically more correct but removes some of the complexity associated with dealing with genders across different languages that may have wildly varying gender rules. This solution can make translation easier for both readers and localizers.

- -

Numbers and numerals

- -

Dates

- -

For dates (not including dates in code samples) use the format "January 1, 1990".

- - - -

Alternately, you can use the YYYY/MM/DD format.

- - - -

Decades

- -

For decades, use the format "1990s". Don't use an apostrophe.

- - - -

Plurals of numerals

- -

For plurals of numerals add "s". Don't use an apostrophe.

- - - -

Commas

- -

In running text, use commas only in five-digit and larger numbers.

- - - -

Punctuation

- -

Serial comma

- -

Use the serial comma. The serial (also known as "Oxford") comma is the comma that appears before the conjunction in a series of three or more items.

- - - -
-

This is in contrast to the One Mozilla style guide, which specifies that the serial comma is not to be used. MDN is an exception to this rule.

-
- -

Spelling

- -

For words with variant spellings, always use their American English spelling. In general, use the first entry at Dictionary.com, unless that entry is listed as a variant spelling or as being primarily used in a non-American form of English; for example, if you look up "honour", you find the phrase "Chiefly British" followed by a link to the American standard form, "honor". Do not use variant spellings.

- - - -

Terminology

- -
-
- -

HTML elements

- -

Use "elements" to refer to HTML and XML elements, rather than "tags". In addition, they should almost always be wrapped in "<>", and should be in the {{HTMLElement("code")}} style. When you reference a given element for the first time in a section, you should use the {{TemplateLink("HTMLElement")}} macro to create a link to the documentation for the element (unless you're writing within that element's reference document page).

- - - -

Parameters vs. arguments

- -

The preferred term on MDN is parameters. Please avoid the term "arguments" for consistency if at all possible.

- -

User interface actions

- -

In task sequences, describe user interface actions using the imperative mood. Identify the user interface element by its label and type.

- - - -

Voice

- -

While the active voice is preferred, the passive voice is also acceptable, given the informal feel of our content. Try to be consistent, though.

- -

Wiki markup and usage

- - - -

Links are a large part of what makes a wiki a powerful learning and teaching tool. Below you'll find some basic information, but you can find a complete guide to creating and editing links on MDN in our editor guide.

- -

We encourage you to create appropriate links among articles; they help improve navigation and discoverability of content. You can easily create links not only among pages on MDN (internal links) but also to pages outside MDN (external links).

- -

There are two ways to create links: you explicitly create a link using the Link button in the editor's toolbar—or by pressing Ctrl+K (Cmd-K on the Mac)—or you can use MDN's powerful macro system to generate links automatically or based on an input value.

- -

When deciding what text to use as a link, there are a few guidelines you can follow:

- - - -

URL schemes

- -

For security reasons, you should only create links that use the following schemes:

- - - -

Others may or may not work, but are not supported and will probably be removed by editorial staff.

- -
-

In particular, be sure not to use the about: or chrome:// schemes, as they will not work. Similarly, the javascript: scheme is blocked by most modern browsers, as is jar:.

-
- -

Page tags

- -

Tags provide meta information about a page and/or indicate that a page has specific improvements needed to its content. Every page in the wiki should have tags. You can find details on tagging in our How to properly tag pages guide.

- -

The tagging interface lives at the bottom of a page while you're in edit mode, and looks something like this:

- -

Screenshot of the UX for adding and removing tags on MDN

- -

To add a tag, click in the edit box at the end of the tag list and type the tag name you wish to add. Tags will autocomplete as you type. Press enter (or return) to submit the new tag. Each article may have as many tags as needed. For example, an article about using JavaScript in AJAX programming might have both "JavaScript" and "AJAX" as tags.

- -

To remove a tag, just click the little "X" icon in the tag.

- -

Tagging pages that need work

- -

In addition to using tags to track information about the documentation's quality and content, we also use them to mark articles as needing specific types of work.

- -

Tagging obsolete pages

- -

Use the following tags for pages that are not current:

- - - -

SEO summary

- -

The SEO summary provides a short description of a page. It will be reported as a summary of the article to robots crawling the site, and will then appear in search results for the page. It is also used by macros that automate the construction of landing pages inside MDN itself.

- -

By default, the first paragraph of the page is used as the SEO summary. However, you can override this behavior by marking a section with the "SEO summary" style in the WYSIWYG editor.

- -

Landing pages

- -

Landing pages are pages at the root of a topic area of the site, such as the main CSS or HTML pages. They have a standard format that consists of three areas:

- -
    -
  1. A brief (typically one paragraph) overview of what the technology is and how it's used. See {{anch("Writing a landing page overview")}} for tips.
  2. -
  3. A two-column list of links with appropriate headings. See {{anch("Creating a page link list")}} for guidelines.
  4. -
  5. An optional "Browser compatibility" section at the bottom of the page.
  6. -
- - - -

The link list section of an MDN landing page consists of two columns. These are created using the following HTML:

- -
<div class="row topicpage-table">
-  <div class="section">
-    ... left column contents ...
-  </div>
-  <div class="section">
-    ... right column contents ...
-  </div>
-</div>
- -

The left column should be a list of articles, with an <h2> header at the top of the left column explaining that it's a list of articles about the topic (e.g., "Documentation and tutorials about foo"); this header should use the CSS class "Documentation". Below that is a <dl> list of articles with each article's link in a <dt> block and a brief one-or-two sentence summary of the article in the corresponding <dd> block.

- -

The right column should contain one or more of the following sections, in order:

- -
-
Getting help from the community
-
This should provide information on Matrix chat rooms and mailing lists available on the topic. The heading should use the class "Community".
-
Tools
-
A list of tools the user can look at to help with the use of the technology described in this section of MDN. The heading should use the class "Tools".
-
Related topics
-
A list of links to landing pages for other, related, technologies of relevance. The heading should use the class "Related_Topics".
-
- -

<<<finish this once we finalize the landing page standards>>>

- -

Using, inserting images

- -

It's sometimes helpful to provide an image in an article you create or modify, especially if the article is very technical. To include an image:

- -
    -
  1. Attach the desired image file to the article (at the bottom of every article in edit mode)
  2. -
  3. Create an image in the WYSIWYG editor
  4. -
  5. In the WYSIWYG editor, in the drop-down list of attachments, select the newly created attachment that is your image
  6. -
  7. Press OK.
  8. -
- -

Other references

- -

Preferred style guides

- -

If you have questions about usage and style not covered here, we recommend referring to the Economist style guide or, failing that, the Chicago Manual of Style.

- -

Preferred dictionary

- -

For questions of spelling, please refer to Dictionary.com. The spelling checker for this site uses American English. Please do not use variant spellings (e.g., use color rather than colour).

- -

We will be expanding the guide over time, so if you have specific questions that aren't covered in this document, please send them to the MDC mailing list or project lead so we know what should be added.

- -

MDN-specific

- - - -

Лексика, граматика й правопис

- -

If you're interested in improving your writing and editing skills, you may find the following resources to be helpful.

- - diff --git a/files/uk/mdn/index.html b/files/uk/mdn/index.html deleted file mode 100644 index 0381c1bf31..0000000000 --- a/files/uk/mdn/index.html +++ /dev/null @@ -1,28 +0,0 @@ ---- -title: Проект MDN -slug: MDN -tags: - - Landing - - MDN Meta -translation_of: MDN ---- -
{{MDNSidebar}}
- -

Веб-документація MDN — це вікі, в якій ми описуємо відкритий Інтернет, технології Mozilla, Firefox OS та інші теми, присвячені веб-розробці. Будь-хто може взяти участь у створенні та редагуванні вмісту вікі. Геть не обов'язково бути програмістом або мати досконалі знання про описувані технології; є безліч різних завдань, від простих (коректура та виправлення помилок) до складних (написання документації з API).

- -

Мета проекту веб-документації MDN — надати розробникам інформацію необхідну для полегшення створення проектів на веб-платформі. Ми запрошуємо вас допомогти нам!

- -

Нам потрібна ваша допомога! Це легко. Вам не потрібно просити дозволу чи боятися зробити помилку. Проте, ознайомтеся зі спільнотою MDN; ми тут, щоб допомогти вам! Наведена нижче інформація допоможе вам розпочати.

- - diff --git a/files/uk/mdn/structures/index.html b/files/uk/mdn/structures/index.html deleted file mode 100644 index 021aba74ea..0000000000 --- a/files/uk/mdn/structures/index.html +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: Документові структури -slug: MDN/Structures -tags: - - Landing - - MDN Meta - - Structures -translation_of: MDN/Structures ---- -
{{MDNSidebar}}
{{IncludeSubnav("/uk/docs/MDN")}}
- -

На сторінках MDN можна знайти чимало різних повторюваних структур, що призначені для послідовного й упорядкованого викладення інформації у статтях MDN. Тут наведено статті, що описують ці структури, тож ви, як автор MDN, можете їх впізнавати, вживати й змінювати відповідним чином для документів, які ви створюєте, редагуєте чи перекладаєте.

- -

{{LandingPageListSubPages()}}

diff --git a/files/uk/mdn/structures/macros/commonly-used_macros/index.html b/files/uk/mdn/structures/macros/commonly-used_macros/index.html deleted file mode 100644 index 1a9ebb10c0..0000000000 --- a/files/uk/mdn/structures/macros/commonly-used_macros/index.html +++ /dev/null @@ -1,218 +0,0 @@ ---- -title: Загальновживані шаблони -slug: MDN/Structures/Macros/Commonly-used_macros -tags: - - Structures - - Довідка - - Макрос -translation_of: MDN/Structures/Macros/Commonly-used_macros -original_slug: MDN/Structures/Шаблони/Загальновживані_шаблони ---- -
{{MDNSidebar}}
- -
- -

На цій сторінці подано багато макросів загального призначення, які створені для використання на платформі MDN. Інформацію про використання цих макросів дивіться в розділі Використання макросів, а також Використання посилань макросів. Подивіться Інші макроси для інформації про макроси, які рідко використовуються, використовуються тільки в особливих контекстах або важаються застарілими. Також є повний список всіх макросів для MDN

- -

Див. також CSS посібник стилів для стилів, які можуть бути доступні для вашого використання.

- -

Посилання

- -

Створення єдиного гіперпосилання

- - - - - -

Посилання на сторінки в довіднику

- -

Існують різноманітні макроси для з'єднання зі сторінками в певних довідкових областях MDN.

- - - -

Посилання на помилки і IRC

- - - -

Навігаційні інструменти для багатосторінкових довідників

- -

{{TemplateLink("Previous")}}, {{TemplateLink("Next")}}, або {{TemplateLink("PreviousNext")}} забезпечує управління навігацією для елементів, що входять в послідовність. Для односпрямованих шаблонів єдиним необхідним параметром є розташування wiki попередньої і наступної статті в послідовності. Для {{TemplateLink("PreviousNext")}}, два параметра, які потрібні, - це розташування відповідних статей в wiki-каталозі. Перший параметр відноситься до попередньої статті, а другий - до наступної.

- -

Зразки коду

- -

Зразки наживо

- - - -

Файли з прикріпленими прикладами

- - - -

Створення бічної панелі

- -

Існують шаблони практично для кожної великої бібліотеки сторінок. Зазвичай вони посилаються на головну сторінку довідника / керівництва / підручника (це часто необхідно, тому що наші хлібні крихти іноді не можуть цього зробити) і поміщають статтю в відповідну категорію.

- - - -

Загальне форматування

- -

Вбудовані індикатори для документації API

- -

{{TemplateLink("optional_inline")}} та {{TemplateLink("ReadOnlyInline")}} використовуються в документації API, зазвичай при описі списку властивостей об'єкта або параметрів функції.

- -

Використання: \{{optional_inline()}} або \{{ReadOnlyInline()}}. Наприклад: 

- -
-
isCustomObject {{ReadOnlyInline()}}
-
Вказує, якщо true, що об'єкт є призначеним для користувача.
-
parameterX {{ optional_inline() }}
-
Бла-бла-бла...
-
- -

Позначки про статус та сумісність

- -

Вбудовані індикатори без додаткових параметрів

- -

Нетипові

- -

{{TemplateLink("non-standard_inline")}} вставляє в рядок мітку, яка вказує на те, що API ні стандартизований і не перебуває на стандартній платформі.

- -
Синтаксис
- -

\{{non-standard_inline}}

- -
Приклади
- - - -

Експериментальний

- -

{{TemplateLink("experimental_inline")}} вставляє позначку в рядку, що вказує на те, що API застосовується недостатньо широко і може змінитися в майбутньому.

- -
Синтаксис
- -

\{{Experimental_Inline}}

- -
Приклади
- - - -

Вбудовані індикатори, що підтримують вказівку технології

- -

У таких макросах параметром (при зазначенні) повинен бути будь-який з рядків "html", "js", "css" або "gecko" з подальшим номером версії.

- -

Вилучені елементи

- -

{{TemplateLink("deprecated_inline")}} поміщає в рядок маркування вилучений, щоб запобігти використанню офіційно застарілого API. Зауваження: "Deprecated" означає, що елемент більше не повинен використовуватися, але все одно повинен функціонувати. Якщо ви маєте на увазі, що він більше не працює, використовуйте термін "obsolete."

- -

Не використовуйте параметр в будь-якій незалежній від браузера області (HTML, API, JS, CSS, ...).

- -
Синтаксис
- -

\{{deprecated_inline}} or \{{deprecated_inline("gecko5")}}

- -
Приклади
- - - -

Застарілі елементи

- -

{{TemplateLink("obsolete_inline")}} поміщає в рядок маркування застарілий, щоб запобігти використанню, наприклад, функції, методу чи властивості, які офіційно застаріли.

- -

Не використовуйте параметр в будь-якій незалежній від браузера області (HTML, API, JS, CSS, ...).

- -
Синтаксис
- -

\{{obsolete_inline}} or \{{obsolete_inline("js1.8.5")}}

- -
Приклади
- - - -

Шаблонні значки

- -

Ці макроси в переважно застосовуються на WebAPI сторінках. Перегляньте {{anch("Creating new badges")}} для інформації про створення нового значка.

- -

Індикатори заголовків сторінок або розділів

- -

Ці шаблони мають ту ж семантику, що і їх вбудовані аналоги, описані вище. Шаблони повинні бути розміщені безпосередньо під заголовком головної сторінки або під навігатором по хлібним крихтам, якщо такий доступен, на сторінці лінків. Вони також можуть бути використані для розмітки розділів на сторінці.

- - - -

Зазначення того, що функція доступна у web workers

- -

The {{TemplateLink("AvailableInWorkers")}} макрос вставляє відповідне поле для приміток, що вказує на те, що функція є доступною у Web worker контекст.

- -
    -
- -
    -
diff --git a/files/uk/mdn/structures/macros/index.html b/files/uk/mdn/structures/macros/index.html deleted file mode 100644 index 73ae20c1c9..0000000000 --- a/files/uk/mdn/structures/macros/index.html +++ /dev/null @@ -1,47 +0,0 @@ ---- -title: Шаблони -slug: MDN/Structures/Macros -tags: - - Kuma - - KumaScript - - MDN Meta - - Structures - - Путівник -translation_of: MDN/Structures/Macros -original_slug: MDN/Structures/Шаблони ---- -
{{MDNSidebar}}

Платформа Kuma, що на ній працює MDN, має потужний механізм шаблонів (макросів), KumaScript, який уможливлює автоматизацію чималої кількості речей. Ця сторінка надає інформацію про вжиток шаблонів MDN всередині статей.

- -

Путівник з KumaScript пропонує поглиблені знання з ужитку шаблонів на MDN, тож ця стаття є радше оглядовою.

- -

Як працюють шаблони

- -

Шаблони MDN написані мовою JavaScript та виконуються у серверному середовищі Node.js. Задля уможливлення взаємодії шаблонів із вікі-платформою та її вмістом ми створили низку бібліотек, що надають відповідні можливості та служби. Як хочете дізнатись більше, зверніться до Путівника з KumaScript.

- -

Вжиток шаблонів

- -

Власне для того, аби використати шаблон, ви просто оточуєте його ім'я разом із параметрами в круглих дужках (якщо є) парою подвійних фігурних дужок:

- -
\{{macroname(перелік-параметрів)}}
- -

Кілька зауважень щодо викликів шаблонів:

- - - -

Для шаблонів діє окремий кеш: для кожної множини вхідних даних (вказаних параметрів та значень з середовища, як-от адреса сторінки, де ужито шаблон) результат одноразово обчислюється та зберігається для подальшого використання. Отже шаблон насправді викликається лише тоді, коли змінюються вхідні дані.

- -
-

Заувага: Ви можете здійснити примусове обчислення всіх шаблонів на сторінці, перезавантаживши сторінку у веб-переглядачі зі скиданням кешів (зазвичай Ctrl + F5 або Shift + F5).

-
- -

Шаблони можуть бути як простими (наприклад, вставка великого шматка тексту чи залучення вмісту з іншої частини MDN), так і вельми складними (як-от пошук по різних частинах сайту й побудова цілого покажчика за знайденим вмістом із належним оформленням та додаванням посилань).

- -

Про найпоширеніші шаблони ви можете довідатись на сторінці Загальновживані шаблони. Також є і повний їх перелік. Багато шаблонів має вбудовану документацію (коментарі у коді на початку файлу).

- -

{{EditorGuideQuicklinks}}

diff --git a/files/uk/mdn/tools/index.html b/files/uk/mdn/tools/index.html deleted file mode 100644 index 9030b49d4d..0000000000 --- a/files/uk/mdn/tools/index.html +++ /dev/null @@ -1,17 +0,0 @@ ---- -title: MDN tools -slug: MDN/Tools -tags: - - Landing - - MDN Meta - - NeedsTranslation - - TopicStub -translation_of: MDN/Tools ---- -
{{MDNSidebar}}
- -
{{IncludeSubnav("/en-US/docs/MDN")}}
- -

MDN offers a number of features that make it easier to track progress, manage content, and keep up with the latest changes to the site.

- -

{{LandingPageListSubpages}}

diff --git a/files/uk/mdn/tools/kumascript/index.html b/files/uk/mdn/tools/kumascript/index.html deleted file mode 100644 index 5141e040b4..0000000000 --- a/files/uk/mdn/tools/kumascript/index.html +++ /dev/null @@ -1,500 +0,0 @@ ---- -title: KumaScript -slug: MDN/Tools/KumaScript -tags: - - Guide - - Kuma - - KumaScript - - MDN Meta - - NeedsContent - - NeedsTranslation - - Site-wide - - Tools - - TopicStub -translation_of: MDN/Tools/KumaScript ---- -
{{MDNSidebar}}

Overview

- -

On the Kuma platform that powers MDN, the template system for automating aspects of content on the wiki is called KumaScript. KumaScript is powered by server-side JavaScript, implemented using Node.js. This article provides basic information on how to use KumaScript.

- -

For a detailed overview and Q&A of KumaScript, watch the MDN dev team's KumaScript Fireside Chat (the meeting starts at 10 minutes into the video). KumaScript replaced DekiScript, which was the template language for MindTouch, the previous platform used by MDN.

- -

What is KumaScript?

- - - -

What KumaScript is not

- - - -

Basics

- -

KumaScript is used on MDN in embedded JavaScript templates. These templates can be invoked in document content by any MDN author, through the use of macros.

- -

A script in KumaScript is a template, and each template is a file in the macros directory of the KumaScript repository on Github. A  template looks like this:

- -
<% for (var i = 0; i < $0; i++) { %>
-Hello #<%= i %>
-<% } %>
- -

Invoking a template is done with a macro, which can be used anywhere in any wiki content. A macro looks like this:

- -
\{{ hello("3") }}
- -

The output of the macro looks like this:

- -
Hello #0
-Hello #1
-Hello #2
- -

Macro syntax

- -

KumaScript templates are invoked in document content with macros, like this:

- -
\{{ templateName("arg0", "arg1", ..., "argN") }}
-
- -

Macro syntax consists of these rules:

- - - -

Using JSON as a macro parameter

- -

As a semi-experimental feature (not guaranteed to work), you can supply a JSON object for the first and only parameter, like so:

- -
\{{ templateName({ "Alpha":"one", "Beta":["a","b","c"], "Foo":"http:\/\/mozilla.org\/" }) }}
-
- -

The data from this macro is available in template code as an object in the $0 argument (e.g., $0.Alpha, $0.Beta, $0.Foo). This also allows you to express complex data structures in macro parameters that are hard or impossible to do with a simple list of parameters.

- -

Note that this parameter style is very picky — it must adhere to JSON syntax exactly, which has some requirements about escaping characters that are easy to miss (e.g., all forward slashes are escaped). When in doubt, try running your JSON through a validator.

- -

How to write "\{{" in text

- -

Since the character sequence "\{{" is used to indicate the start of a macro, this can be troublesome if you actually just want to use "\{{" and "}}" in a page. It will probably produce DocumentParsingError messages.

- -

In this case, you can escape the first brace with a backslash, like so: \\{

- -

Template syntax

- -

Each KumaScript template is a file under the macros directory of KumaScript. You create and edit these files as you would the files of any open-source project on GitHub (see the KumaScript README for more information).

- -

KumaScript templates are processed by an embedded JavaScript template engine with a few simple rules:

- - - -

Tips

- -

You can see a list of macros and how they are used on MDN on the macros dashboard.

- -

Advanced Features

- -

Beyond the basics, the KumaScript system offers some advanced features.

- -

Environment variables

- -

When the wiki makes a call to the KumaScript service, it passes along some context on the current document that KumaScript makes available to templates as variables:

- -
-
env.path
-
The path to the current wiki document
-
env.url
-
The full URL to the current wiki document
-
env.id
-
A short, unique ID for the current wiki document
-
env.files
-
An array of the files attached to the current wiki document; each object in the array is as described under {{ anch("File objects") }} below
-
env.review_tags
-
An array of the review tags on the article ("technical", "editorial", etc.)
-
env.locale
-
The locale of the current wiki document
-
env.title
-
The title of the current wiki document
-
env.slug
-
The URL slug of the current wiki document
-
env.tags
-
An array list of tag names for the current wiki document
-
env.modified
-
Last modified timestamp for the current wiki document
-
env.cache_control
-
Cache-Control header sent in the request for the current wiki document, useful in deciding whether to invalidate caches
-
- -

File objects

- -

Each file object has the following fields:

- -
-
title
-
The attachment's title
-
description
-
A textual description of the current revision of the file
-
filename
-
The file's name
-
size
-
The size of the file in bytes
-
author
-
The username of the person who uploaded the file
-
mime
-
The MIME type of the file
-
url
-
The URL at which the file can be found
-
- -

Working with tag lists

- -

The env.tags and env.review_tags variables return arrays of tags. You can work with these in many ways, of course, but here are a couple of suggestions.

- -
Looking to see if a specific tag is set
- -

You can look to see if a specific tag exists on a page like this:

- -
if (env.tags.indexOf("tag") != −1) {
-  // The page has the tag "tag"
-}
-
- -
Iterating over all the tags on a page
- -

You can also iterate over all the tags on a page, like this:

- -
env.tag.forEach(function(tag) {
-  // do whatever you need to do, such as:
-  if (tag.indexOf("a") == 0) {
-    // this tag starts with "a" - woohoo!
-  }
-});
- -

APIs and Modules

- -

KumaScript offers some built-in methods and APIs for KumaScript macros.  Macros can also use module.exports to export new API methods.

- -

API changes require updating the KumaScript engine or macros via a pull request to the KumaScript repository.

- -

Built-in methods

- -

This manually-maintained documentation is likely to fall out of date with the code. With that in mind, you can always check out the latest state of built-in APIs in the KumaScript source. But here is a selection of useful methods exposed to templates:

- -
-
md5(string)
-
Returns an MD5 hex digest of the given string.
-
template("name", ["arg0", "arg1", ..., "argN"])
-
Executes and returns the result of the named template with the given list of parameters.
-
Example: <%- template("warning", ["foo", "bar", "baz"]) %>.
-
Example using the domxref macro: <%- template("domxref", ["Event.bubbles", "bubbles"]) %>.
-
This is a JavaScript function. So, if one of the parameters is an arg variable like $2, do not put it in quotes. Like this: <%- template("warning", [$1, $2, "baz"]) %>. If you need to call another template from within a block of code, do not use <% ... %>. Example: myvar = "<li>" + template("LXRSearch", ["ident", "i", $1]) + "</li>";
-
require(name)
-
Loads another template as a module; any output is ignored. Anything assigned to module.exports in the template is returned.
-
Used in templates like so: <% var my_module = require('MyModule'); %>.
-
cacheFn(key, timeout, function_to_cache)
-
Using the given key and cache entry lifetime, cache the results of the given function. Honors the value of env.cache_control to invalidate cache on no-cache, which can be sent by a logged-in user hitting shift-refresh.
-
request
-
Access to mikeal/request, a library for making HTTP requests. Using this module in KumaScript templates is not yet very friendly, so you may want to wrap usage in module APIs that simplify things.
-
log.debug(string)
-
Outputs a debug message into the script log on the page (i.e. the big red box that usually displays errors).
-
- -

Built-in API modules

- -

There's only one API built in at the moment, in the kuma namespace. You can see the most up to date list of methods under kuma from the KumaScript source code, but here are a few:

- -
-
kuma.inspect(object)
-
Renders any JS object as a string, handy for use with log.debug(). See also: node.js util.inspect().
-
- -
-
kuma.htmlEscape(string)
-
Escapes the characters &, <, >, " to &amp, &lt;, &gt;, &quot;, respectively.
-
kuma.url
-
See also: node.js url module.
-
kuma.fetchFeed(url)
-
Fetch an RSS feed and parse it into a JS object. See also: InsertFeedLinkList
-
- -

Creating modules

- -

Using the built-in require() method, you can load a template as a module to share common variables and methods between templates. A module can be defined in a template like this:

- -
<%
-module.exports = {
-    add: function (a, b) {
-        return a + b;
-    }
-}
-%>
-
- -

Assuming this template is saved under https://github.com/mdn/kumascript/tree/master/macros as MathLib.ejs, you can use it in another template like so:

- -
<%
-var math_lib = require("MathLib");
-%>
-The result of 2 + 2 = <%= math_lib.add(2, 2) %>
-
- -

And, the output of this template will be:

- -
The result of 2 + 2 = 4
-
- -

Auto-loaded modules

- -

There are a set of modules editable as wiki templates that are automatically loaded and made available to every template. This set is defined in the configuration file for the KumaScript service - any changes to this requires an IT bug to edit configuration and a restart of the service.

- -

For the most part, these attempt to provide stand-ins for legacy DekiScript features to ease template migration. But, going forward, these can be used to share common variables and methods between templates:

- - - -

Note: You might notice that the DekiScript modules use a built-in method named buildAPI(), like so:

- -
<% module.exports = buildAPI({
-    StartsWith: function (str, sub_str) {
-        return (''+str).indexOf(sub_str) === 0;
-    }
-}); %>
-
- -

The reason for this is because DekiScript is case-insensitive when it comes to references to API methods, whereas JavaScript is strict about uppercase and lowercase in references. So, buildAPI() is a hack to try to cover common case variations in DekiScript calls found in legacy templates.

- -
-

With that in mind, please do not use buildAPI() in new modules.

-
- -

Tips and caveats

- -

Debugging

- -

A useful tip when debugging. You can use the log.debug() method to output text to the scripting messages area at the top of the page that's running your template. Note that you need to be really sure to remove these when you're done debugging, as they're visible to all users! To use it, just do something like this:

- -
<%- log.debug("Some text goes here"); %>
-
- -

You can, of course, create more complex output using script code if it's helpful.

- -

Caching

- -

KumaScript templates are heavily cached to improve performance. For the most part, this works great to serve up content that doesn't change very often. But, as a logged-in user, you have two options to force a page to be regenerated, in case you notice issues with scripting:

- - - -

Використання пошуку за ключовими словами задля відкриття сторінок шаблонів

- -

When using templates, it's common to open the template's code in a browser window to review the comments at the top, which are used to document the template, its parameters, and how to use it properly. To quickly access templates, you can create a Firefox search keyword, which gives you a shortcut you can type in the URL box to get to a template more easily.

- -

To create a search keyword, open the bookmarks window by choosing "Show all bookmarks" in the Bookmarks menu, or by pressing Control-Shift-B (Command-Shift-B on Mac). Then from the utility ("Gear") menu in the Library window that appears, choose "New Bookmark...".

- -

This causes the bookmark editing dialog to appear. Fill that out as follows:

- -
-
Name
-
A suitable name for your search keyword; "Open MDN Template" is a good one.
-
Location
-
https://github.com/mdn/kumascript/blob/master/macros/%s
-
Tags {{optional_inline}}
-
A list of tags used to organize your bookmarks; these are entirely optional and what (if any) tags you use is up to you.
-
Keyword
-
The shortcut text you wish to use to access the template. Ideally, this should be something short and quick to type, such as simply "t" or "mdnt".
-
Description {{optional_inline}}
-
A suitable description explaining what the search keyword does.
-
- -

The resulting dialog looks something like this:

- -

- -

Then click the "Add" button to save your new search keyword. From then on, typing your keyword, then a space, then the name of a macro will open that macro in your current tab. So if you used "t" as the keyword, typing t ListSubpages will show you the page at {{TemplateLink("ListSubpages")}}.

- -

Cookbook

- -

This section will list examples of common patterns for templates used on MDN, including samples of legacy DekiScript templates and their new KumaScript equivalents.

- -

Force templates used on a page to be reloaded

- -

It bears repeating: To force templates used on a page to be reloaded after editing, hit Shift-Reload. Just using Reload by itself will cause the page contents to be regenerated, but using cached templates and included content. A Shift-Reload is necessary to invalidate caches beyond just the content of the page itself.

- -

Recovering from "Unknown Error"

- -

Sometimes, you'll see a scripting message like this when you load a page:

- -
Kumascript service failed unexpectedly: <class 'httplib.BadStatusLine'>
- -

This is probably a temporary failure of the KumaScript service. If you Refresh the page, the error may disappear. If that doesn't work, try a Shift-Refresh. If, after a few tries, the error persists - file an IT bug for Mozilla Developer Network to ask for an investigation.

- -

Broken wiki.languages() macros

- -

On some pages, you'll see a scripting error like this:

- -
Syntax error at line 436, column 461: Expected valid JSON object as the parameter of the preceding macro but...
-
- -

If you edit the page, you'll probably see a macro like this at the bottom of the page:

- -
\{{ wiki.languages({ "zh-tw": "zh_tw/Core_JavaScript_1.5_教學/JavaScript_概要", ... }) }}
-
- -

To fix the problem, just delete the macro. Or, replace the curly braces on either side with HTML comments <!-- --> to preserve the information, like so:

- -
<!-- wiki.languages({ "zh-tw": "zh_tw/Core_JavaScript_1.5_教學/JavaScript_概要", ... }) -->
-
- -

Because Kuma supports localization differently, these macros aren't actually needed any more. But, they've been left intact in case we need to revisit the relationships between localized pages. Unfortunately, it seems like migration has failed to convert some of them properly.

- -

Finding the Current Page's Language

- -

In KumaScript, the locale of the current document is exposed as an environment variable:

- -
var lang = env.locale;
-
- -

The env.locale variable should be reliable and defined for every document.

- -

Reading the contents of a page attachment

- -

You can read the contents of an attached file by using the mdn.getFileContent() function, like this:

- -
<%
-  var contents = mdn.getFileContent(fileUrl);
-  ... do stuff with the contents ...
-%>
-
- -

or

- -
<%-mdn.getFileContent(fileObject)%>
-
- -

In other words, you may specify either the URL of the file to read or as a file object. The file objects for a page can be accessed through the array env.files. So, for example, to embed the contents of the first file attached to the article, you can do this:

- -
<%-mdn.getFileContent(env.files[0])%>
-
- -
Note: You probably don't want to try to embed the contents of a non-text file this way, as the raw contents would be injected as text. This is meant to let you access the contents of text attachments.
- -

If the file isn't found, an empty string is returned. There is currently no way to tell the difference between an empty file and a nonexistent one. But if you're putting empty files on the wiki, you're doing it wrong.

- -

Localizing template content

- -

Templates are not translated like wiki pages, rather any single template might be used for any number of locales.

- -

So the main way to output content tailored to the current document locale is to pivot on the value of env.locale. There are many ways to do this, but a few patterns are common in the conversion of legacy DekiScript templates:

- -

If/else blocks in KumaScript

- -

The KumaScript equivalent of this can be achieved with simple if/else blocks, like so:

- -
<% if ("fr" == env.locale) { %>
-<%- template("CSSRef") %> « <a title="Référence_CSS/Extensions_Mozilla" href="/fr/docs/Référence_CSS/Extensions_Mozilla">Référence CSS:Extensions Mozilla</a>
-<% } else if ("ja" == env.locale) { %>
-<%- template("CSSRef") %> « <a title="CSS_Reference/Mozilla_Extensions" href="/ja/docs/CSS_Reference/Mozilla_Extensions">CSS リファレンス:Mozilla 拡張仕様</a>
-<% } else if ("pl" == env.locale) { %>
-<%- template("CSSRef") %> « <a title="Dokumentacja_CSS/Rozszerzenia_Mozilli" href="/pl/docs/Dokumentacja_CSS/Rozszerzenia_Mozilli">Dokumentacja CSS:Rozszerzenia Mozilli</a>
-<% } else if ("de" == env.locale) { %>
-<%- template("CSSRef") %> « <a title="CSS_Referenz/Mozilla_CSS_Erweiterungen" href="/de/docs/CSS_Referenz/Mozilla_CSS_Erweiterungen">CSS Referenz: Mozilla Erweiterungen</a>
-<% } else { %>
-<%- template("CSSRef") %> « <a title="CSS_Reference/Mozilla_Extensions" href="/en-US/docs/CSS_Reference/Mozilla_Extensions">CSS Reference:Mozilla Extensions</a>
-<% } %>
-
- -

Depending on what text editor is your favorite, you may be able to copy & paste from the browser-based editor and attack this pattern with a series of search/replace regexes to get you most of the way there.

- -

My favorite editor is MacVim, and a series of regexes like this does the bulk of the work with just a little manual clean up following:

- -
%s#<span#^M<span#g
-%s#<span lang="\(.*\)" .*>#<% } else if ("\1" == env.locale) { %>#g
-%s#<span class="script">template.Cssxref(#<%- template("Cssxref", [#
-%s#)</span> </span>#]) %>
-
- -

Your mileage may vary, and patterns change slightly from template to template. That's why the migration script was unable to just handle this automatically, after all.

- -

String variables and switch

- -

Rather than switch between full chunks of markup, you can define a set of strings, switch them based on locale, and then use them to fill in placeholders in a single chunk of markup:

- -
<%
-var s_title = 'Firefox for Developers';
-switch (env.locale) {
-    case 'de':
-        s_title = "Firefox für Entwickler";
-        break;
-    case 'fr':
-        s_title = "Firefox pour les développeurs";
-        break;
-    case 'es':
-        s_title = "Firefox para desarrolladores";
-        break;
-};
-%>
-<span class="title"><%= s_title %></span>
-
- -

Use mdn.localString()

- -

A recent addition to the MDN:Common module is mdn.localString(), used like this:

- -
<%
-var s_title = mdn.localString({
-  "en-US": "Firefox for Developers",
-  "de": "Firefox für Entwickler",
-  "es": "Firefox para desarrolladores"
-});
-%>
-<span class="title"><%= s_title %></span>
-
- -

This is more concise than the switch statement, and may be a better choice where a single string is concerned. However, if many strings need to be translated (e.g., as in CSSRef), a switch statement might help keep all the strings grouped by locale and more easily translated that way.

- -

When the object does not have the appropriate locale, the value of "en-US" is used as the initial value.

- -

See also

- - diff --git a/files/uk/mdn/tools/kumascript/troubleshooting/index.html b/files/uk/mdn/tools/kumascript/troubleshooting/index.html deleted file mode 100644 index 2764ae5e87..0000000000 --- a/files/uk/mdn/tools/kumascript/troubleshooting/index.html +++ /dev/null @@ -1,62 +0,0 @@ ---- -title: Усунення помилок KumaScript -slug: MDN/Tools/KumaScript/Troubleshooting -tags: - - KumaScript - - MDN Meta - - Tools - - Помилки - - Путівник -translation_of: MDN/Tools/KumaScript/Troubleshooting -original_slug: MDN/Tools/KumaScript/Усунення_помилок_KumaScript ---- -
{{MDNSidebar}}
-

Помилки KumaScript, ці моторошні червоні прямокутники, що часом муляють око на сторінках, можуть відлякувати деяких читачів. Але, на щастя, кожен, хто має облікового записа MDN, може відредагувати статтю й виправити такі помилки. Якщо сторінка містить помилки, вона одразу потрапляє у перелік документів з помилками. Редактори сайту постійно переглядають той перелік й виправляють помилки. Ця сторінка наводить чотири різновиди помилок KumaScript та деякі можливі кроки для їх усунення.

-
- -

Помилка розбору документа (DocumentParsingError)

- -

Помилка DocumentParsingError трапляється тоді, коли в KumaScript виникає проблема з розбором самого документа. Зазвичай це синтаксична помилка в шаблоні.

- -

Слід перевірити:

- -
-
Ужиток фігурних дужок там, де не здійснюється виклик шаблону;
-
Якщо вам в документі потрібна фігурна дужка, але це не виклик шаблону, можна її заекранувати за допомогою \ ось так: \\{.
-
Ужиток особливих символів у параметрі шаблону;
-
Якщо вам потрібен символ " або \ всередині параметра шаблону, його необхідно заекранувати за допомогою \ ось так: \".
-
Відсутність ком між параметрами шаблону;
-
Параметри шаблону мають бути відокремлені одне від одного комою ось так: \{\{anch("top", "Нагору")}}.
-
Використання теґів HTML всередині шаблону;
-
Застосування стилів до шаблону може зламати його. Наприклад, кінцевий теґ </code> може виявитися всередині породженого шаблоном вмісту. Перевірте код сторінки, щоб це з'ясувати, та видаліть непотрібне оформлення.
-
- - - -

Помилка завантаження шаблону (TemplateLoadingError)

- -

Помилка TemplateLoadingError трапляється тоді, коли в KumaScript виникає проблема з пошуком відповідного шаблону за іменем.

- -

Слід перевірити:

- -
-
Помилково написане ім'я або ужиток перейменованого шаблону.
-
Повний перелік наявних шаблонів ви можете знайти у репозиторії на GitHub.
-
- -
-

Порада: Ви можете зробити пошук шаблонів швидшим й зручнішим, скориставшись механізмом search keyword у Firefox (або відповідним у іншому переглядачі). Дивіться покроковий путівник в розділі {{SectionOnPage("/uk/docs/MDN/Contribute/Tools/KumaScript", "Використання пошуку за ключовими словами задля відкриття сторінок шаблонів")}}.

-
- -

Помилка TemplateExecutionError трапляється тоді, коли KumaScript натрапляє на помилку під час виконання самого шаблону. Такі помилки можуть виправити лише адміністратори, тож вам слід лише надіслати відповідний звіт.

- -

Перед тим, як надсилати звіт про помилки, переконайтеся, що їх досі не виправлено. Для цього ви можете змусити KumaScript надати вам останню версію сторінки, перезавантаживши її зі скиданням кешів (Shift + Ctrl + R у Linux/Windows, Shift + Cmd + R на Mac).

- -

Якщо проблема лишається, повідомте про ваду, додавши URL-посилання на сторінку й текст помилки.

- -

Невідома помилка (Error & Unknown)

- -

Так позначаються помилки, які не належать до жодного з наведених різновидів.

- -

Переконайтеся, що виправлень досі немає, а тоді повідомте про вади так само, як у випадку з TemplateExecutionError.

diff --git a/files/uk/mdn/yari/index.html b/files/uk/mdn/yari/index.html deleted file mode 100644 index 11cc621995..0000000000 --- a/files/uk/mdn/yari/index.html +++ /dev/null @@ -1,26 +0,0 @@ ---- -title: 'Kuma: wiki-платформа MDN' -slug: MDN/Yari -tags: - - Kuma - - MDN Meta -translation_of: MDN/Kuma -original_slug: MDN/Kuma ---- -
{{MDNSidebar}}
- -
{{IncludeSubnav("/uk/docs/MDN")}}
- -

Платформа Kuma — це код, що ґрунтується на Django та вможливлює роботу MDN Web Docs.

- -

{{SubpagesWithSummaries}}

- -

Ознайомлення з Kuma

- -

Щоб ознайомитися з Kuma:

- - diff --git a/files/uk/mozilla/add-ons/index.html b/files/uk/mozilla/add-ons/index.html deleted file mode 100644 index 955878627f..0000000000 --- a/files/uk/mozilla/add-ons/index.html +++ /dev/null @@ -1,110 +0,0 @@ ---- -title: Додатки -slug: Mozilla/Add-ons -tags: - - Mozilla - - Додатки - - Розширення -translation_of: Mozilla/Add-ons ---- -

{{AddonSidebar}}

- -
Змінення та розширення застосунків Mozilla
- -

Add-ons add new functionality to Gecko-based applications such as Firefox, SeaMonkey, and Thunderbird. There are two main types of add-on: Extensions add new features to the application, while Themes modify the application's user interface.

- -

Add-ons can greatly affect the behavior of the application that hosts them. We've developed a set of guidelines to help ensure that they provide a good experience to users. These guidelines apply for all sorts of add-ons, whether they are hosted at addons.mozilla.org or not.

- -
-

Розробка розширень

- -

Extensions add new functionality to Mozilla applications such as Firefox and Thunderbird. They can add new features to the browser, such as a different way to manage tabs, and they can modify web content to improve the usability or security of particular websites.

- -

There are three different techniques you can use to build extensions: Add-on SDK-based extensions, manually bootstrapped restartless extensions, and legacy extensions.

- - - -
-

WebExtensions

- -

We're working on a system called WebExtensions, which is a new way to develop WebExtensions for Firefox, that will be largely compatible with the system used by Chrome and Opera.

- -

In the future this will be the preferred way to develop extensions for Firefox.

- -

At the moment the implementation of this is experimental, but you can see the docs here if you want to give it a spin.

-
- -

If you can, it's advisable to use the Add-on SDK, which uses the restartless extension mechanism but simplifies certain tasks and cleans up after itself. If the Add-on SDK isn't sufficient for your needs, implement a manual restartless extension instead.

- -

For more information on choosing which technique to use, read this comparison.

- -

Зневадження

- -

Extension development is hard without being able to debug to see what lines errors were made on. You must enable the developer preferences in order for the logs to be show in the Browser Console. For desktop see here: Setting up an extension development environment.

- -

For desktop follow Setting Up a Development Environment, for Mobile (Android/iOS) follow Debugging Firefox for Android with WebIDE which uses the "Browser Toolbox" from within the desktop WebIDE to catch errors occuring on the mobile device, for Firefox OS also use the WebIDE.

- -
-
- - -

No matter how you develop an extension, there are some guidelines you can follow to help ensure your extension provides as good a user experience as possible.

- -
-
Performance
-
Ensuring your extension is fast, responsive and memory-efficient.
-
Security
-
Ensuring your extension doesn't expose the user to malicious websites.
-
Etiquette
-
Ensuring your extension plays nicely with other extensions.
-
-
- -
-

Application-specific

- -

Most of the documentation assumes you're developing for Firefox Desktop. If you're developing for some other Gecko-based application, there are major differences you need to know about.

- -
-
Thunderbird
-
Developing extensions for the Thunderbird mail client.
-
Firefox for Android
-
Developing extensions for Firefox for Android.
-
SeaMonkey
-
Developing extensions for the SeaMonkey software suite.
-
-
-
- -
-

Оприлюднення нових додатків

- -

Mozilla operates a platform for reviewing, signing, and distributing add-ons and themes at addons.mozilla.org, also known as AMO.

- -

You don't have to list your add-on on AMO, but starting in Firefox 43, you must submit your add-on to AMO so it can be reviewed and signed, or Firefox release users won't be able to install your add-on. If you do list your add-on on AMO, you can benefit from its visibility as a source for useful add-ons.

- - - -
-

Інші типи додатків

- -

Lightweight themes are much simpler to implement than complete themes, but provide very limited customization.

- -

With complete themes you can make much deeper modifications to the application UI. The documentation for complete themes is out of date, but is linked to here as a possible basis for updated documentation.

- -

Search engine plugins are a simple and very specific type of add-on: they add new search engines to the browser's search bar.

- -

Plugins help the application understand web content that it does not natively support. NPAPI plugins are a legacy technology and new sites should not use them. In general, plugins are not available on most modern mobile systems including, and websites should transition away from using plugins.

diff --git a/files/uk/mozilla/add-ons/webextensions/api/index.html b/files/uk/mozilla/add-ons/webextensions/api/index.html deleted file mode 100644 index 0bbd6f9878..0000000000 --- a/files/uk/mozilla/add-ons/webextensions/api/index.html +++ /dev/null @@ -1,57 +0,0 @@ ---- -title: JavaScript APIs -slug: Mozilla/Add-ons/WebExtensions/API -tags: - - NeedsTranslation - - TopicStub - - WebExtensions -translation_of: Mozilla/Add-ons/WebExtensions/API ---- -
{{AddonSidebar}}
- -
-

JavaScript APIs for WebExtensions can be used inside the extension's background scripts and in any other documents bundled with the extension, including browser action or page action popups, sidebars, options pages, or new tab pages. A few of these APIs can also be accessed by an extension's content scripts (see the list in the content script guide).

- -

To use the more powerful APIs you need to request permission in your extension's manifest.json.

- -

You can access the APIs using the browser namespace:

- -
function logTabs(tabs) {
-  console.log(tabs);
-}
-
-browser.tabs.query({currentWindow: true}, logTabs);
-
- -
-

Many of the APIs are asynchronous, returning a Promise:

- -
function logCookie(c) {
-  console.log(c);
-}
-
-function logError(e) {
-  console.error(e);
-}
-
-var setCookie = browser.cookies.set(
-  {url: "https://developer.mozilla.org/"}
-);
-setCookie.then(logCookie, logError);
-
- -
-

Note that this is different from Google Chrome's extension system, which uses the chrome namespace instead of browser, and which uses callbacks instead of promises for asynchronous functions. As a porting aid, the Firefox implementation of WebExtensions APIs supports chrome and callbacks as well as browser and promises. Mozilla has also written a polyfill which enables code that uses browser and promises to work unchanged in Chrome: https://github.com/mozilla/webextension-polyfill.

- -

Firefox also implements these APIs under the chrome namespace using callbacks. This allows code written for Chrome to run largely unchanged in Firefox for the APIs documented here.

- -

Microsoft Edge uses the browser namespace, but doesn't yet support promise-based asynchronous APIs. In Edge, for the time being, asynchronous APIs must use callbacks.

- -

Not all browsers support all the APIs: for the details, see Browser support for JavaScript APIs.

- -

JavaScript API listing

- -

See below for a complete list of JavaScript APIs:

-
- -
{{SubpagesWithSummaries}}
diff --git a/files/uk/mozilla/add-ons/webextensions/api/sessions/index.html b/files/uk/mozilla/add-ons/webextensions/api/sessions/index.html deleted file mode 100644 index 1a1c8fcf2c..0000000000 --- a/files/uk/mozilla/add-ons/webextensions/api/sessions/index.html +++ /dev/null @@ -1,136 +0,0 @@ ---- -title: sessions -slug: Mozilla/Add-ons/WebExtensions/API/sessions -tags: - - API - - Add-ons - - Extensions - - NeedsTranslation - - Non-standard - - Reference - - TopicStub - - WebExtensions - - sessions -translation_of: Mozilla/Add-ons/WebExtensions/API/sessions ---- -
{{AddonSidebar}}
- -

Use the sessions API to list, and restore, tabs and windows that have been closed while the browser has been running.

- -

The {{WebExtAPIRef("sessions.getRecentlyClosed()")}} function returns an array of {{WebExtAPIRef("tabs.Tab")}} and {{WebExtAPIRef("windows.Window")}} objects, representing tabs and windows that have been closed since the browser was running, up to the maximum defined in {{WebExtAPIRef("sessions.MAX_SESSION_RESULTS")}}.

- -

You can then restore a window or tab using the {{WebExtAPIRef("sessions.restore()")}} function. Restoring doesn't just reopen the tab: it also restores the tab's navigation history so the back/forward buttons will work.

- -

This API also provides a group of functions that enable an extension to store additional state associated with a tab or a window. Then, if the tab or window is closed and subsequently restored, the extension can retrieve the state. For example, a tab grouping extension might use this to remember which group a tab is in, so as to restore it into the right group if the user restores the tab.

- -

To use the sessions API you must have the "sessions" API permission.

- -

Types

- -
-
{{WebExtAPIRef("sessions.Filter")}}
-
Enables you to restrict the number of {{WebExtAPIRef("sessions.Session", "Session")}} objects returned by a call to {{WebExtAPIRef("sessions.getRecentlyClosed()")}}.
-
{{WebExtAPIRef("sessions.Session")}}
-
-

Represents a tab or window that the user has closed in the current browsing session.

-
-
- -

Properties

- -
-
{{WebExtAPIRef("sessions.MAX_SESSION_RESULTS")}}
-
The maximum number of sessions that will be returned by a call to sessions.getRecentlyClosed().
-
- -

Functions

- -
-
{{WebExtAPIRef("sessions.forgetClosedTab()")}}
-
Removes a closed tab from the browser's list of recently closed tabs.
-
{{WebExtAPIRef("sessions.forgetClosedWindow()")}}
-
Removes a closed window from the browser's list of recently closed windows.
-
{{WebExtAPIRef("sessions.getRecentlyClosed()")}}
-
Returns an array of {{WebExtAPIRef("sessions.Session", "Session")}} objects, representing windows and tabs that were closed in the current browsing session (that is: the time since the browser was started).
-
{{WebExtAPIRef("sessions.restore()")}}
-
-

Restores a closed tab or window.

-
-
{{WebExtAPIRef("sessions.setTabValue()")}}
-
-

Store a key/value pair associated with a given tab.

-
-
{{WebExtAPIRef("sessions.getTabValue()")}}
-
-

Retrieve a previously stored value for a given tab, given its key.

-
-
{{WebExtAPIRef("sessions.removeTabValue()")}}
-
-

Remove a key/value pair from a given tab.

-
-
{{WebExtAPIRef("sessions.setWindowValue()")}}
-
-

Store a key/value pair associated with a given window.

-
-
{{WebExtAPIRef("sessions.getWindowValue()")}}
-
-

Retrieve a previously stored value for a given window, given its key.

-
-
{{WebExtAPIRef("sessions.removeWindowValue()")}}
-
-

Remove a key/value pair from a given window.

-
-
- -

Events

- -
-
{{WebExtAPIRef("sessions.onChanged")}}
-
-

Fired when a tab or window is closed.

-
-
- -

Browser compatibility

- -

{{Compat("webextensions.api.sessions")}}

- -

{{WebExtExamples("h2")}}

- -
Acknowledgements - -

This API is based on Chromium's chrome.sessions API.

- -

Microsoft Edge compatibility data is supplied by Microsoft Corporation and is included here under the Creative Commons Attribution 3.0 United States License.

-
- - diff --git a/files/uk/mozilla/add-ons/webextensions/api/sessions/restore/index.html b/files/uk/mozilla/add-ons/webextensions/api/sessions/restore/index.html deleted file mode 100644 index f557ad46f1..0000000000 --- a/files/uk/mozilla/add-ons/webextensions/api/sessions/restore/index.html +++ /dev/null @@ -1,108 +0,0 @@ ---- -title: sessions.restore() -slug: Mozilla/Add-ons/WebExtensions/API/sessions/restore -tags: - - API - - WebExtensions - - Додатки - - Розширення -translation_of: Mozilla/Add-ons/WebExtensions/API/sessions/restore ---- -
{{AddonSidebar()}}
- -

Відновлює закрите вікно або вкладку. Відновлення є не просто перевідкриттям: воно також повертає історію переходів, тож кнопки вперед/назад також працюватимуть. Відновлення вікна відновить всі вкладки, які вікно мало перед закриттям.

- -

Це асинхронна функція, що повертає Promise.

- -

Синтаксис

- -
var restoringSession = browser.sessions.restore(
-  sessionId             // рядок
-)
-
- -

Параметри

- -
-
sessionId
-
Рядок, що містить ідентифікатор сесії для відновлення вікна чи вкладки. Його можна дістати із властивості sessionId об'єкта {{WebExtAPIRef("tabs.Tab", "Tab")}} чи {{WebExtAPIRef("windows.Window", "Window")}}, взятого з котрогось із об'єктів {{WebExtAPIRef("sessions.Session", "Session")}}, що їх масив вертає {{WebExtAPIRef("sessions.getRecentlyClosed()")}}.
-
- -

Вертає

- -

Об'єкт Promise. Через нього буде передано об'єкт {{WebExtAPIRef("sessions.Session", "Session")}}, що відповідатиме відновленій сесії.

- -

Підтримка веб-переглядачами

- - - -

{{Compat("webextensions.api.sessions.restore")}}

- -

Приклади

- -

Цей код відновлює останню завершену сессію (вікно або вкладку):

- -
function restoreMostRecent(sessionInfos) {
-  if (!sessionInfos.length) {
-    console.log("No sessions found")
-    return;
-  }
-  let sessionInfo = sessionInfos[0];
-  if (sessionInfo.tab) {
-    browser.sessions.restore(sessionInfo.tab.sessionId);
-  } else {
-    browser.sessions.restore(sessionInfo.window.sessionId);
-  }
-}
-
-function onError(error) {
-  console.log(error);
-}
-
-browser.browserAction.onClicked.addListener(function() {
-  var gettingSessions = browser.sessions.getRecentlyClosed({
-    maxResults: 1
-  });
-  gettingSessions.then(restoreMostRecent, onError);
-});
-
- -

{{WebExtExamples}}

- -
Подяки - -

Цей API ґрунтується на chrome.sessions API з Chromium.

- -

Дані про сумісність з Microsoft Edge надано корпорацією Microsoft і подано тут під ліцензією Creative Commons Attribution 3.0 United States License.

-
- - diff --git a/files/uk/mozilla/add-ons/webextensions/index.html b/files/uk/mozilla/add-ons/webextensions/index.html deleted file mode 100644 index 3d759fc48c..0000000000 --- a/files/uk/mozilla/add-ons/webextensions/index.html +++ /dev/null @@ -1,120 +0,0 @@ ---- -title: Browser extensions -slug: Mozilla/Add-ons/WebExtensions -tags: - - Extensions - - Landing - - NeedsTranslation - - TopicStub - - WebExtensions - - Додатки -translation_of: Mozilla/Add-ons/WebExtensions ---- -
{{AddonSidebar}}
- -

Розширення можуть розширювати і змінювати можливості веб-переглядача. Розширення для Firefox побудовані за допомогою WebExtension APIs, крос-браузерної системи для розробників розширень. To a large extent the system is compatible with the extension API supported by Google Chrome and Opera and the W3C Draft Community Group. Extensions written for these browsers will in most cases run in Firefox or Microsoft Edge with just a few changes. The API is also fully compatible with multiprocess Firefox.

- -

If you have ideas or questions, or need help migrating a legacy add-on to use WebExtension APIs, you can reach us on the dev-addons mailing list or #extdev on IRC.

- -
- - -
-

Довідка

- -

JavaScript APIs

- - - -
{{ ListSubpages ("/en-US/Add-ons/WebExtensions/API") }}
- -

Manifest keys

- - - -
{{ ListSubpages ("/en-US/Add-ons/WebExtensions/manifest.json") }}
-
-
diff --git a/files/uk/mozilla/add-ons/webextensions/interact_with_the_clipboard/index.html b/files/uk/mozilla/add-ons/webextensions/interact_with_the_clipboard/index.html deleted file mode 100644 index b415ba0b0b..0000000000 --- a/files/uk/mozilla/add-ons/webextensions/interact_with_the_clipboard/index.html +++ /dev/null @@ -1,171 +0,0 @@ ---- -title: Interact with the clipboard -slug: Mozilla/Add-ons/WebExtensions/Interact_with_the_clipboard -translation_of: Mozilla/Add-ons/WebExtensions/Interact_with_the_clipboard ---- -
{{AddonSidebar}}
- -

Існує два шляхи взаємодії веб-додатків з буфером обміну:  {{domxref("Document.execCommand()")}} метод і новітній асинхронний Clipboard API.

- -

{{domxref("Document.execCommand()")}} може використовуватись, бажано з наступними командами:

- - - -

Clipboard API надає асинхронний доступ считування та запису прямо в буфер обміну. Наприклад, щоб зчитати текст з буферу обміну виконайте:

- -
navigator.clipboard.readText().then(text => outputElem.innerText = text);
- -

Ця команда запитує текст в буфері та, та коли відповідь надійде з буферу, вона буде записана прямісенько в елемент {{domxref("Node.innerText", "innerText")}}.

- -
-

Примітка: Асинхронний Clipboard API метод нещодавно доданий в специфікацію, і може ще працювати не в усіх веб-оглядачах. Запевнетесь щодо кожного методу в таблиці сумісності перед тим як використовувати його.

-
- -

Запис в буфер обміну

- -

Існує два шляхи запису в буфер обміну. Ви можете використати {{domxref("Document.execCommand", "document.execCommand()")}} для запиту  "cut" та "copy" дій, які замінюють контент в буфері із виділенним даними. Інша опція це Clipboard API's {{domxref("Clipboard.writeText()")}} чи {{domxref("Clipboard.write()")}}.

- -

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

- -

{{domxref("Document.execCommand", "document.execCommand()")}} метод "cut" та "copy" команди можуть бути використані для заміни буферу із виділенними даними. Ці команди можуть бути виконані без будь яких дозволів, якщо ви використовуєте їх короткочасних обробниках дій користувача(наприклад, обробник кліку).

- -

Наприклад HTML:

- -
<input id="input" type="text"/>
-<button id="copy">Copy</button>
-
- -

Із кнопкою "copy" яка копіює контент {{HTMLElement("input")}} елементу, ви можете використати код такий як:

- -
function copy() {
-  var copyText = document.querySelector("#input");
-  copyText.select();
-  document.execCommand("copy");
-}
-
-document.querySelector("#copy").addEventListener("click", copy);
- -

Тому що execCommand() виклик знаходится всередені обробника кліку, вам не потрібні ніякі спеціальні дозволи.

- -

Однак, якщо наприклад замість того ви копіюєте з alarm:

- -
function copy() {
-  var copyText = document.querySelector("#input");
-  copyText.select();
-  document.execCommand("copy");
-}
-
-browser.alarms.create({
-  delayInMinutes: 0.1
-});
-
-browser.alarms.onAlarm.addListener(copy);
- -

Залежно від веб-оглядача, це може не спрацювати. У Firefox, це не спрацює, і ви побачете повідомлення помилки як:

- -
document.execCommand(‘cut’/‘copy’) was denied because it was not called from inside a short running user-generated event handler.
- -

Щоб надати можливість виконати це, вам потрібно запитати дозвол "clipboardWrite" permission. Тож: "clipboardWrite" дозволяє копіювати поза простих обробників дій користувача.

- -

Використання Clipboard API

- -

Clipboard API додає більшу гнучкість, в такому разі ви не обмежені лише в копіюванні поточного виділення в буфер обміну, ви маєте також можливість вказати будь яку інформацію внести в буфер.

- -

Використання API потребує дозволу "clipboardRead" чи "clipboardWrite" в вашому manifest.json файлі.

- -

Для страничних скриптів, Permissions API's потребує дозвіл "clipboard-write".  Ви можете запросити дозвіл з {{domxref("Permissions.query", "navigator.permissions.query()")}}:

- -
navigator.permissions.query({name: "clipboard-write"}).then(result => {
-  if (result.state == "granted" || result.state == "prompt") {
-    /* write to the clipboard now */
-  }
-});
-
- -

Ця функція приймає строку вводу та вносить ії в буфер обміну:

- -
function updateClipboard(newClip) {
-  navigator.clipboard.writeText(newClip).then(function() {
-    /* clipboard successfully set */
-  }, function() {
-    /* clipboard write failed */
-  });
-}
-
- -

Browser-specific considerations

- -

Буфер обміну та інші APIs активно розвиваются, тож існують варіанти серед веб-оглядачів як вони працюють.

- -

В Chrome:

- - - -

В Firefox:

- - - -
-

execCommand('copy') API не підтримує Safari

-
- -

Зчитування буферу обміну

- -

execCommand() дозволяє виконати "paste" команду, яка дозволяє вставити поточний контент в буфері обміну в область редагування. Ви можете отримати більшу гнучкість із  Clipboard API's {{domxref("Clipboard.read()")}} та {{domxref("Clipboard.readText()")}} методами.

- -

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

- -

По-перше, вам потрібен дозвіл "clipboardRead" permission визначно до вашого додатку. Це обов'язвокі умови навіть якщо "paste" команда виконується в обробнику дій користувача такі як {{event("click")}} чи {{event("keypress")}}.

- -

Наприклад HTML такий як:

- -
<textarea id="output"></textarea>
-<button id="paste">Paste</button>
-
- -

Щоб вставити контент в {{HTMLElement("textarea")}} з ID "output" з буферу обміну коли користувач нажме на кнопку "paste" {{HTMLElement("button")}}, використовуйте код:

- -
function paste() {
-  var pasteText = document.querySelector("#output");
-  pasteText.focus();
-  document.execCommand("paste");
-  console.log(pasteText.textContent);
-}
-
-document.querySelector("#paste").addEventListener("click", paste);
- -

Використання Clipboard API

- -

Clipboard API's {{domxref("Clipboard.readText", "navigator.clipboard.readText()")}} та {{domxref("Clipboard.read", "navigator.clipboard.read()")}} методи дозволяють вам зчитувати  текст чи бінарні данні з буферу обміну. Вона надає можливість зчитувати данні в буфері без вставки його в елемент редагування.

- -

Щойно ви отримали "clipboard-read" дозвіл з Permissions API, ви можете зчитати данні дуже легко:

- -
navigator.clipboard.readText().then(clipText =>
-  document.getElementById("outbox").innerText = clipText);
- -

Цей код витягує текст з буферу та замінює контент елементу з ID "outbox".

- -

Browser-specific considerations

- -

Firefox підтримує "clipboardRead" permission з версії 54, але личше підтримує вставку в елементи в content editable mode, які в контент скриптах лише працюють з  {{HTMLElement("textarea")}}. Для фонових скриптів, будь який елемент може бути змінений в режим редагування контенту.

- -

Дивись також

- - diff --git a/files/uk/mozilla/add-ons/webextensions/what_are_webextensions/index.html b/files/uk/mozilla/add-ons/webextensions/what_are_webextensions/index.html deleted file mode 100644 index eccf78994d..0000000000 --- a/files/uk/mozilla/add-ons/webextensions/what_are_webextensions/index.html +++ /dev/null @@ -1,26 +0,0 @@ ---- -title: Що таке розширення? -slug: Mozilla/Add-ons/WebExtensions/What_are_WebExtensions -tags: - - Web-Розширення - - Розширення -translation_of: Mozilla/Add-ons/WebExtensions/What_are_WebExtensions -original_slug: Mozilla/Add-ons/WebExtensions/Що_таке_Web_Розширення ---- -
{{AddonSidebar}}
- -

Розширення є частинками коду, які змінюють функціонування web-браузера. Вони написані з використанням стандартних web-технологій - JavaScript, HTML і CSS - плюс деяких спеціальних JavaScript API. Крім того, розширення можуть додавати нові функції до браузера або змінювати зовнішній вигляд або вміст конкретних web-сайтів.

- -

Розширення для Firefox створені з використанням API Web-розширень, крос-браузерної системи для розробки розширень. Значною мірою API сумісний з API розширенням, яке підтримується Google Chrome і Opera. Розширення написані для цих браузерів в більшості випадків запускатимуться у Firefox або Microsoft Edge з лише кількома змінами. API також повністю сумісний з багатопроцесовим Firefox.

- -

В минулому, ви могли розробляти розширення Firefox використовуючи одне з трьох різних систем: XUL/XPCOM overlays, bootstrapped extensions, або Add-on SDK. По закінченню Листопада 2017-го, API Web-розширення будуть єдиним способом розробки розширень Firefox, і інші системи не будуть підтримуватися.

- -

Якщо ви маєте ідеї або питання, чи вам потрібна допомога міграції успадкованого додатку на API Web-розширень, то ви можете зв'язатися з нами на dev-addons списку листування або в #extdev на IRC.

- -

Що далі?

- - diff --git a/files/uk/mozilla/firefox/experimental_features/index.html b/files/uk/mozilla/firefox/experimental_features/index.html deleted file mode 100644 index 9b68f1611f..0000000000 --- a/files/uk/mozilla/firefox/experimental_features/index.html +++ /dev/null @@ -1,537 +0,0 @@ ---- -title: Експериментальні функції в Firefox -slug: Mozilla/Firefox/Experimental_features -translation_of: Mozilla/Firefox/Experimental_features ---- -
{{FirefoxSidebar}}

In order to test new features, Mozilla publishes a test version of the Firefox browser, Firefox Nightly, every day. Experimental features, for example implementations of proposed Web platform standards, are available. This page lists features that are in Nightly versions of Firefox along with information on how to activate them, if necessary. You can test your Web sites and applications before these features get released and ensure everything will still work with the latest Web technology capabilities.

- -

To test these experimental features, you need to download Firefox Nightly or Firefox Developer Edition.

- -

HTML

- - - - - - - - - - - - - - - - - - - - -
ФункціяFirefox NightlyFirefox Developer EditionFirefox БетаFirefox ReleaseПереваги
Date and time inputs
- The UI for the {{HTMLElement("input")}} date and time related input types.
Вимкнено
- (available since 51)
Вимкнено
- (available since 51)
Вимкнено
- (available since 51)
---dom.forms.datetime
- -

CSS

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ФункціяFirefox NightlyFirefox Developer EditionFirefox БетаFirefox ReleaseПереваги
Grid Layout4040Увімкнено
- (available since 40, enabled by default since 52)
Вимкненоlayout.css.grid.enabled
SubgridsВимкненоВимкненоВимкненоВимкненоlayout.css.grid-template-subgrid-value.enabled
Logical values for clear and float CSS properties
- The values {{cssxref("clear")}}: inline-start and clear: inline-end as well as {{cssxref("float")}}: inline-start and float: inline-end are making easier to create layouts that are agnostic to the text directionality.
4545ВимкненоВимкненоlayout.css.float-logical-values.enabled
Display stray control characters in CSS as hex boxes
- This feature renders control characters (Unicode category Cc) other than tab (U+0009), line feed (U+000A), form feed (U+000C), and carriage return (U+000D) as a hexbox when they are not expected.
4343ВимкненоВимкненоlayout.css.control-characters.enabled
The transform-box property
- Controls the box the relative values of {{cssxref("transform-origin")}} and {{cssxref("transform")}} relate too.
4141ВимкненоВимкненоsvg.transform-box.enabled
Basic shapes in clip-path
- Adds the functions circle(), ellipse(), and polygon() to the set of possible values for {{cssxref("clip-path")}}. This is a part of CSS Masks Level 1.
Увімкнено
- (available since 47, enabled by default since 53)
Увімкнено
- (available since 47, enabled by default since 53)
Вимкнено
- (available since 47)
Вимкнено
- (available since 47)
layout.css.clip-path-shapes.enabled
Positioned CSS Masks
- A subset of CSS Masks that includes longhand properties of CSS Masks, as well as a change in the shorthand property
515153Вимкнено
- (planned for 53)
Controlled by a compile flag (MOZ_ENABLE_MASK_AS_SHORTHAND).
The font-display descriptor for @font-face
- To improve Web fonts performance, {{cssxref("@font-face")}} has an experimental {{cssxref("@font-face/font-display", "font-display")}} descriptor.
Вимкнено
- (available since 46)
Вимкнено
- (available since 46)
Вимкнено
- (available since 46)
Вимкнено
- (available since 46)
layout.css.font-display.enabled
The touch-action CSS property
- The {{cssxref("touch-action")}} CSS property is part of the {{SpecName("Pointer Events")}} specification and allows to specify how and in what way the user is able to manipulate an object by touch.
50layout.css.touch_action.enabled
-

The shape-outside CSS property
- The {{cssxref("shape-outside")}} CSS property is part of the {{SpecName("CSS Shapes")}} specification and allows to specify a float area causing inline contents to wrap around a shape.

- -

Firefox currently implements the <shape-box> values ({{bug(1309467)}}) as well as the circle() ({{bug(1311244)}}) and ellipse() ({{bug(1326406)}}) functions.

-
Вимкнено
- (available since 53)
layout.css.shape-outside.enabled
The contain CSS property
- The {{cssxref("contain")}} CSS property is part of the {{SpecName("CSS Containment")}} specification and allows to indicate that an element and its contents are independent of the rest of the document tree, allowing {{Glossary("User agent", "user agents")}} to optimize the rendering of a page.
Вимкнено
- (available since 45)
Вимкнено
- (available since 45)
Вимкнено
- (available since 45)
Вимкнено
- (available since 45)
layout.css.contain.enabled
- -

JavaScript

- -

See also ECMAScript Next support for implemented features of ECMAScript 2016 and later, that are not experimental and thus available without preferences in Firefox Release.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ФункціяFirefox NightlyFirefox Developer EditionFirefox БетаFirefox ReleaseПереваги
Additions to the ArrayBuffer object
- Adds the {{jsxref("ArrayBuffer.transfer()")}} that returns a new ArrayBuffer whose contents have been taken from the oldBuffer's data (spec).
36ВимкненоВимкненоВимкненоNone
TypedObject objects (spec)УвімкненоВимкненоВимкненоВимкненоNone
SIMD (specification and polyfill)УвімкненоВимкненоВимкненоВимкненоNone
Shared Memory objects
- {{jsxref("SharedArrayBuffer")}}
- {{jsxref("Atomics")}}
Увімкнено
- (available since 46)
Увімкнено
- (available since 51)
Вимкнено
- (available since 46)
Вимкнено
- (available since 46)
javascript.options.shared_memory
- -

APIs

- -

Canvas & WebGL

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ФункціяFirefox NightlyFirefox Developer EditionFirefox БетаFirefox ReleaseПереваги
WEBGL_debug_renderer_info extension
- The {{domxref("WEBGL_debug_renderer_info")}} extension allows to transmit information useful to help debugging problems to the server.
4242ВимкненоВимкненоwebgl.enable-debug-renderer-info
OffscreenCanvas
- The {{domxref("OffscreenCanvas")}} interface provides a canvas that can be rendered off screen. It is available in both the window and worker contexts.
Вимкнено
- (available since 44)
Вимкнено
- (available since 44)
Вимкнено
- (available since 44)
Вимкнено
- (available since 44)
gfx.offscreencanvas.enabled
Hit regions
- Whether the mouse coordinates are within a particular area on the canvas, is a common problem to solve. The hit region API allows you define an area of your canvas and provides another possibility to expose interactive content on a canvas to accessibility tools.
Вимкнено
- (available since 30)
Вимкнено
- (available since 30)
Вимкнено
- (available since 30)
Вимкнено
- (available since 30)
canvas.hitregions.enabled
- -

 DOM

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ФункціяFirefox NightlyFirefox Developer EditionFirefox БетаFirefox ReleaseПереваги
WebVR API
- The WebVR API allows to control and use virtual reality devices.
46
- A major update of the interface happened in version 51.
46
- A major update of the interface happened in version 51.
ВимкненоВимкненоdom.vr.enabled
FlyWeb
- FlyWeb is a project at Mozilla focused on bringing a new set of APIs to the browser for advertising and discovering local-area web servers.
51ВимкненоВимкненоВимкненоdom.flyweb.enabled
HTMLMediaElement.seekToNextFrame()
- Part of an experimentation process around support non-real-time access to media for tasks including filtering, editing, and so forth, the {{domxref("HTMLMediaElement.seekToNextFrame()")}} advances the the current play position to the next frame in the media.
49
- (Fundamental update in version 50)
49
- (Fundamental update in version 50)
ВимкненоВимкненоmedia.seekToNextFrame.enabled
GeometryUtils.getBoxQuads() ({{bug(917755)}})3131ВимкненоВимкненоlayout.css.getBoxQuads.enabled
GeometryUtils.convertPointFromNode(),
- GeometryUtils.RectFromNode(), and
- GeometryUtils.convertQuadFromNode()
- ({{bug(918189)}})
3131ВимкненоВимкненоlayout.css.convertFromNode.enabled
Node.rootNode
- The {{domxref("Node.rootNode")}} property returns a {{domxref("Node")}} object representing the topmost node in the tree, or the current node if it's the topmost node in the tree.
- This feature is kept experimental as its naming poses Web compatibility problems. It will be renamed in the future.
4848ВимкненоВимкненоdom.node.rootNode.enabled
Performance Observer API
- The {{domxref("PerformanceObserver")}} interface is used to observe performance measurement events and be notified of new performance entries as they are recorded in the browser's performance timeline.
49ВимкненоВимкненоВимкненоdom.enable_performance_observer
WebVTT Regions API
- WebVTT regions are parts of the video viewport that provide a rendering area for WebVTT cues. The {{domxref("VTTRegion")}} is the interface exposing the WebVTT cues.
- This interface is considered to be in flux and isn't therefore activated in any version by default.
Вимкнено
- (Experimental implementation since version 30)
ВимкненоВимкненоВимкненоmedia.webvtt.regions.enabled
Support for audio and video tracks
- Implements {{domxref("HTMLMediaElement.audioTracks")}} and {{domxref("HTMLMediaElment.videoTracks")}}.
- Firefox doesn't support multiple audio or video tracks, preventing the most common use cases for these properties to work properly. That's why these properties are not activated by default in any version.
Вимкнено
- (Experimental implementation since version 33)
ВимкненоВимкненоВимкненоmedia.track.enabled
Better value for Event.timestamp
- The property {{domxref("Event.timestamp")}} is returning a {{domxref("DOMHighResTimeStamp")}}, but the value is not the time since but since the reboot. This change allow for returning a timestamp relative to the Unix epoch.
32 (Windows)
- 43 (Linux)
32 (Windows)
- 43 (Linux)
ВимкненоВимкненоmedia.track.enabled
Pointer Events50ВимкненоВимкненоВимкненоdom.w3c_pointer_events.enabled
MediaDevices.ondevicechange and the devicechange event
- The {{domxref("MediaDevices.ondevicechange")}} event handler and corresponding {{event("devicechange")}} event make it possible to detect and react when audio and video devices are attached to or removed from the computer.
-

Вимкнено
- 51 (Mac)

- -

Увімкнено
- 52 (Mac)
- 52 (Windows)
- 52 (Linux)

-
-

Вимкнено
- 51 (Mac)

- -

Увімкнено
- 52 (Mac)
- 52 (Windows)
- 52 (Linux)

-
-

Вимкнено
- 51 (Mac)

- -

Увімкнено
- 52 (Mac)
- 52 (Windows)
- 52 (Linux)

-
-

Вимкнено
- 51 (Mac)

- -

Увімкнено
- 52 (Mac)
- 52 (Windows)
- 52 (Linux)

-
media.ondevicechange.enabled
Intersection Observer API
- The {{domxref("Intersection Observer API")}} allows you to configure a callback that is called whenever one item, called a target, intersects either the device viewport or a specified element called.
Вимкнено
- (available since 53)
---------dom.IntersectionObserver.enabled
Web Animations API
- The {{domxref("KeyframeEffectReadOnly.KeyframeEffectReadOnly()")}} and {{domxref("KeyframeEffect.KeyframeEffect()")}} constructors can be used to clone existing {{domxref("KeyframeEffectReadOnly")}} object instances by being given the object to clone as their only parameter (see {{bug(1273784)}}.) The KeyframeEffect.clone() method, which was meant to provide this functionality but was never implemented in Firefox, has been removed from the spec.
5252ВимкненоВимкненоNone
- -

Developer Tools

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ФункціяFirefox NightlyFirefox Developer EditionFirefox БетаFirefox ReleaseПереваги
Debugger rewrite in HTML5252ВимкненоВимкненоdevtools.debugger.new-debugger-frontend
Console rewrite in HTML52ВимкненоВимкненоВимкненоdevtools.webconsole.new-frontend-enabled
Responsive Design Mode rewrite in HTML
- A rewrite of Responsive Design Mode using HTML adds new features like a device selector (applies size, UA, dPR), UI redesign, and there's more still to come.
52525252devtools.responsive.html.enabled
Experimental Performance tool options
- Enables options in the UI for JIT optimizations, memory, etc.
41ВимкненоВимкненоВимкненоdevtools.performance.ui.experimental
Layout side panel
- The Layout side panel allows to inspect and manage different CSS layout types like CSS Grid Layout.
Вимкнено
- (available since 52)
Вимкнено
- (available since 52)
------devtools.layoutview.enabled
- -

See also

- - diff --git a/files/uk/mozilla/firefox/index.html b/files/uk/mozilla/firefox/index.html deleted file mode 100644 index 1fd1fae05f..0000000000 --- a/files/uk/mozilla/firefox/index.html +++ /dev/null @@ -1,86 +0,0 @@ ---- -title: Firefox -slug: Mozilla/Firefox -tags: - - Firefox - - Landing - - Mozilla - - NeedsTranslation - - TopicStub -translation_of: Mozilla/Firefox ---- -
{{FirefoxSidebar}}
- -

Firefox is Mozilla's popular Web browser, available for multiple platforms including Windows, macOS, and Linux on the desktop and all Android and iOS mobile devices. With broad compatibility, the latest in Web technologies, and powerful development tools, Firefox is a great choice for both Web developers and end users.

- -

Firefox is an open source project; much of the code is contributed by our huge community of volunteers. Here you can learn about how to contribute to the Firefox project and you will also find links to information about the construction of Firefox add-ons, using the developer tools in Firefox, and other topics.

- -
-

Learn how to create add-ons for Firefox, how to develop and build Firefox itself, and how the internals of Firefox and its subprojects work.

-
- - - -

Firefox channels

- -

Firefox is available in five channels.

- -

Firefox Nightly

- -

Each night we build Firefox from the latest code in mozilla-central. These builds are for Firefox developers or those who want to try out the very latest cutting edge features while they're still under active development.

- -

Download Firefox Nightly

- -

Firefox Developer Edition

- -

This is a version of Firefox tailored for developers. Every six weeks, we take the features in Firefox Nightly that are stable enough and create a new version of Firefox Developer Edition. We also add some extra features for developers that are only available in this channel.

- -

Learn more about Firefox Developer Edition.

- -

Download Firefox Developer Edition

- -

Firefox Beta

- -

After spending six weeks in Firefox Developer Edition, we take the features that are stable enough, and create a new version of Firefox Beta. Firefox Beta builds are for Firefox enthusiasts to test what's destined to become the next released Firefox version.

- -

Download Firefox Beta

- -

Firefox

- -

After stabilizing for another six weeks in Beta, we're ready to ship the new features to hundreds of millions of users in a new release version of Firefox.

- -

Download Firefox

- -

Firefox Extended Support Release (ESR)

- -

Firefox ESR is the long-term support edition of Firefox for desktop for use by organizations including schools, universities, businesses and others who need extended support for mass deployments.

- -

Learn more about Firefox Extended Support Release.

- -

Download Firefox ESR

- -

Contents

- -

{{LandingPageListSubpages}}

- -

Firefox profiles

- -

If you find yourself using multiple Firefox channels—or just multiple configurations—on a regular basis, you should read how to use multiple Firefox profiles by turning Firefox's Profile Manager and other profile management tools to your advantage.

- -

See also

- - diff --git a/files/uk/mozilla/firefox/releases/53/index.html b/files/uk/mozilla/firefox/releases/53/index.html deleted file mode 100644 index 8345a0be47..0000000000 --- a/files/uk/mozilla/firefox/releases/53/index.html +++ /dev/null @@ -1,135 +0,0 @@ ---- -title: Firefox 53 для розробників -slug: Mozilla/Firefox/Releases/53 -tags: - - Примітки До Випуску -translation_of: Mozilla/Firefox/Releases/53 ---- -
{{FirefoxSidebar}}

Firefox 53 був випущений 19 квітня 2017 року. У цій статті перераховані основні зміни, корисні не тільки для веб-розробників, але також для розробників Firefox і Gecko, разом із розробниками додатків.

- -

Зміни для веб розробників

- -

Інструменти для розробників

- - - -

CSS

- - - -

JavaScript

- - - -

Interfaces/APIs/DOM

- -

DOM & HTML DOM

- -

Без змін.

- -

Canvas

- -

Без змін.

- -

WebGL

- -

Без змін.

- -

IndexedDB

- -

Без змін.

- -

Service Workers

- -

Без змін.

- -

WebRTC

- -

Без змін.

- -

New APIs

- -

Без змін.

- -

Others

- -

Без змін.

- -

MathML

- -

Без змін.

- -

SVG

- - - -

Audio/Video

- -

Без змін.

- -

HTTP

- -

Без змін.

- -

Networking

- -

Без змін.

- -

Безпека

- -

Без змін.

- -

Changes for add-on and Mozilla developers

- -

Інтерфейси

- -

Без змін.

- -

XUL

- -

Без змін.

- -

Без змін.

- -

JavaScript code modules

- - - -

XPCOM

- -

Без змін.

- -

Шнше

- -

Без змін.

- -

See also

- - - -

Більш ранні версії

- -

{{Firefox_for_developers(53)}}

diff --git a/files/uk/mozilla/firefox/releases/54/index.html b/files/uk/mozilla/firefox/releases/54/index.html deleted file mode 100644 index 8a7d95ede3..0000000000 --- a/files/uk/mozilla/firefox/releases/54/index.html +++ /dev/null @@ -1,116 +0,0 @@ ---- -title: Firefox 54 для розробників -slug: Mozilla/Firefox/Releases/54 -translation_of: Mozilla/Firefox/Releases/54 ---- -
{{FirefoxSidebar}}
-

Реліз Firefox 54 від 13 червня 2017. У цій статті наведено перелік ключових змін, корисних для веб-розробників.

- -

Зміни для веб-розробників

- -

Інструменти для розробників

- -

Без змін.

- -

HTML

- -

Без змін.

- -

CSS

- -

Без змін.

- -

JavaScript

- -

Без змін.

- -

Інтерфейси/API/DOM

- -

DOM & HTML DOM

- -

Без змін.

- -

Canvas

- -

Без змін.

- -

WebGL

- -

Без змін.

- -

IndexedDB

- -

Без змін.

- -

Service Workers

- -

Без змін.

- -

WebRTC

- -

Без змін.

- -

Нові API

- -

Без змін.

- -

Інші

- -

Без змін.

- -

MathML

- -

Без змін.

- -

SVG

- -

Без змін.

- -

Аудіо/Відео

- -

Без змін.

- -

HTTP

- -

Без змін.

- -

Мережа

- -

Без змін.

- -

Безпека

- -

Без змін.

- -

Зміни для доповненнь і розробників Mozilla

- -

Інтерфейси

- -

Без змін.

- -

XUL

- -

Без змін.

- -

Модулі JavaScript коду

- -

Без змін.

- -

XPCOM

- -

Без змін.

- -

Інше

- -

Без змін.

- -

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

- - - -

Більш ранні версії

- -

{{Firefox_for_developers(53)}}

-
diff --git a/files/uk/mozilla/firefox/releases/56/index.html b/files/uk/mozilla/firefox/releases/56/index.html deleted file mode 100644 index de30397e9e..0000000000 --- a/files/uk/mozilla/firefox/releases/56/index.html +++ /dev/null @@ -1,122 +0,0 @@ ---- -title: Firefox 56 for developers -slug: Mozilla/Firefox/Releases/56 -translation_of: Mozilla/Firefox/Releases/56 ---- -
{{FirefoxSidebar}}
-

Ця стаття надає інформацію щодо змін в Firefox 56, які стосуються розробників. Firefox 56 є поточною Beta версією Firefox, і буде довершено 26 вересня 2017.

- -
-

Зміни для розробників Web

- -

Засоби розробника

- -

Без змін.

- -

HTML

- -
    -
  • Реалізована властивість labels для елементів форми, які можуть мати мітки, наприклад {{domxref("HTMLInputElement.labels")}} ({{bug(556743)}}).
  • -
  • Реалізовано <link rel="preload">; див. Preloading content with rel="preload" для деталей ({{bug(1222633)}}).
  • -
- -

CSS

- -
    -
  • Implemented the proprietary Mozilla-specific {{cssxref("<color>")}} values -moz-win-accentcolor and -moz-win-accentcolortext (see {{bug(1344910)}}), and the proprietary media query -moz-windows-accent-color-in-titlebar (see {{bug(1379938)}}).
  • -
- -

SVG

- -

No changes.

- -

JavaScript

- -
    -
  • The Intl API has been enabled on Firefox for Android ({{bug(1344625)}}).
  • -
- -

APIs

- -

New APIs

- -

No changes.

- -

DOM

- -
    -
  • On Mac, {{domxref("Document.hidden")}} is now true when the window is behind another non-translucent application {{bug(1236512)}}.
  • -
  • The {{domxref("Gamepad.displayId")}} property has been implemented ({{bug(1375816)}}).
  • -
  • The {{domxref("CanvasRenderingContext2D.drawImage()")}} method has been updated so that smoothing occurs when downscaling even if imageSmoothingEnabled is false. This is not mandatory as per spec, but follows Chrome's behaviour. See {{bug(1360415)}}.
  • -
  • The {{domxref("PerformanceTiming.secureConnectionStart")}} property has been implemented ({{bug(772589)}}).
  • -
  • Firefox used to accept iso-2022-jp-2 sequences silently when an iso-2022-jp {{domxref("TextDecoder.TextDecoder","TextDecoder()")}} was instantiated, however this has now been removed to simplify the API, as no other browsers support it and no pages seem to use it. ({{bug(715833)}}).
  • -
  • The 4ms clamping behaviour of {{domxref("WindowOrWorkerGlobalScope.setTimeout","setTimeout()")}} and {{domxref("WindowOrWorkerGlobalScope.setInterval","setInterval()")}} has been updated to be more in line with other browsers, as described in Timeouts throttled to >=4ms ({{bug(1378586)}}).
  • -
  • The Page Visibility API's {{domxref("Document.onvisibilitychange")}} handler has been added ({{bug("1333912")}}).
  • -
- -

DOM events

- -
    -
  • {{domxref("GlobalEventHandlers.onwheel")}} is now available on {{domxref("HTMLElement")}} — it wasn't before ({{bug(1370550)}}).
  • -
- -

WebRTC

- -
    -
  • Firefox now supports the {{domxref("RTCPeerConnection")}} properties which let you examine the current and pending configurations of the local and remote ends of the connection, to help manage changes in configuration: {{domxref("RTCPeerConnection.currentLocalDescription", "currentLocalDescription")}}, {{domxref("RTCPeerConnection.pendingLocalDescription", "pendingLocalDescription")}}, {{domxref("RTCPeerConnection.currentRemoteDescription", "currentRemoteDescription")}}, and {{domxref("RTCPeerConnection.pendingRemoteDescription", "pendingRemoteDescription")}}.
  • -
- -

Security

- -

No changes.

- -

Plugins

- -

No changes.

- -

Other

- -
    -
  • Gecko now encodes URLs internally as punycode, to avoid URL encoding problems (see {{bug("945240")}}, also see discussion in {{bug("942074")}}).
  • -
  • Firefox on Windows and Mac OS X can now be made to run in headless mode using the -headless flag (see {{bug(1355150)}} and {{bug(1355147)}}).
  • -
- -

Removals from the web platform

- -

HTML

- -
    -
  • The {{htmlelement("isindex")}} element has been removed from the HTML parser, and from form submission ({{bug(1266495)}}).
  • -
  • The {{htmlelement("applet")}} element has been removed ({{bug(1279218)}}).
  • -
- -

APIs

- -
    -
  • The {{domxref("KeyframeEffectReadOnly.spacing")}} property has been removed from the {{SpecName('Web Animations')}} spec, and therefore has been removed from Gecko as well ({{bug(1339690)}}).
  • -
- -

SVG

- -

No changes.

- -

Changes for add-on and Mozilla developers

- -

WebExtensions

- -

No changes.

- -

See also

- - -
- - - -

Older versions

- -

{{Firefox_for_developers(55)}}

-
diff --git a/files/uk/mozilla/firefox/releases/index.html b/files/uk/mozilla/firefox/releases/index.html deleted file mode 100644 index 76a543b9bb..0000000000 --- a/files/uk/mozilla/firefox/releases/index.html +++ /dev/null @@ -1,12 +0,0 @@ ---- -title: Firefox developer release notes -slug: Mozilla/Firefox/Releases -tags: - - Firefox - - Примітки До Випуску - - Список змін -translation_of: Mozilla/Firefox/Releases ---- -
{{FirefoxSidebar}}

Нижче ви знайдете посилання на примітки до випуску розробникам для кожної нової версії Firefox. Ці з любв'ю оброблені примітки містять детальну інформацію про те, які функції додані вдосконалені і які помилки були усунені в кожній версії Firefox. Все написано, щоб дати розробникам інформацію, необхідну їм найбільше. Ласкаво просимо.

- -
{{ListSubpages("",1,1,1)}}
diff --git a/files/uk/mozilla/index.html b/files/uk/mozilla/index.html deleted file mode 100644 index cf62cf1852..0000000000 --- a/files/uk/mozilla/index.html +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: Mozilla -slug: Mozilla -tags: - - Advanced - - CodingScripting - - Landing - - Mozilla - - Додатки -translation_of: Mozilla ---- -

Наведені нижче статті описують завантаження й побудову коду Mozilla. Також Ви знайдете корисні статті про те, як цей код працює, як здійснювати побудову додатків Mozilla різного призначення тощо.

- -

{{LandingPageListSubpages}}

diff --git a/files/uk/orphaned/learn/how_to_contribute/index.html b/files/uk/orphaned/learn/how_to_contribute/index.html deleted file mode 100644 index e971a13d53..0000000000 --- a/files/uk/orphaned/learn/how_to_contribute/index.html +++ /dev/null @@ -1,84 +0,0 @@ ---- -title: Як зробити внесок до навчальної бази MDN? -slug: orphaned/Learn/How_to_contribute -translation_of: Learn/How_to_contribute -original_slug: Learn/How_to_contribute ---- -
{{LearnSidebar}}
- -
Якщо ви тут вперше або після довгих пошуків, це можливо тому що ви зацікавлені зробити власний внесок до області навчання MDN. Це гарні новини!
- -

На цій сторінці ви знайдете все що вам потрібно для того щоб почати допомагати удосконалювати навчаний контент MDN. Є багато речей, які ви можете робити, залежно від кількості наявного часу та на якому етапі ви знаходитесь e початківець, веб розробник, або вчитель.

- -
-

Примітка: Ви можете знайти мануал по написанню нової навчальної статті на сторінці Як написати статтю, щоб допомогти людям вивчити Веб.

-
- -

Знайдіть конкретні завдання

- -

Поширеним спосіб, яким люди роблять внески до навчальної бази є читання стеттей, виправлення друкарських помилок та пропозиція покращень. Ми також відаємо додавання прикладів до нашого GitHub сховища. Зв'яжіться з нами якщо ви хочете запитати що ще потрібно зробити. 

- -

Додавання внесків це чудовий спосіб розважитися під час вивчення нових речей. Якщо ви коли-небудь відчуваєте себе загубленим або маєте запитання, не соромтесь звернутися до нас в Навчальній темі для дискусій or IRC channel (see at the bottom of this page for details). Chris Mills is the topic driver for the Learning Area — you could also try pinging him directly.

- -

The following sections provide some general ideas of the types of tasks you can do.

- -

I'm a beginner

- -

That's awesome! Beginners are very important and valuable for creating and giving feedback on learning material. You have a unique perspective on these articles as a member of their target audience, which can make you an invaluable member of our team. Indeed, if you're using one of our articles to learn something and you get stuck, or find the article confusing in some way, you can either fix it or let us know about the problem so we can be sure it gets fixed.

- -

Here are some suggested ways you can contribute:

- -
-
Add tags to our articles (5 min)
-
Tagging MDN content is one of the easiest ways to contribute to MDN. As many of our features use tags to help present information in context, helping with tagging is a very valuable contribution. Take a look at the lists of glossary entries and learning articles without any tags to get started.
-
Read and review a glossary entry (5 min)
-
As a beginner, we need your fresh eyes looking at our content. If you find a glossary entry hard to understand, it means that entry needs to be improved. Feel free to make any changes you think are necessary. If you do not think you have the proper skill to edit the entry yourself, please bring it to our attention on our mailing list.
-
Write a new glossary entry (20 minutes)
-
This is the most effective way to learn something new. Pick a concept you want to understand, and as you learn about it, write a glossary entry about it. Explaining something to others is a great way to "cement" the knowledge in your brain, and to help you make sense of things yourself, all while helping other people. Everybody wins!
-
Read and review a learning article (2 hours)
-
This is very much like reviewing glossary entries (see above); it just takes more time, since these articles are typically quite a bit longer.
-
- -

I'm a web developer

- -

Fantastic! Your technical skills are just what we need to be sure we provide technically accurate content for beginners. As this specific part of MDN is dedicated to learning the Web, be sure your explanations are as simple as possible, without being so simple that they're not useful. It's often more important to be understandable than to be overly precise.

- -
-
Read and review a glossary entry (5 min)
-
As a web developer, we need you to make sure our content is technically accurate without being too pedantic. Feel free to make any changes you think are necessary. If you want to discuss the content before editing, ping us on our mailing list or IRC channel.
-
Write a new glossary entry (20 minutes)
-
Clarifying technical jargon is a very good way to learn and be both technically accurate and simple. Beginners will thank you for that. We have many undefined terms which need your attention. Pick one and you're good to go.
-
Read and review a learning article (2 hours)
-
This is the same thing as reviewing a glossary entry (see above); it just takes a bit more time as those articles are quite a bit longer.
-
Write a new learning article (4 hours or more)
-
MDN is lacking simple straightforward articles about using web technologies (HTML, CSS, JavaScript, etc). We also have old content on MDN that deserves to be reviewed and reshaped. Push your skills to the limit to make web technologies usable even by beginners.
-
Create exercises, code samples or interactive learning tools (? hours)
-
All our learning articles require what we call "active learning" materials, because people learn best by doing something themselves. Such materials are exercises or interactive content that help a user to apply and manipulate the concepts detailed in an article. There are many possible ways to make active learning content, from creating code samples with JSFiddle or similar, to building fully hackable interactive content with Thimble. Unleash your creativity!
-
- -

I'm a teacher

- -

MDN has a long history of technical excellence, but we lack depth of understanding of the best way to teach concepts to newcomers. This is where we need you, as a teacher or educator. You can help us ensure that our materials provide a good, practical educational track for our readers.

- -
-
Read and review a glossary entry (15 min)
-
Check out a glossary entry and feel free to make any changes you think are necessary. If you want to discuss the content before editing, ping us on our mailing list or IRC channel.
-
Write a new glossary entry (1 hour)
-
Clear, simple definitions of terms and basic overviews of concepts in the glossary are critical in meeting beginners' needs. Your experience as an educator can help create excellent glossary entries; we have many undefined terms which need your attention. Pick one and go for it.
-
Add illustrations and/or schematics to articles (1 hour)
-
As you might know, illustrations are an invaluable part of any learning content. This is something we often lack on MDN and your skills can make a difference in that area. Check out the articles that lack illustrative content and pick one you'd like to create graphics for.
-
Read and review a learning article (2 hours)
-
This is similar to reviewing glossary entries (see above), but it requires more time since the articles are typically quite a bit longer.
-
Write a new learning article (4 hours)
-
We need simple, straightforward articles about the Web ecosystem and other functional topics around it. Since these learning articles need to be educational rather than trying to literally cover everything there is to know, your experience in knowing what to cover and how will be a great asset.
-
Create exercises, quizzes or interactive learning tools (? hours)
-
All our learning articles require "active learning" materials. Such materials are exercises or interactive content which help a user learn to use and expand upon the concepts detailed in an article. There are lots of things you can do here, from creating quizzes to building fully hackable interactive content with Thimble. Unleash your creativity!
-
Create learning pathways (? hours)
-
In order to provide progressive and comprehensible tutorials, we need to shape our content into pathways. It's a way to gather existing content and figure out what is missing.
-
- -

See also

- - diff --git a/files/uk/orphaned/mdn/community/index.html b/files/uk/orphaned/mdn/community/index.html deleted file mode 100644 index eff5aeb5e8..0000000000 --- a/files/uk/orphaned/mdn/community/index.html +++ /dev/null @@ -1,54 +0,0 @@ ---- -title: Приєднуйтесь до спільноти MDN -slug: orphaned/MDN/Community -tags: - - Внесок - - Керівництво - - Спільнота -translation_of: MDN/Community -original_slug: MDN/Community ---- -
{{MDNSidebar}}
- -
{{IncludeSubnav("/uk/docs/MDN")}}
- -
-

Мережа Розробників Mozilla (англ. Mozilla Developer Network, скорочено MDN) — це дещо більше, ніж просто вікі: це товариство, що спільними зусиллями створює якісний ресурс для розробників, які використовують відкриті веб-технології.

-
- -

Ми були б вдячні вам за ваш внесок у розвиток MDN, та навіть більш вдячні ми були б за вашу участь в житті спільноти MDN. Долучитися можна у три прості кроки:

- -
    -
  1. Створіть обліковий запис MDN.
  2. -
  3. Приєднайтесь до обговорень.
  4. -
  5. Стежте за тим, що відбувається.
  6. -
- -

Як працює спільнота

- -

Нижче наведено статті, які описують та пояснюють роботу спільноти MDN.

- -
-
-
-
Ролі спільноти
-
Існує низка ролей у спільноті MDN, кожна з яких має певні обов'язки.
-
Спринти з документування
-
Це керівництво з організації спринтів з документування. Воно містить поради та настанови від людей, які організовували такі спринти, тож може допомогти вам організувати власні.
-
Стежте за тим, що відбувається
-
MDN надано вам спільнотою Мережі Розробників Mozilla. Тут наведено декілька шляхів поширення інформації про те, що ми робимо.
-
- -
-
-
- -
-
-
Беріть участь в обговореннях
-
Життя спільноти відбувається переважно на сайті MDN, проте "спільнота" існує також завдяки обговоренням (асинхронно) та онлайн чатам і зустрічам (синхронно).
-
Працюйте у спільноті
-
Запорукою будь-якого дійсно вагомого внеску до документації MDN є розуміння того, як бути частиною спільноти і працювати злагоджено. Ця стаття надає поради, що допоможуть налагодити взаємодію як з іншими редакторами, так і з командами розробників.
-
-
-
diff --git a/files/uk/orphaned/mdn/contribute/howto/be_a_beta_tester/index.html b/files/uk/orphaned/mdn/contribute/howto/be_a_beta_tester/index.html deleted file mode 100644 index 5fbbfda66b..0000000000 --- a/files/uk/orphaned/mdn/contribute/howto/be_a_beta_tester/index.html +++ /dev/null @@ -1,46 +0,0 @@ ---- -title: Як взяти учать в бета-тестуванні -slug: orphaned/MDN/Contribute/Howto/Be_a_beta_tester -tags: - - MDN Meta -translation_of: MDN/Contribute/Howto/Be_a_beta_tester -original_slug: MDN/Contribute/Howto/Бета_тестування ---- -
{{MDNSidebar}}

Час від часу, коли розробники Kuma (платформа MDN) впроваджують якість зміни, ми завчасно надаємо доступ до останніх оновлень тим членам спільноти, що погодились брати участь в бета-тестуванні. Певно, що в режимі бета-тестування щось може не працювати як слід.

- -

Як розпочати тестування

- -
    -
  1. Увійдіть до MDN (для цього вам потрібен обліковий запис);
  2. -
  3. Відкрийте випадне меню нагорі під зображенням вашого профілю наведенням вказівника миші;
  4. -
  5. Натисніть кнопку «Редагувати профіль» , щоб потрапити на сторінку редагування облікового запису:
    -
  6. -
  7. Встановіть прапорець «Бета-тестувальник» нагорі сторінки:
    - Shows the location of the Beta Tester checkbox
  8. -
  9. Та не забудьте застосувати зміни, натиснувши кнопку «Оприлюднити» наприкінці сторінки.
  10. -
- -

Як припинити тестування

- -
    -
  1. Увійдіть до MDN, відкрийте сторінку редагування облікового запису;
  2. -
  3. Приберіть прапорець «Бета-тестувальник»;
  4. -
  5. Збережіть зміни, натиснувши кнопку «Оприлюднити» наприкінці сторінки.
  6. -
- -

Як лишити відгук щодо тестування

- -

Є два способи залишити свій відгук щодо бета-тестування:

- - diff --git a/files/uk/orphaned/mdn/contribute/howto/create_an_mdn_account/index.html b/files/uk/orphaned/mdn/contribute/howto/create_an_mdn_account/index.html deleted file mode 100644 index f270f727b6..0000000000 --- a/files/uk/orphaned/mdn/contribute/howto/create_an_mdn_account/index.html +++ /dev/null @@ -1,43 +0,0 @@ ---- -title: Як створити обліковий запис MDN -slug: orphaned/MDN/Contribute/Howto/Create_an_MDN_account -tags: - - MDN Мета - - MDN профіль - - Документація - - Керівництво - - Початківець -translation_of: MDN/Contribute/Howto/Create_an_MDN_account -original_slug: MDN/Contribute/Howto/Create_an_MDN_account ---- -
{{MDNSidebar}}

Щоб редагувати вміст у MDN, вам потрібен профіль MDN. Вам не потрібен профіль, якщо ви хочете лише читати і знайти документи MDN. Цей посібник допоможе вам налаштувати профіль MDN.

- -
-
Чому в MDN потрібна моя електронна адреса?
-
-Вашу електронну адресу використовують для відновлення облікового запису та, якщо потрібно, адміністратори MDN, щоб зв'язатися з вами про ваш обліковий запис або вашу активність на сайті.
-
-Крім того, ви можете зареєструватися для отримання сповіщень (як от коли конкретні сторінки змінюються) і повідомлення (наприклад, якщо ви вирішите приєднатися до нашої бета-тестової групи, ви можете отримувати електронні листи про нові функції, які потребують тестування).
-
-Ваша електронна адреса ніколи не відображається в MDN і буде використовуватися тільки відповідно до нашої політики конфіденційності.
- -
Якщо ви входите в MDN через GitHub, і ви використовуєте електронну адресу "noreply" на GitHub, ви не отримуватимете повідомлення від MDN (включаючи сповіщення, підписавшись на сторінки).
-
-
- -
    -
  1. У верхній частині кожної сторінки MDN ви знайдете кнопку, яка називається Увійти. Наведіть курсор (або натисніть на неї, якщо ви відвідуєте з мобільного пристрою), щоб відобразити список служб автентифікації, які ми підтримуємо для входу в MDN.
  2. -
  3. Виберіть службу, з якою ви ввійдете. На даний момент доступно лише GitHub. Зверніть увагу: якщо ви виберете GitHub, посилання на ваш профіль GitHub буде включено на вашу загальнодоступну сторінку профілю MDN.
  4. -
  5. Дотримуйтесь інструкцій GitHub, щоб підключити свій обліковий запис до MDN.
  6. -
  7. Після того, як служба автентифікації поверне вас до MDN, вам буде запропоновано ввести ім'я користувача та адресу електронної пошти. Ваше ім'я користувача буде відображатися публічно, щоб відмітити вас за виконану вами роботу. Не використовуйте свою електронну адресу як своє ім'я користувача.
  8. -
  9. НатиснітьСтворити свій профіль MDN.
  10. -
  11. Якщо адреса електронної пошти, вказана на кроці 4, не співпадає з вашою службою автентифікації, перевірте свою електронну пошту та натисніть посилання в електронному листі з підтвердженням, яке ми надішлемо вам.
  12. -
- -

Це воно! У вас є обліковий запис MDN, і ви можете відразу редагувати сторінки!

- -

Ви можете натиснути ваше ім'я у верхній частині будь-якої сторінки MDN, щоб переглянути свій загальнодоступний профіль. Звідти ви можете натиснути Редагувати щоб внести зміни або доповнення до вашого профілю.

- -
-

Нові імена користувачів не можуть містити пробіли або символ "@". Пам'ятайте, що ваше ім'я користувача буде відображатися публічно, щоб відзначити виконану вами роботу.

-
diff --git a/files/uk/orphaned/mdn/contribute/howto/do_an_editorial_review/index.html b/files/uk/orphaned/mdn/contribute/howto/do_an_editorial_review/index.html deleted file mode 100644 index c5c9dc5ea5..0000000000 --- a/files/uk/orphaned/mdn/contribute/howto/do_an_editorial_review/index.html +++ /dev/null @@ -1,65 +0,0 @@ ---- -title: Як робити редакційний огляд -slug: orphaned/MDN/Contribute/Howto/Do_an_editorial_review -tags: - - MDN Meta - - Документація - - Путівник - - Редакційний огляд -translation_of: MDN/Contribute/Howto/Do_an_editorial_review -original_slug: MDN/Contribute/Howto/Do_an_editorial_review ---- -
{{MDNSidebar}}
- -
{{IncludeSubnav("/uk/docs/MDN")}}
- -

Редакційний огляд полягає у виправленні одруків, помилок граматики й правопису, слововживання або фразеології. Не всі, хто творить MDN, є фахівцями мовознавства, та попри це вони можуть робити надзвичайно важливий змістовний внесок до статей, що відтак потребують перевірки на охайність та редактури. Саме це й має на меті редакційний огляд.

- -

Ця стаття пояснює, як здійснювати редакційний огляд, щоб забезпечити охайність, точність та зрозумілість вмісту MDN.

- -
-
В чому полягає задача?
-
Перевірка на охайність та редактура статей, що відповідним чином позначені.
-
- -
-
Де саме це треба робити?
-
В окремих статтях, що позначені як такі, що потребують редакційного огляду.
-
- -
-
Які знання є необхідними для виконання цієї задачі?
-
Належне знання граматики й правопису. Ви маєте пересвідчитися, що текст викладено зрозуміло та недвозначно, що він відповідає чинним граматиці й правопису, а також настановам Путівника зі стилю MDN.
-
- -
-
Які кроки задля цього потрібно зробити?
-
-
    -
  1. Оберіть статтю для перевірки: -
      -
    1. Відкрийте перелік статей, що потребують редакційної перевірки. Це список сторінок, що мають відповідні позначки.
    2. -
    3. Клацніть на посилання, щоб відкрити відповідну статтю.
      - Заувага: цей перелік оновлюється автоматично, але нечасто, тож він може містити деякі статті, що вже не потребують перевірки. Якщо обрана вами стаття не містить відповідного повідомлення, лишіть її та оберіть іншу.
    4. -
    -
  2. -
  3. Перечитайте статтю, звертаючи увагу на можливі одруки, помилки правопису, граматики та слововживання. Можете обрати іншу статтю, якщо обрана вам з будь-яких причин не до вподоби.
  4. -
  5. Якщо жодної помилки немає, не потрібно відкривати редактор статті, щоб прибрати позначку про необхідність огляду. Натомість зверніться до меню «швидкий огляд» по лівий бік статті:
    -
  6. -
  7. Приберіть відповідну позначку та натисніть Зберегти.
  8. -
  9. Якщо ви знайшли помилки, які слід виправити: -
      -
    1. Відкрийте редактор MDN, натиснувши кнопку {{FontAwesomeIcon("icon-pencil")}} Редагувати на сторінці згори.
    2. -
    3. Виправте знайдені одруки, пунктуацію та слововживання. Щоб допомогти, вам не конче потрібно виправити все. Проте не забудьте лишити належний коментар до редакції, якщо ви не цілком певні, що виконали вичерпний огляд усієї статті.
    4. -
    5. Лишіть коментар до редакції наприкінці сторінки — щось на кшталт «Редакційний огляд: виправлено одруки, граматичні помилки та правопис». Це допоможе іншим членам спільноти дізнатись, що ви зробили й нащо.
    6. -
    7. Приберіть позначку Редакційна під заголовком Потрібна перевірка? — це розташовано просто над розділом Коментар до редакції.
    8. -
    9. Натисніть кнопку {{FontAwesomeIcon("icon-check")}} Оприлюднити.
    10. -
    -
  10. -
- -
-

Заувага: Внесені вами зміни можуть не з'явитися одразу після збереження — подекуди їх обробка може тривати деякий час.

-
-
-
diff --git a/files/uk/orphaned/mdn/contribute/howto/set_the_summary_for_a_page/index.html b/files/uk/orphaned/mdn/contribute/howto/set_the_summary_for_a_page/index.html deleted file mode 100644 index 49ee948e9e..0000000000 --- a/files/uk/orphaned/mdn/contribute/howto/set_the_summary_for_a_page/index.html +++ /dev/null @@ -1,48 +0,0 @@ ---- -title: Як зробити опис сторінки -slug: orphaned/MDN/Contribute/Howto/Set_the_summary_for_a_page -tags: - - MDN Meta - - Посібник - - Як -translation_of: MDN/Contribute/Howto/Set_the_summary_for_a_page -original_slug: MDN/Contribute/Howto/Set_the_summary_for_a_page ---- -
{{MDNSidebar}}

Ви можете створити опис сторінки на MDN, які будуть використані у різний спосіб, у тому числі в результатах пошукової системи, на інших сторінках MDN, таких як актуальні цільові сторінки та підказки. Це має бути текст, який має сенс як в змісті сторінки, так і при відображенні в інших контекстах, без решти вмісту сторінки.

- -

Опис має бути чітко визначено на сторінці. Якщо це не чітко визначено, то зазвичай використовується перше речення, яке не завжди є найкращим текстом для цієї мети.

- -
-
У чому полягає завдання?
-
Позначення тексту в межах сторінки, який можна використати як його опис в інших контекстах; це завдання може включати в себе написання відповідного тексту, якщо це необхідно.
-
Де це потрібно зробити?
-
На сторінках, які не мають опису або не дуже чудовий опис.
-
Що потрібно знати аби виконати завдання?
-
Спроможність використання редактора MDN; хороші навички англійського письма; достатнє знайомство з темою сторінки, щоб написати гарне резюме.
-
Як це зробити покроково?
-
-
    -
  1. Виберіть сторінку, для якої потрібно створити опис: -
      -
    1. На сторінці статусу документації MDN, натисніть на посилання під Секціями для теми, про яку ви щось знаєте (наприклад, HTML):
      -
    2. -
    3. На сторінці стану документації теми натисніть заголовок Сторінки в таблиці Описи. Це приведе вас до переліку всіх сторінок розділу цієї теми; він показує посилання на сторінки в лівій колонці, та на теги та описи у правій колонці:
      -
    4. -
    5. Виберіть сторінку, на якій відсутній або поганий опис:
      -
    6. -
    7. Натисність на посилання аби перейти на сторінку.
    8. -
    -
  2. -
  3. Натисніть Редагувати, щоб відкрити цю сторінку у редакторі MDN.
  4. -
  5. Шукайте одне-два речення, котрі будуть слугувати описом вмісту сторінки. Якщо необхідно, відредагуйте наявний вміст, щоб створити гарний опис або змініть його.
  6. -
  7. Виберіть текст, який слугуватиме описом.
  8. -
  9. У віджеті Стилі на панелі інструментів редактора виберіть SEO Опис. (У джерелі сторінки це створює елемент {{HTMLElement("span")}} з класом "seoSummary" навколо обраного тексту.)
    -
  10. -
  11. Збережіть свої зміни з коментарем до редакції. Коментар є необов'язковими, але ми радимо вам надати його. Це полегшить іншим людям роботу по відслідковуванню змін.
  12. -
- -

 

-
-
- -

 

diff --git a/files/uk/orphaned/web/javascript/reference/global_objects/array/prototype/index.html b/files/uk/orphaned/web/javascript/reference/global_objects/array/prototype/index.html deleted file mode 100644 index 101393b973..0000000000 --- a/files/uk/orphaned/web/javascript/reference/global_objects/array/prototype/index.html +++ /dev/null @@ -1,186 +0,0 @@ ---- -title: Array.prototype -slug: orphaned/Web/JavaScript/Reference/Global_Objects/Array/prototype -tags: - - Array - - JavaScript - - Property - - Джава Скріпт - - Масив - - Поле -translation_of: Web/JavaScript/Reference/Global_Objects/Array/prototype -original_slug: Web/JavaScript/Reference/Global_Objects/Array/prototype ---- -
{{JSRef}}
- -

Поле Array.prototype представляє собою прототип для конструктора {{jsxref("Array")}} і дозволяє вам додавати нові поля і методи до всіх об'єктів-масивів (Array).

- -
// Якщо JavaScript не реалізовує метод first() початково,
-// додайте новий метод, який буде повертати перший елемент масиву.
-
-if (!Array.prototype.first) {
-  Array.prototype.first = function() {
-    return this[0];
-  }
-}
-
- -

Опис

- -

Екземпляри {{jsxref("Array")}} успадковуються від Array.prototype. Як і з всіх конструкторів, ви можете змінити прототип конструктора об'єкта, щоб внести зміни у всі екземпляри {{jsxref("Array")}}. Для прикладу, це використовується для {{Glossary("Polyfill", "polyfilling")}}.

- -

Маловідомий факт: Array.prototype сам є масивом {{jsxref("Array")}}:

- -
Array.isArray(Array.prototype); // true
-
- -

{{js_property_attributes(0, 0, 0)}}

- -

Властивості

- -
-
Array.prototype.constructor
-
Визначає функцію, що створює прототип об'єкта.
-
{{jsxref("Array.prototype.length")}}
-
Відображає кількість елементів в масиві.
-
{{jsxref("Array.@@unscopables", "Array.prototype[@@unscopables]")}}
-
Символ, який містить назви властивостей, які повинні бути виключені з області зв'язування with.
-
- -

Методи

- -

Методи модифікації

- -

Ці методи модифікують масив:

- -
-
{{jsxref("Array.prototype.copyWithin()")}}
-
Копіює послідовність елементів масиву всередині масиву.
-
{{jsxref("Array.prototype.fill()")}}
-
Заповнює всі елементи масиву від початкового індексу до кінцевого статичними значеннями.
-
{{jsxref("Array.prototype.pop()")}}
-
Видаляє та повертає останній елемент масиву.
-
{{jsxref("Array.prototype.push()")}}
-
Додає один чи більше елементів  в кінець масиву та повертає нову довжину масиву.
-
{{jsxref("Array.prototype.reverse()")}}
-
Змінює порядок елементів масиву на протилежний, викорустовуючи той самий масив — перший стає останнім, а останній - першим.
-
{{jsxref("Array.prototype.shift()")}}
-
Видаляє та повертає перший елемент масиву.
-
{{jsxref("Array.prototype.sort()")}}
-
Сортує елементи всередині масиву, та повертає цей масив.
-
{{jsxref("Array.prototype.splice()")}}
-
Добавляє і/або видаляє елементи з масиву.
-
{{jsxref("Array.prototype.unshift()")}}
-
Добавляє один або більше елементів у початок масиву та повертає нову довжину масиву.
-
- -

Методи доступу

- -

Ці методи не модифікують масив та повертають якесь його представлення.

- -
-
{{jsxref("Array.prototype.concat()")}}
-
Повертає новий масив, який складається з цього масиву, об'єднаного з іншим(и) масив(ом/ами) та/або іншими значеннями.
-
{{jsxref("Array.prototype.includes()")}} {{experimental_inline}}
-
Визначає, чи масив містить певний елемент,  повертаючи, відповідно, true або false.
-
{{jsxref("Array.prototype.indexOf()")}}
-
Повертає перший (останній) індекс елемента всередині даного масиву, який дорівнює вказаному значенню, або -1 якщо нічого не було знайдено.
-
{{jsxref("Array.prototype.join()")}}
-
Об'єднує всі елементи масиву у рядок.
-
{{jsxref("Array.prototype.lastIndexOf()")}}
-
Повертає останній (найбільший) індекс елемента всередині даного масиву, який рівний вказаному значенню, або -1 якщо нічого не було знайдено.
-
{{jsxref("Array.prototype.slice()")}}
-
Витягує частину масиву та повертає новий масив.
-
{{jsxref("Array.prototype.toSource()")}} {{non-standard_inline}}
-
Повертає літерал масиву, який відображає вказаний масив; ви можете використовувати це значення для створення нового масиву. Перевизначає метод {{jsxref("Object.prototype.toSource()")}}.
-
{{jsxref("Array.prototype.toString()")}}
-
Повертає рядок, яка відображає даний масив та його елементи. Перевизначає метод {{jsxref("Object.prototype.toString()")}}.
-
{{jsxref("Array.prototype.toLocaleString()")}}
-
Повертає локалізований рядок, яка відображає даний масив та його елементи. Перевизначає метод {{jsxref("Object.prototype.toLocaleString()")}}.
-
- -

Методи  перебору

- -

Декілька методів приймають у якості аргументів функції, які будуть викликані у процесі обробки масиву. Коли ці методи викликаються, довжина поля length вибраного масиву запам'ятовується, і будь-які елементи, додані поза цією довжиною зсередини функції зворотнього виклику (callback), не будуть обходитися. Інші зміни до масиву (встановлення значення елементу або його видалення) можуть впливати на результат операції, якщо метод після цього звертається до зміненого елемента. Хоча специфічна поведінка цих методів у даних випадках є добре визначеною, не варто на неї надто покладатися, щоб не заплутати тих, хто може прочитати ваш код. Якщо вам необхідно змінити даний масив, краще скопіюйте його у новий масив.

- -
-
{{jsxref("Array.prototype.entries()")}}
-
Повертає новий об'єкт Array Iterator, який містить пари ключ/значення для кожного індекса в даному масиві.
-
{{jsxref("Array.prototype.every()")}}
-
Повертає true, якщо кожен елемент у цьому масиві виконує умови переданої тест-функції.
-
{{jsxref("Array.prototype.filter()")}}
-
Створює новий масив зі всіма елементами цього масиву, для яких передана функція фільтрації повертае true.
-
{{jsxref("Array.prototype.find()")}}
-
Повертає знайдене у масиві значення, якщо елемент у цьому масиві виконує умови переданої тест-функції або undefined якщо елемента не знайдено.
-
{{jsxref("Array.prototype.findIndex()")}}
-
Повертає знайдений у масиві індекс, якщо елемент у цьому масиві виконує умови переданої тест-функції або -1 якщо елемента не знайдено.
-
{{jsxref("Array.prototype.forEach()")}}
-
Викликає функцію для кожного елементу масиву.
-
{{jsxref("Array.prototype.keys()")}}
-
Повертає новий об'єкт Array Iterator, який містить ключі для кожного індекса в даному масиві.
-
{{jsxref("Array.prototype.map()")}}
-
Створює новий масив з результатами виклику на кожному елементі масиву переданої функції.
-
{{jsxref("Array.prototype.reduce()")}}
-
Застосовує функцію над акумулятором та кожним значенням даного масиву (зліва направо), щоб скоротити його до єдиного значення.
-
{{jsxref("Array.prototype.reduceRight()")}}
-
Застосовує функцію над акумулятором та кожним значенням даного масиву (справа наліво), щоб скоротити його до єдиного значення.
-
{{jsxref("Array.prototype.some()")}}
-
Повертає true, якщо принаймні один елемент у цьому масиві виконує умови переданої тест-функції.
-
{{jsxref("Array.prototype.values()")}}
-
Повертає новий об'єкт Array Iterator, який містить значення для кожного індекса в масиві.
-
{{jsxref("Array.prototype.@@iterator()", "Array.prototype[@@iterator]()")}}
-
Повертає новий об'єкт Array Iterator, який містить значення для кожного індекса в масиві.
-
- -

Загальні методи (нестандартні)

- -

Багато методів на JavaScript об'єкті Array спроектовані таким чином, щоб їх можна було застосувати на всіх об'ектах, які "виглядають як" масиви. Таким чином, вони можуть бути використані на будь-якому об'єкті, у якого є поле length, а також тих об'єктах, доступ до яких можна отримати завдяки числовим назвам полів (як з індексацією масиву array[5]). Деякі методи, такі як {{jsxref("Array.join", "join")}}, лише зчитують довжину (length) і числові поля об'єктів, на яких вони викликаються. Інші, такі як {{jsxref("Array.reverse", "reverse")}}, вимагають, щоб числові поля об'єкту та поле length були доступні для редагування; тому ці методи можуть не викликатися на об'єктах типу {{jsxref("String")}}, який не дозволяє редагувати його поле length або синтезовані числові поля.

- -

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

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
СпецифікаціяСтатусКоментар
{{SpecName('ES1')}}{{Spec2('ES1')}}Початкове визначення
{{SpecName('ES5.1', '#sec-15.4.3.1', 'Array.prototype')}}{{Spec2('ES5.1')}}
{{SpecName('ES6', '#sec-array.prototype', 'Array.prototype')}}{{Spec2('ES6')}}Додані методи copyWithin(), fill(), entries(), keys(), values(), find(), findIndex().
{{SpecName('ESDraft', '#sec-array.prototype', 'Array.prototype')}}{{Spec2('ESDraft')}}Доданий метод includes().
- -

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

- - - -

{{Compat("javascript.builtins.Array.prototype")}}

- -
- -

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

- - diff --git a/files/uk/orphaned/web/javascript/reference/global_objects/asyncfunction/prototype/index.html b/files/uk/orphaned/web/javascript/reference/global_objects/asyncfunction/prototype/index.html deleted file mode 100644 index 6ac139b627..0000000000 --- a/files/uk/orphaned/web/javascript/reference/global_objects/asyncfunction/prototype/index.html +++ /dev/null @@ -1,60 +0,0 @@ ---- -title: AsyncFunction.prototype -slug: orphaned/Web/JavaScript/Reference/Global_Objects/AsyncFunction/prototype -tags: - - JavaScript - - Властивість - - прототип -translation_of: Web/JavaScript/Reference/Global_Objects/AsyncFunction/prototype -original_slug: Web/JavaScript/Reference/Global_Objects/AsyncFunction/prototype ---- -
{{JSRef}}
- -

Властивість AsyncFunction.prototype відображає прототип об'єкта {{jsxref("AsyncFunction")}}.

- -

Опис

- -

Об'єкти {{jsxref("AsyncFunction")}} успадковуються від AsyncFunction.prototype. AsyncFunction.prototype не може бути змінений.

- -

Властивості

- -
-
AsyncFunction.constructor
-
Початковим значенням є {{jsxref("AsyncFunction")}}.
-
AsyncFunction.prototype[@@toStringTag]
-
Вертає "AsyncFunction".
-
- -

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

- - - - - - - - - - - - - - - - -
СпецифікаціяСтатусКоментар
{{SpecName('ESDraft', '#sec-async-function-constructor-prototype', 'AsyncFunction.prototype')}}{{Spec2('ESDraft')}}Початкове визначення у ES2017.
- -

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

- -
- - -

{{Compat("javascript.builtins.AsyncFunction.prototype")}}

-
- -

Див. також

- - diff --git a/files/uk/tools/index.html b/files/uk/tools/index.html deleted file mode 100644 index 20a9763e7e..0000000000 --- a/files/uk/tools/index.html +++ /dev/null @@ -1,310 +0,0 @@ ---- -title: Firefox інструменти для розробників -slug: Tools -translation_of: Tools -original_slug: Інструменти ---- -

{{ToolsSidebar}}

- -

Переглядайте, редагуйте та налагоджуйте HTML, CSS, JavaScript на десктопах та на мобільних пристроях. Щоб отримати останні оновлення інструментів розробника, завантажте Firefox Developer Edition.

- -

Якщо ви шукаєте інформацію про використання інструментів веб-розробників, доступних у Firefox, ви підійшли до потрібного місця - на цій сторінці ви знайдете посилання на детальну інформацію про всі основні інструменти та додаткові інструменти та додаткову інформацію, як, наприклад, підключити та налаштувати Firefox для Android, як розширити devtools та як налагодити браузер у цілому.

- -

Будь ласка, ознайомтеся з посиланнями, що знаходяться на бічній панелі, та далі вниз на сторінці. Якщо у вас є відгуки або запитання до розробників, надсилайте нам повідомлення в нашому списку розсилки або на каналі IRC (дивіться посилання на спільноту внизу сторінки) Якщо у вас є будь-які відгуки або запитання конкретно щодо документації, MDN discourse - це гарне місце для публікації.

- -

Примітка: Якщо ви тільки починаєте розробку веб-сторінок та використовуєте інструменти для розробників, то наші документи з вивчення веб-розробки допоможуть вам — дивіться Початок роботи з Інтернетом та Що таке інструменти для розробників в браузері? для гарного старту.

- -

Основні інструменти

- -

Ви можете відкрити Firefox Developer Tools (Інструменти для розробників) із меню, обравши Tools > Web Developer > Toggle Tools або використовуючи комбінацію клавіш  Ctrl + Shift + I або F12 на Windows та Linux, або Cmd + Opt + I на macOS.

- -

Меню еліпсиса в правій частині Developer Tools, містить кілька команд, які дозволяють виконувати дії або змінювати налаштування інструменту.

- -

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

Інспектор сторінки

- -

The all-new Inspector panel in Firefox 57.

- -

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

-
- -
-

Веб-консоль

- -

The all-new Console in Firefox 57.

- -

Переглядайте повідомлення, зареєстровані веб-сторінкою, та взаємодійте зі сторінкою за допомогою JavaScript.

-
-
- -
-
-

JavaScript Налагоджувач

- -

The all-new Firefox 57 Debugger.html

- -

Зупиніть, перегляньте, вивчіть та змініть JavaScript, який працює на сторінці.

-
- -
-

Мережевий монітор

- -

The Network panel in Firefox 57 DevTools.

- -

Дивіться мережеві запити, зроблені під час завантаження сторінки.

-
-
- -
-
-

Інструменти продуктивності

- -

Performance Tools in Firefox 57 Developer Tools

- -

Проаналізуйте загальну чуйність, ефективність роботи JavaScript та компонування вашого сайту.

-
- -
-

Режим адаптивного дизайну

- -

Responsive Design mode in Firefox 57.

- -

Подивіться, як буде виглядати ваш веб-сайт або додаток на різних пристроях та типах мережі.

-
-
- -
-
-

Інспектор доступності

- -

Performance Tools in Firefox 57 Developer Tools

- -

Забезпечує засіб доступу до дерева доступності сторінки, що дозволяє перевірити, чого немає або потребує іншої уваги.

-
-
- -
-

Примітка: Колективний термін для інтерфейсу, всередині якого живе DevTools, - це Панель інструментів.

-
- -

- -
-
-

Створення

- -

Інструменти для створення веб-сайтів і веб-додатків.

- -
-
Scratchpad
-
Текстовий редактор, вбудований у Firefox, який дозволяє писати та виконувати JavaScript.
-
Style Editor
-
Переглядайте та редагуйте стилі CSS для поточної сторінки.
-
Shader EditorMobile
-
Перегляд і редагування вершинних і фрагментних шейдерів, які використовуються WebGL.
-
Web Audio Editor
-
Вивчіть графік звукових вузлів у звуковому контексті та змініть їх параметри.
-
-
- -
-

Вивчення та налагодження

- -

Examine, explore, and debug websites and web apps.

- -
-
Панель інструментів (Toolbox)
-
The Toolbox provides a single home for most of the developer tools that are built into Firefox.
-
Консоль (Console)
-
Переглядайте повідомлення, зареєстровані веб-сторінкою, і взаємодійте зі сторінкою за допомогою JavaScript.
-
Інспектор сторінки (Page Inspector)
-
Переглядайте та змінюйте сторінку в HTML і CSS.
-
Зневаджувач JavaScript (Debugger)
-
Зупиніть, пройдіть, вивчіть і змініть JavaScript, запущений на сторінці.
-
Монітор мережі (Network Monitor)
-
Переглядайте мережеві запити, зроблені під час завантаження сторінки.
-
Інспектор сховища (Storage Inspector)
-
Перевірте файли cookie, локальне сховище, індексованеБД і сховище сеансу, присутнє на сторінці.
-
Інспектор DOM і стилю (DOM Inspector)
-
Inspect the page's DOM properties, functions, etc.
-
Developer Toolbar
-
Інтерфейс командного рядка для інструментів розробника.
-
Remote Debugging
-
Підключіть інструменти розробника до Firefox з віддаленого комп'ютера.
-
Eyedropper
-
Виберіть колір на сторінці.
-
about:debugging
-
Інформаційна панель для налагодження додаткових компонентів і робочих
-
Working with iframes
-
Як націлити певний фрейм.
-
-
-
- -
-
-
-

Мобільний

- -

Інструменти для мобільного розвитку.

- -
-
Responsive Design Mode
-
Перегляньте, як ваш веб-сайт або програма виглядатимуть на різних розмірах екрана, не змінюючи розмірів вікна веб-переглядача.
-
App Manager
-
Менеджер програм замінено на WebIDE.
-
WebIDE
-
Створювати, редагувати, запускати та налагоджувати веб-програми за допомогою Firefox OS Simulator або реальний пристрій Firefox OS. WebIDE є заміною для Менеджера програм, доступного від Firefox 33 і далі.
-
Firefox OS Simulator
-
Запускайте та налагоджуйте додаток Firefox OS на робочому столі, не потребуючи реального пристрою Firefox OS.
-
Debugging on Firefox for Android
-
Підключіть інструменти розробника до Firefox для Android.
-
Debugging Firefox for Android with WebIDE
-
Для робочого столу Firefox 36+ / Android Firefox 35+ існує більш простий процес.
-
Valence
-
Підключіть інструменти розробника до Chrome на Android і Safari на iOS
-
-
- -
-

Продуктивність

- -

Діагностика та усунення проблем із продуктивністю.

- -
-
Performance Tool
-
Проаналізуйте загальну чутливість вашого сайту, JavaScript і продуктивність макета.
-
Memory
-
Визначте, які об'єкти зберігають пам'ять.
-
Frame rate graph
-
Перегляньте частоту кадрів для вашого сайту.
-
Waterfall
-
Визначте, що робить браузер, коли він запускає ваш сайт.
-
Call Tree
-
З'ясуйте, де ваш код JavaScript витрачає свій час.
-
Flame Chart
-
Подивіться, які функції знаходяться в стеку протягом процесу виконання.
-
Paint Flashing Tool
-
Виділяє частини сторінки, які перефарбовані у відповідь на події.
-
Reflow Event Logging
-
Див. Події перекомпонування в веб-консолі.
-
Network Performance
-
Подивіться, як довго завантажуються частини вашого сайту.
-
-
-
- -
-
-
-

Debugging the browser

- -

За замовчуванням інструменти розробника додаються до веб-сторінки або веб-програми. Але ви також можете підключити їх до браузера в цілому. Це корисно для розробки браузера та додаткових компонентів.

- -
-
Browser Console
-
Переглядайте повідомлення, зареєстровані самим браузером та додатками, а також запустіть JavaScript-код у сфері браузера.
-
Browser Toolbox
-
Приєднайте Інструменти розробника до самого веб-переглядача.
-
-
- -
-

Розширення devtools

- -

Інструменти розробника розроблені для розширення. Додатки Firefox можуть отримати доступ до інструментів розробників і компонентів, які вони використовують для розширення існуючих інструментів і додавання нових інструментів. За допомогою віддаленого протоколу налагодження ви можете реалізовувати власні клієнти та сервери відлагодження, дозволяючи налагоджувати веб-сайти, використовуючи власні інструменти або налагоджувати різні цілі за допомогою інструментів Firefox.

- -
-
Add a new panel to the devtools
-
Напишіть додатковий компонент, який додасть нову панель до панелі інструментів.
-
Remote Debugging Protocol
-
Протокол, який використовується для підключення інструментів для розробників Firefox до цільової налагодження, наприклад екземпляра Firefox або пристрою Firefox OS.
-
Source Editor
-
Редактор коду, вбудований у Firefox, який може бути вбудований у ваш додаток.
-
The Debugger Interface
-
API, який дозволяє коду JavaScript спостерігати за виконанням іншого коду JavaScript. Інструменти розробників Firefox використовують цей API для реалізації відладчика JavaScript.
-
Web Console custom output
-
Як розширити і налаштувати висновок Web Console та Browser Console.
-
Example devtools add-ons
-
Використовуйте ці приклади, щоб зрозуміти, як реалізувати надбудову devtools.
-
-
-
- -
-

Внесок

- -

Якщо ви хочете допомогти поліпшити інструменти розробника, є кілька ресурсів, щоб почати.

- -
-
-
-
Get Involved
-
Вікі-сторінку Mozilla, що пояснює, як взяти участь.
-
-
- -
-
-
firefox-dev.tools
-
Інструмент, який допомагає знайти помилки для роботи.
-
-
-
- -
-

Більше ресурсів

- -

У цьому розділі перелічено ресурси, які наразі не підтримуються командою розробників інструментів розробників Mozilla, але які широко використовуються веб-розробниками. Ми включили декілька додатків Firefox у цей список, але для повного списку див “Web Development” category on addons.mozilla.org.

- -
-
-
-
Firebug
-
Дуже популярний і потужний інструмент веб-розробки, включаючи відладчик JavaScript, переглядач і редактор HTML і CSS, а також мережний монітор.
-
DOM Inspector
-
Перевірте, перегляньте та відредагуйте DOM веб-сторінок або вікон XUL.
-
Web Developer
-
Додає до браузера меню та панель інструментів з різними інструментами веб-розробника.
-
-
- -
-
-
Webmaker Tools
-
Набір інструментів, розроблених Mozilla, спрямований на людей, які починають роботу з веб-розробкою.
-
W3C Validators
-
Веб-сайт W3C містить ряд інструментів для перевірки правильності вашого веб-сайту, включаючи його HTML та CSS.
-
ESLint
-
JavaScript linting and code analysis tool.
-
-
-
diff --git a/files/uk/tools/network_monitor/index.html b/files/uk/tools/network_monitor/index.html deleted file mode 100644 index a9d84c2947..0000000000 --- a/files/uk/tools/network_monitor/index.html +++ /dev/null @@ -1,54 +0,0 @@ ---- -title: Монітор мережі -slug: Tools/Network_Monitor -translation_of: Tools/Network_Monitor -original_slug: Інструменти/Network_Monitor ---- -
{{ToolsSidebar}}
- -
Монітор мережі показує всі мережні запити Firefox (наприклад, коли він завантажує сторінку або виконується XMLHttpRequests), тривалість і деталі кожного запиту.
- -

Відкривання Монітору мережі

- -

Є декілька способів відкрити Монітор мережі:

- - - -

У нижній частині вікна браузера з'явиться Монітор мережі. Щоб побачити запити, перезавантажте сторінку:

- -

- -

Поки панель інструментів відкрита, Монітор мережі записує мережні запити, навіть якщо він сам не вибраний. Це значить, що Ви можете почати налагодження сторінки, наприклад, у Веб-консолі, а потім перейти до Монітора мережі, щоб побачити мережну активність без перезавантаження сторінки.

- -

Огляд користувацького інтерфейсу (UI)

- -

Користувацький інтерфейс складається з чотирьох основних частин :

- - - -

- - - -

Performance analysis view

- -

Робота з Монітором мережі

- -

Наступні статті охоплюють різні аспекти використання Монітора мережі:

- - diff --git a/files/uk/tools/network_monitor/performance_analysis/index.html b/files/uk/tools/network_monitor/performance_analysis/index.html deleted file mode 100644 index b9c6e4dc65..0000000000 --- a/files/uk/tools/network_monitor/performance_analysis/index.html +++ /dev/null @@ -1,37 +0,0 @@ ---- -title: Аналіз швидкодії -slug: Tools/Network_Monitor/Performance_Analysis -translation_of: Tools/Network_Monitor/Performance_Analysis -original_slug: Інструменти/Network_Monitor/Performance_Analysis ---- -

{{ToolsSidebar}}

- -

Монітор мережі містить інструмент Аналізу швидкодії, який допоможе Вам показати, скільки часу необхідно потратити браузеру для завантаження різних частин Вашого сайту.

- -

Використання інструменту Аналізу швидкодії

- -

Для запуску інструменту Аналізу швидкодії, натисніть значок секундоміра на панелі інструментів.

- -

(Крім того, якщо Ви тільки що відкрили Монітор мережі, і він ще не заповнений списком запитів, у головному вікні з'явиться значок секундоміра.)

- -

Після цього Монітор мережі завантажує сайт двічі: один раз з пустим кешем браузера і один раз із запущеним кешем браузера. Це імітує роботу першого разу, коли користувач відвідує ваш сайт, і наступні відвідування. Інструмент відображає результати для кожного запуску поруч, або вертикально, якщо вікно веб-переглядача звужене:

- -

- -

Результати для кожного виконання підсумовуються в таблиці та круговій діаграмі. Таблиці групують ресурси за типом і показують загальний розмір кожного ресурсу і загальний час, необхідний для їх завантаження. Супровідна до таблиць кругова діаграма показує відносний розмір кожного типу ресурсу.

- -

Щоб повернутися до списку мережних запитів Монітору мережі натисніть кнопку "Назад", що знаходиться ліворуч.

- -

Якщо натиснути на фрагмент "пирога", Ви перейдете до Монітора мережі для цього запуску, а фільтр автоматично буде застосовано для перегляду лише цього типу ресурсу.

- -

Можливості Монітору мережі

- -

У наступних статтях розглядаються різні аспекти використання Монітору мережі :

- - diff --git a/files/uk/tools/network_monitor/recording/index.html b/files/uk/tools/network_monitor/recording/index.html deleted file mode 100644 index 5cab741995..0000000000 --- a/files/uk/tools/network_monitor/recording/index.html +++ /dev/null @@ -1,33 +0,0 @@ ---- -title: Записування мережного трафіку -slug: Tools/Network_Monitor/recording -translation_of: Tools/Network_Monitor/recording -original_slug: Інструменти/Network_Monitor/recording ---- -

{{ToolsSidebar}}

- -

Можна призупинити та відновити моніторинг мережного трафіку за допомогою кнопки паузи.

- -

Призупинення та продожвення запису журналу мережі

- -

У Монітора мережі є кнопка, яка призупиняє та відновлює запис мережного трафіку поточної сторінки. Це корисно в ситуаціях, коли, наприклад, Ви намагаєтеся отримати стабільний вигляд сторінки для цілей налагодження, але за нормальних обставин список продовжує наповнюватися внаслідок  постійних мережних запитів. Кнопка паузи дозволяє переглядати певний знімок.

- -

Цю кнопку можна знайти в лівій частині головної панелі інструментів Монітору мережі. Вона виглядає як типова кнопка паузи .

- -

Ви можете побачити її тут у контексті:

- -

- -

Натиснувши цю кнопку, вона змінюється на піктограму відтворення. Продовжити запис мережного трафіку можна шляхом повторного її натискання.

- -

Можливості Монітору мережі

- -

У наступних статтях розглядаються різні аспекти використання Монітору мережі:

- - diff --git a/files/uk/tools/network_monitor/request_details/index.html b/files/uk/tools/network_monitor/request_details/index.html deleted file mode 100644 index 09440d641b..0000000000 --- a/files/uk/tools/network_monitor/request_details/index.html +++ /dev/null @@ -1,189 +0,0 @@ ---- -title: Подробиці мережних запитів -slug: Tools/Network_Monitor/request_details -translation_of: Tools/Network_Monitor/request_details -original_slug: Інструменти/Network_Monitor/request_details ---- -

{{ToolsSidebar}}

- -

Панель подробиць мережних запитів викликається при виборі (натисканні) мережного запиту у списку. Ця панель надає більш детальну інформацію про запит.

- -

Подробиці мережних запитів

- -

Натискання на рядку відображає нову панель у правій частині Монітора мережі, яка надає більш детальну інформацію про запит.

- -

- -

Вкладки у верхній частині цієї області дозволяють переключатися між наступними сторінками:

- - - -

Натискання крайньої правої піктограми на панелі інструментів  ховає панель подробиць.

- -

Заголовки (Headers)

- -

На цій вкладці наведено основну інформацію про запит:

- -

- -

Ця інформація містить:

- - - -

Ви можете відфільтрувати відображені заголовки:

- -

- -

Поруч із кожним заголовком у рядку коду статусу з'явиться піктограма знаку питання - це посилання на додаткову інформацію про цей код статусу в документації MDN заголовків HTTP.

- -

Куки (Cookies)

- -

На цій вкладці наведено повну інформацію про всі файли cookie, надіслані разом із запитом або відповіддю:

- -

- -

Як і у заголовках, тут можна відфільтрувати список файлів куків, що потрібно показати. Відображається повний список атрибутів кука (див. Наведений нижче знімок екрана з прикладів cookie Response з додатковими атрибутами).

- -

cookies panel in firefox devtools network monitor, showing a number of cookie attributes including samesite

- -

Атрибут samesite доступний починаючи з Firefox 62 ({{bug("1452715")}}).

- -

Параметри (Params)

- -

На цій вкладці відображаються параметри GET і дані POST запиту:

- -

- -

Відповідь (Response)

- -

Повний зміст відповіді. Якщо відповідь - HTML, JS або CSS, вона буде показана як текст:

- -

- -

Якщо відповідь у форматі JSON, вона буде відображатися як об'єкт:

- -

- -

Якщо відповідь - це зображення, на вкладці відображається попередній перегляд:

- -

- -

Кеш (Cache)

- -

Якщо відповідь буде кешованою (тобто 304), на вкладці Кеш буде показано відомості про цей кешований ресурс.

- -

- -

Ці деталі містять:

- - - -

HTML перегляд (preview)

- -

Якщо відповідь є HTML, на вкладці "Відповідь" ("Response"), вище "Корисного навантаження на відповідь" (response payload), з'являється попередній візуальний перегляд HTML.

- -

- -

Розклад (Timings)

- -

Вкладка «Розклад» (Timings) розбиває мережний запит на наступний набір етапів, означених у специфікації Архіву HTTP :

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
НазваОпис
Заблоковано (Blocked) -

Час, проведений в черзі в очікуванні мережного підключення.

- -

Браузер накладає обмеження на кількість одночасних з'єднань, які можуть бути зроблені до одного серверу. Типово, у Firefox це значення рівне 6, але його можна змінити за допомогою налаштувань  network.http.max-persistent-connections-per-server . Якщо використовуються всі підключення, браузер не може завантажувати більше ресурсів, доки з'єднання не буде вивільнено.

-
Розв'язання DNS (DNS resolution)Час, що потребувався для розв'язання імені хоста.
З'єднання (Connecting)Час, що потребувався для створення з'єднання TCP.
Надсилання (Sending)Час, що потребувався для передачі HTTP-запиту на сервер.
Очікування (Waiting)Очікування відповіді від сервера.
Одержання (Receiving)Час, що потребувався для читання всієї відповіді від сервера (або кешу).
- -

Ця вкладка   представляє більш детальний, анотований, перегляд смуги часу для цього запиту, що показує, як загальний час очікування розділяється на різні етапи:

- -

- -

Безпека (Security)

- -

Якщо сайт обслуговується через HTTPS, Ви отримуєте додаткову вкладку під назвою "Безпека" ("Security"). Вона містить відомості про захищене з'єднання, що використовується, включно з назвою протоколу, набору шифрів і деталями сертифікату:

- -

- -

На вкладці "Безпека" відображається попередження про слабкі місця безпеки. Наразі він попереджає про два слабкі місця:

- -
    -
  1. Використання SSLv3 замість TLS
  2. -
  3. Використання шифру RC4
  4. -
- -

- -

Трасування стека (Stack trace)

- -

На цій вкладці відображається трасування стеків для відповідей, які мають стекові сліди.

- -

- -

Можливості Монітору мережі

- -

У наступних статтях розглядаються різні аспекти використання Монітору мережі:

- - diff --git a/files/uk/tools/network_monitor/request_list/index.html b/files/uk/tools/network_monitor/request_list/index.html deleted file mode 100644 index 7c39dc0e95..0000000000 --- a/files/uk/tools/network_monitor/request_list/index.html +++ /dev/null @@ -1,346 +0,0 @@ ---- -title: Список мережних запитів -slug: Tools/Network_Monitor/request_list -translation_of: Tools/Network_Monitor/request_list -original_slug: Інструменти/Network_Monitor/request_list ---- -

{{ToolsSidebar}}

- -

Тут відображається список всіх запитів мережі, зроблених під час завантаження сторінки.

- -

Список мережних запитів

- -

Типово, Монітор мережі показує список всіх мережних запитів, зроблених під час завантаження сторінки. Кожен запит відображається у своєму рядку:

- -

Типово, кожного разу, як Ви переходите до нової сторінки або перезавантажуєте поточну сторінку, мережний монітор очищається. Ви можете змінити цю поведінку, встановивши прапорець "Постійне журналювання" ("Enable persistent logs") в Налаштуваннях.

- -

Стовпці для мережних запитів

- -

Ви можете показувати/приховувати потрібні стовпці шляхом їх вибору в контекстному меню (викликається правою кнопкою миші над заголовком) . Пункт контекстного меню "Скинути стовпці" ("Reset Columns") призначений для скидання переліку стовпців в початкову конфігурацію. Нижче наведено перелік усіх доступних стовпців:

- - - -

Кожен стовпець панелі інструментів у верхній частині має мітку, натискання на якій за даним стовпцем сортуються всі запити.

- -

Ескізи зображень

- -

Якщо запит стосується зображення, наведення на назву файлу показує в підказці попередній перегляд зображення :

- -

- -

Піктограми безпеки

- -

У стовпці "Домен" Монітору мережі відображаються піктограми:

- -

- -

Це надає додаткову інформацію про стан безпеки запиту: 

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ПіктограмаЗначення
HTTPS
Слабкий HTTPS (наприклад, було використано слабке шифрування)
Помилковий HTTPS (наприклад, сертифікат є недійсним)
HTTP
Localhost
Вказує на те, що URL належить до відомого трекера, тому буде заблокований, якщо ввімкнено блокування вмісту.
- -

Для слабких і помилкових запитів HTTPS більш детальну інформацію про проблему можна побачити у  вкладці "Безпека".

- -

Стовпець "Причина"

- -

У стовпці "Причина" вказано причину запиту. Зазвичай це значення досить очевидне, і воно корелюється зі стовпцем "Тип". Найпоширенішими значеннями є:

- - - -

Шкала часу (Timeline)

- -

У списку запитів також відображається шкала часу для різних частин кожного запиту.

- -

- -

Кожній часовій шкалі надається горизонтальне положення у своєму рядку відносно інших мережних запитів. Таким чином, можна побачити загальний час, необхідний для завантаження сторінки. Більш детальну інформацію про кольорове кодування, що використовується тут, див. у розділі Часові діаграми.

- -

Починаючи з Firefox 45, шкала часу також містить дві вертикальні лінії:

- - - -

Фільтрація запитів

- -

Можна фільтрувати запити за типом вмісту, за типом запитів XMLHttpRequests або WebSocket, за URL, або за властивостями запиту. 

- -

Фільтрація за типом вмісту

- -

Щоб відфільтрувати за типом вмісту, використовуйте відповідні кнопки з панелі інструментів.

- -

Фільтрація XHR

- -

Для відображення виключно запитів {{Glossary("XHR (XMLHttpRequest)", "XHR")}}, використовується кнопка "XHR" з панелі інструментів.

- -

Фільтрація WebSockets

- -

Для відображення виключно з'єднань WebSocket, використовується кнопка "WS" з панелі інструментів.

- -

Крім того, може бути корисним додатковий компонент WebSocket Sniffer. 

- -

Фільтрація за URL

- -

Для фільтрації за URL, використовуйте пошукове поле з панелі інструментів.  Клацніть в межах пошукового поля, або натисніть Ctrl + F (або Cmd + F в Mac),  почніть введення. Список мережних запитів буде відфільтровано для включення лише тих запитів, які містять рядок фільтра в полях "Домен" або "Файл". 

- -

Починаючи з Firefox 45, можна фільтрувати запити, що не містять означені рядки фільтрів, заповнивши запит оператором "-". Наприклад, запит "-google.com" покаже всі запити, що не містять "google.com" у своїй URL-адресі. 

- -

Фільтрація за властивістю

- -

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

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Ключове словоЗначенняПриклад
status-codeПоказує ресурси з вказаним кодом статусу HTTP. status-code:304
methodПоказує ресурси з вказаним методом запиту HTTP.method:post
domainПоказує ресурси, що надходять з вказаного домену.domain:mozilla.org
remote-ipПоказує ресурси, що надходять з сервера зі вказаним IP.remote-ip:63.245.215.53
- remote-ip:[2400:cb00:2048:1::6810:2802]
causeПоказує ресурси, що відповідають вказаному типу причини. Типи можна знайти в описі стовпця "Причина" cause:js
- cause:stylesheet
- cause:img
transferredПоказує ресурси, що мають вказаний, або з близьким до вказаного розмір переданих даних. Як суфікс для кілобайт використовується літера k , мегабайт - m. Наприклад значення 1k еквівалентно 1024.transferred:1k
sizeПоказує ресурси, що мають вказаний розмір (після розпакування) або розмір, близький до вказаного. Як суфікс для кілобайт використовується літера k , мегабайт - m. Наприклад значення 1k еквівалентно 1024.size:2m
larger-than -

Показує ресурси, які перевищують вказаний розмір у байтах. Як суфікс для кілобайт використовується літера k , мегабайт - m. Наприклад значення 1k еквівалентно 1024.

-
larger-than:2000
- -larger-than:4k
mime-typeПоказує ресурси, які відповідають вказаному типу MIME.mime-type:text/html
- mime-type:image/png
- mime-type:application/javascript
isis:cached і is:from-cache показує лише ресурси, що надходять з кешу.
- is:running показує лише ресурси, які зараз передаються.
is:cached
- -is:running
schemeПоказує ресурси, передані за вказаною схемою.scheme:http
has-response-headerПоказує ресурси, які містять вказаний заголовок відповіді HTTP.has-response-header:cache-control
- has-response-header:X-Firefox-Spdy
set-cookie-domainПоказує ресурси, які мають заголовок Set-Cookie з атрибутом Domain, що відповідає вказаному значенню.set-cookie-domain:.mozilla.org
set-cookie-nameПоказує ресурси, які мають заголовок Set-Cookie з ім'ям, що відповідає вказаному значенню.set-cookie-name:_ga
set-cookie-valueПоказує ресурси, які мають заголовок Set-Cookie зі значенням, що відповідає вказаному.set-cookie-value:true
regexpПоказує ресурси, що мають URL, що відповідає вказаному {{Glossary("regular expression")}}.regexp:\d{5}
- regexp:mdn|mozilla
- -

Контекстне меню

- -

Контекстне меню рядка містить наступні пункти:

- - - -

Редагувати і надіслати заново (Edit and Resend)

- -

Відкриває редактор, що дозволяє редагувати метод, URL-адресу, параметри та заголовки для запиту та повторно його надіслати. 

- -

Відкрити в новій вкладці (Open in New Tab)

- -

Відправляє запит у новій вкладці - дуже корисно для налагодження асинхронних запитів.

- -

Копіювати як cURL (Copy as cURL)

- -

Вибір цього пункту меню приводить до копіювання мережного запиту в буфер обміну як команди cURL, після чого можна виконати його з командного рядка. Команда може містити такі параметри:

- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-X [METHOD]Якщо не використовується метод GET та POST
--dataДля параметрів запиту, закодованих URL-адресами
--data-binaryДля багатокомпонентних параметрів запиту
--http/VERSIONЯкщо HTTP не є версією 1.1
-IЯкщо використовується метод HEAD
-H -

По одному для кожного заголовка запиту.

- -

Починаючи з Firefox 34, якщо вказаний заголовок "Accept-Encoding", команда cURL буде містити  --compressed замість -H "Accept-Encoding: gzip, deflate". Це значить, що відповідь буде автоматично розпаковуватися.

-
- -

Копіювати/зберегти все як HAR (Copy/Save All As HAR)

- -

Ці пункти створюють HTTP Archive (HAR) для всіх запитів списку. Формат HAR дозволяє експортувати детальну інформацію про мережні запити. "Копіювати все як HAR" ("Copy All As HAR") копіює дані в буфер обміну. "Зберегти все як HAR"("Save All As HAR") відкриває діалогове вікно, за допомогою якого можна зберегти архів на диск.

- -

У новому випадаючому меню "HAR" також містяться команди "Копіювати все як HAR" та "Зберегти все як HAR", а також пункт "Імпортувати ...".

- -

- -

Можливості Монітору мережі

- -

У наступних статтях розглядаються різні аспекти використання Монітору мережі :

- - diff --git a/files/uk/tools/network_monitor/throttling/index.html b/files/uk/tools/network_monitor/throttling/index.html deleted file mode 100644 index 383803bab9..0000000000 --- a/files/uk/tools/network_monitor/throttling/index.html +++ /dev/null @@ -1,98 +0,0 @@ ---- -title: Обмеження швидкості передачі -slug: Tools/Network_Monitor/Throttling -translation_of: Tools/Network_Monitor/Throttling -original_slug: Інструменти/Network_Monitor/Throttling ---- -

{{ToolsSidebar}}

- -

Монітор мережі дозволяє обмежити швидкість мережі, щоб емулювати різні швидкості з'єднання. Це зроблено з метою приблизної оцінки того, як Ваша програма буде поводитися з різними типами підключень.

- -

Обмеження швидкості передачі (Throttling)

- -

Панель інструментів містить випадаюче меню Throttling, за допомогою якого Ви можете зменшити швидкість мережі, щоб емулювати різні умови. Просто виберіть опцію з меню, і вона буде зберігатися після  перезавантаження.

- -

- -

Емульовані характеристики:

- - - -

У таблиці нижче перераховані значення, пов'язані з кожним типом мережі. Однак, слід відмітити, що не варто покладатися на цю функцію для точних вимірювань продуктивності; вона призначена для приблизного уявлення про роботу користувача в різних умовах.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ВибірШвидкість завантаженняШвидксть вивантаженняМінімальна затримка (ms)
GPRS50 KB/s20 KB/s500
Regular 2G250 KB/s50 KB/s300
Good 2G450 KB/s150 KB/s150
Regular 3G750 KB/s250 KB/s100
Good 3G1.5 MB/s750 KB/s40
Regular 4G/LTE4 MB/s3 MB/s20
DSL2 MB/s1 MB/s5
Wi-Fi30 MB/s15 MB/s2
- -

Можливості Монітору мережі

- -

У наступних статтях розглядаються різні аспекти використання Монітору мережі :

- - diff --git a/files/uk/tools/network_monitor/toolbar/index.html b/files/uk/tools/network_monitor/toolbar/index.html deleted file mode 100644 index 5848d61122..0000000000 --- a/files/uk/tools/network_monitor/toolbar/index.html +++ /dev/null @@ -1,54 +0,0 @@ ---- -title: Панель інструментів Монітору мережі -slug: Tools/Network_Monitor/toolbar -translation_of: Tools/Network_Monitor/toolbar -original_slug: Інструменти/Network_Monitor/toolbar ---- -

{{ToolsSidebar}}

- -

Монітор мережі надає дві області панелей інструментів: одну над основним розділом, а іншу під ним.

- -

Панель інструментів

- -

Панель інструментів знаходиться у верхній частині головного вікна Монітора мережі.

- -

- -

На ній знаходяться:

- - - -

- -

Друга область панелі інструментів, що знаходиться нижче Монітора мережі, містить:

- - - -

Можливості Монітору мережі

- -

У наступних статтях розглядаються різні аспекти використання Монітору мережі:

- - diff --git a/files/uk/tools/page_inspector/how_to/index.html b/files/uk/tools/page_inspector/how_to/index.html deleted file mode 100644 index f35f9aec5c..0000000000 --- a/files/uk/tools/page_inspector/how_to/index.html +++ /dev/null @@ -1,13 +0,0 @@ ---- -title: How to -slug: Tools/Page_Inspector/How_to -tags: - - NeedsTranslation - - TopicStub -translation_of: Tools/Page_Inspector/How_to ---- -

Links for various HOW TO's can be found here. These links describe in depth the HOW TO techniques.

- -

{{ ListSubpages () }}

- -

 

diff --git a/files/uk/tools/page_inspector/index.html b/files/uk/tools/page_inspector/index.html deleted file mode 100644 index d940ae71ef..0000000000 --- a/files/uk/tools/page_inspector/index.html +++ /dev/null @@ -1,60 +0,0 @@ ---- -title: Page Inspector -slug: Tools/Page_Inspector -tags: - - CSS - - DOM - - HTML - - NeedsTranslation - - Stylesheets - - TopicStub - - Web Development - - 'Web Development:Tools' - - 'l10n:priority' -translation_of: Tools/Page_Inspector ---- -

Use the Page Inspector to examine and modify the HTML and CSS of a page.

- -

You can examine pages loaded in the local copy of Firefox or in a remote target such as Firefox for Android. See remote debugging to learn how to connect the developer tools to a remote target.

- -
-

User Interface Tour

- -

To find your way around the Inspector, here's a quick tour of the UI.

- -
-

How to

- -

To find out what you can do with the Inspector, see the following how to guides:

- -
- -
- -
-

Reference

- -
- -
diff --git a/files/uk/tools/web_console/console_messages/index.html b/files/uk/tools/web_console/console_messages/index.html deleted file mode 100644 index ad9989244b..0000000000 --- a/files/uk/tools/web_console/console_messages/index.html +++ /dev/null @@ -1,386 +0,0 @@ ---- -title: Повідомлення консолі -slug: Tools/Web_Console/Console_messages -translation_of: Tools/Web_Console/Console_messages -original_slug: Інструменти/Web_Console/Console_messages ---- -
{{ToolsSidebar}}
- -

Більшіу частину Веб-консолі займає область відображення повідомлень:

- -

- -

Кожне повідомлення відображається окремим рядком:

- -

- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
TimeЧас, коли повідомлення було записане. Це поле за замовченням не відображається: Ви можете керувати опцією "Увімкнути відбитки часу" використовуючи налаштування панелі інструментів.
Category -

Категорія: показує на те, що це за повідомлення:

- -
    -
  • Чорний: Мережний запит
  • -
  • Синій: попередження/помилка/повідомлення CSS
  • -
  • Помаранчевий: попередження/помилка JavaScript
  • -
  • Червоний: попередження/помилка безпеки
  • -
  • Зелений: повідомлення журналу серверу
  • -
  • Світло-сірий : повідомлення API Консолі
  • -
  • Темно-сірий: вхід/вихід інтерактивного інтерпретатору командного рядку
  • -
-
TypeДля всіх повідомлень, за винятком мережних запитів і інтерактивних входів/виходів, піктограма вказує на тип повідомлення: помилка (X), попередження (!) або інфомаційне повідомлення (i).
MessageТекст повідомлення.
Number of occurrencesЯкщо рядок, який генерує попередження або помилку, виконується більше одного разу, то він реєструється тільки один раз. Цей лічильник показує, скільки разів генерується дане повідомлення.
Filename and line number -

Для повідомлень JavaScript, CSS і API консолі повідомлення можна простежити до рядку коду, що повязаний з ним. Консоль надає посилання на ім'я файлу та номер рядку, що генерує повідомлення.

- -

Починаючи з Firefox 36, це поле також показує номер стовпчика.

-
- -

За замовчуванням консоль очищається кожного разу, коли ви переходите до нової сторінки або перезавантажуєте поточну сторінку. Щоб змінити цю поведінку, позначте пункт "Постійне журналювання" в Налаштуваннях.

- -

Категорії повідомлень

- -

Мережні

- -
-

Network log messages are not shown by default. Use the filtering feature to show them.

-
- -

Network requests are logged with a line that looks like this:

- -

- - - - - - - - - - - - - - - - - - - - - - - - -
TimeThe time the message was recorded.
CategoryIndicates that the message is an HTTP request.
Method -

The specific HTTP request method.

- -

If the request was made as an XMLHttpRequest, there's an additional note indicating this:

- -

-
URIThe target URI.
SummaryThe HTTP version, status code, and time taken to complete.
- -

Viewing network request details

- -

If you click on the message, you'll be redirected to the Network panel where the request is selected and more request and response details are shown within the side panel at the right side. In versions prior to Firefox 43 this information was shown in a separate popup.

- -

Starting in Firefox 48, you can access much of this detail inline, without leaving the Web Console. Network request entries get a disclosure arrow next to them. Click this to see:

- - - -

{{EmbedYouTube("cFlcWzJ9j4I")}}

- -

JS

- -

JavaScript messages look like this:

- -

- - - -
New in Firefox 49
- -

JavaScript errors contain a "Learn more" link that takes you to the JavaScript error reference containing additional advice for fixing issues:

- -

{{EmbedYouTube("OabJc2QR6o0")}}

- -

Source maps

- -
New in Firefox 55
- -

From Firefox 55, the Web Console understands source maps. This means that if your JavaScript sources are compressed, you can supply a source map for them. Then any messages or errors your source generates will show up in the Web Console with a link back to the original source, not the compressed version.

- -

CSS

- -
-

Note: CSS warnings and reflow messages are not shown by default, for performance reasons (see {{bug(1452143)}}). Use the filtering feature to show them.

-
- -

CSS messages look like this:

- -

- -

Reflow events

- -

The Web Console also logs reflow events under the CSS category. A reflow is the name given to the operation in which the browser calculates the layout of all or part of the page. Reflows occur when a change has happened to a page that the browser thinks affects the layout. Many events can trigger reflows, including: resizing the browser window, activating pseudoclasses like :hover, or manipulating the DOM in JavaScript.

- -

Because reflows can be computationally expensive and directly affect the user interface, they can have a big impact on the responsiveness of a website or web app. By logging reflow events the Web Console can give you insight into when reflow events are being triggered, how long they take to execute and, if the reflows are synchronous reflows triggered from JavaScript, which code triggered them.

- -

Reflow events are logged as "Reflow" messages, as distinct from CSS errors or warnings. By default, they are disabled. You can enable them by clicking the "CSS" button in the toolbar and selecting "Reflows".

- -

Each message is labeled "reflow" and shows the time taken to execute the reflow:

- -

If the reflow is a synchronous reflow triggered from JavaScript, it also shows a link to the line of code that triggered the reflow:

- -

Click the link to open the file in the Debugger.

- -

Synchronous and asynchronous reflows

- -

If a change is made that invalidates the current layout - for example, the browser window is resized or some JavaScript modifies an element's CSS - the layout is not recalculated immediately. Instead, the reflow happens asynchronously, the next time the browser decides it needs to be done (generally, the next time the browser repaints). In this way the browser can save up a collection of invalidating changes and recalculate their effect at once.

- -

However, if some JavaScript code reads a style that has been modified, then the browser must perform a synchronous reflow in order to calculate the computed style to return. For example, code like this will cause an immediate, synchronous, reflow, when it calls window.getComputedStyle(thing).height:

- -
var thing = document.getElementById("the-thing");
-thing.style.display = "inline-block";
-var thingHeight = window.getComputedStyle(thing).height;
- -

Because of this, it's a good idea to avoid interleaving write and read calls to an element's styles when manipulating the DOM, because every time you read back a style that has been invalidated by a previous write call, you force a synchronous reflow.

- -

Безпеки

- -

Security warnings and errors look like this:

- -

The security messages shown in the Web Console help developers find potential or actual vulnerabilities in their sites. Additionally, many of these messages help educate developers because they end with a “Learn More” link that takes you to a page with background information and advice for mitigating the issue.

- -

The complete list of security messages is as follows:

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
MessageDetails
Blocked loading mixed active contentThe page contained mixed active content: that is, the main page was served over HTTPS, but asked the browser to load "active content", such as scripts, over HTTP. The browser blocked this active content. See Mixed Content for more details.
Blocked loading mixed display contentThe page contained mixed display content: that is, the main page was served over HTTPS, but asked the browser to load "display content", such as images, over HTTP. The browser blocked this display content. See Mixed Content for more details.
Loading mixed (insecure) active content on a secure pageThe page contained mixed active content: that is, the main page was served over HTTPS, but asked the browser to load "active content", such as scripts, over HTTP. The browser loaded this active content. See Mixed Content for more details.
Loading mixed (insecure) display content on a secure pageThe page contained mixed display content: that is, the main page was served over HTTPS, but asked the browser to load "display content", such as images, over HTTP. The browser loaded this display content. See Mixed Content for more details.
This site specified both an X-Content-Security-Policy/Report-Only header and a Content-Security-Policy/Report-Only header. The X-Content-Security-Policy/Report-Only header(s) will be ignored.See Content Security Policy for more details.
The X-Content-Security-Policy and X-Content-Security-Report-Only headers will be deprecated in the future. Please use the Content-Security-Policy and Content-Security-Report-Only headers with CSP spec compliant syntax instead.See Content Security Policy for more details.
Password fields present on an insecure (http://) page. This is a security risk that allows user login credentials to be stolen.Pages containing login forms must be served over HTTPS, not HTTP.
Password fields present in a form with an insecure (http://) form action. This is a security risk that allows user login credentials to be stolen.Forms containing password fields must submit them over HTTPS, not HTTP.
Password fields present on an insecure (http://) iframe. This is a security risk that allows user login credentials to be stolen.iframes containing login forms must be served over HTTPS, not HTTP.
The site specified an invalid Strict-Transport-Security header.See HTTP Strict Transport Security for more details.
-

This site makes use of a SHA-1 Certificate; it's recommended you use certificates with signature algorithms that use hash functions stronger than SHA-1.

-
-

The site uses a certificate whose signature uses the SHA-1 hash algorithm.

- -

SHA-1 is still still widely used in certificates, but it is starting to show its age. Web sites and Certification Authorities are encouraged to switch to stronger hash algorithms in future. See the Weak Signature Algorithm article for more details.

- -

Note that the SHA-1 certificate may not be your site's own certificate, but may be the certificate belonging to a Certification Authority that was used to sign your site's certificate.

-
- -

Bug 863874 is the meta-bug for logging relevant security messages to the Web Console. If you have more ideas for useful features like the ones discussed here, or are interested in contributing, check out the metabug and its dependencies.

- -

Інформаційні

- -
-

Messages logged from Shared Workers, Service Workers, add-ons, and Chrome Workers are not shown by default. Use the filtering feature to show them.

-
- -

The Logging category includes messages logged using the Console API.
-

- -

The Web console supports the following Console API messages:

- - - -

The console prints a stack trace for all error messages, like this:

- -
function foo() {
-  console.error("it explodes");
-}
-
-function bar() {
-  foo();
-}
-
-function doStuff() {
- bar();
-}
-
-doStuff();
- -

- -

Серверні

- -
-

Server-side log messages was introduced in Firefox 43, but removed in Firefox 56. You can install the Chrome Logger extension to (re)-enable the feature.

-
- -

With the Chrome Logger extension, Web Console can display messages sent from the server. This enables you to use the Web Console to debug server-side code.

- -

It uses the Chrome Logger protocol. Briefly, the way it works is:

- - - -

To find a suitable library for your server code, see the Chrome Logger documentation.

- -

Входи/виходи командного рядку

- -

Commands sent to the browser using the Web Console's command line, and the corresponding responses, are logged using lines like this:

- -

The dark gray bar indicates that these are input/output messages, while the direction of the arrow discriminates between input and output.

- -

Filtering and searching

- -

Filtering by category

- -

You can use the toolbar along the top to constrain the results displayed.

- -

To see only messages of particular categories, click the button labeled with that category ("Net", "CSS", and so on). Clicking the main part of the button toggles that category on or off, while clicking the arrow on the right gives you more fine-grained filter options within that category:

- - - -

Filtering by text

- -

To see only messages that contain a specific string, type in the text box labeled "Filter output".

- -

Clearing the log

- -

Finally, you can use this toolbar to clear the log. Before Firefox 48, this is a button labeled "Clear" on the right of the toolbar. From Firefox 48 it's a trashcan icon on the left.

diff --git a/files/uk/tools/web_console/index.html b/files/uk/tools/web_console/index.html deleted file mode 100644 index 052358d823..0000000000 --- a/files/uk/tools/web_console/index.html +++ /dev/null @@ -1,38 +0,0 @@ ---- -title: Веб-консоль - Web Console -slug: Tools/Web_Console -translation_of: Tools/Web_Console -original_slug: Інструменти/Web_Console ---- -

Веб-консоль:

- -
    -
  1. Реєструє інформацію, пов'язану з веб-сторінкою: мережні запити, JavaScript, CSS, помилки та попередження безпеки, а також повідомлення про помилки, попередження та інформаційні повідомлення, явно ввімкнені за допомогою коду JavaScript, запущеного в контексті сторінки
  2. -
  3. Дозволяє взаємодіяти з веб-сторінкою, виконуючи вирази JavaScript у контексті сторінки
  4. -
- -

{{EmbedYouTube("C6Cyrpkb25k")}}

- -
-
-
-
Відкриття Веб-консолі
-
Як запустити Веб-консоль.
-
Інтерпретатор командного рядку
-
Як взаємодіяти з документом, використовуючи Консоль.
-
Розділенння консолі
-
Використання Консолі разом з іншими інструментами.
-
-
- -
-
-
Повідомлення консолі
-
Докладна інформація про реєетрацію повідомлень Консолі.
-
Збагачення виведення
-
Переглядайте та взаємодійте з об'єктами, що реєструються Консоллю.
-
Комбінації клавіш
-
Посилання на довідку.
-
-
-
diff --git a/files/uk/tools/web_console/split_console/index.html b/files/uk/tools/web_console/split_console/index.html deleted file mode 100644 index ea9c967170..0000000000 --- a/files/uk/tools/web_console/split_console/index.html +++ /dev/null @@ -1,23 +0,0 @@ ---- -title: Розділення консолі -slug: Tools/Web_Console/Split_console -translation_of: Tools/Web_Console/Split_console -original_slug: Інструменти/Web_Console/Split_console ---- -
{{ToolsSidebar}}
- -
Консоль можна використовувати поряд з іншими інструментами. Поки ви перебуваєте в іншому інструменті на панелі інструментів, просто натисніть клавішу Esc або виберіть команду "Показати розділену консоль" в меню панелі інструментів. Панель інструментів тепер з'явиться розділеною частиною, на ній буде розміщено оригінальний інструмент і веб-консоль.
- -

-

Ви можете закрити розділення консолі повторним натисканням Esc, або вибравши команду меню "Сховати розділення консолі".

-

- -

- -

{{EmbedYouTube("G2hyxhPHyXo")}}

- -

В якості скорочення назви елемента, вибраного в інспекторі, як завжди використовується $0:

- -

Якщо Ви використовуєте розділену консоль з відладчиком, область видимості консолі - це поточний кадр стека. Отже, якщо Ви потрапили до точки переривання у функції, область видимості буде визначатися цією функцією. Ви отримаєте автозаповнення для об'єктів, означених у функції, і можете легко змінювати їх на льоту:

- -

diff --git a/files/uk/tools/web_console/ui_tour/index.html b/files/uk/tools/web_console/ui_tour/index.html deleted file mode 100644 index 575a1f37e8..0000000000 --- a/files/uk/tools/web_console/ui_tour/index.html +++ /dev/null @@ -1,26 +0,0 @@ ---- -title: Відкриття Веб-консолі -slug: Tools/Web_Console/UI_Tour -translation_of: Tools/Web_Console/UI_Tour -original_slug: Інструменти/Web_Console/Opening_the_Web_Console ---- -
{{ToolsSidebar}}
- -

Для відкриття Веб-консолі:

- - - -

В нижній частині вікна веб-переглядача з'явиться Панель інструментів з активованою веб-консоллю (на панелі інструментів DevTools вона просто називається "консоль"):

- -

- -

Інтерфейс Веб-консолі розділяється на три горизонтальні секції:

- - diff --git a/files/uk/web/accessibility/index.html b/files/uk/web/accessibility/index.html deleted file mode 100644 index 604d8762ac..0000000000 --- a/files/uk/web/accessibility/index.html +++ /dev/null @@ -1,74 +0,0 @@ ---- -title: Accessibility -slug: Web/Accessibility -tags: - - Accessibility - - Guide - - NeedsTranslation - - TopicStub -translation_of: Web/Accessibility ---- -

Accessibility (often abbreviated to A11y—as in "a" then 11 characters then "y") in Web development means enabling as many people as possible to use Web sites, even when those people's abilities are limited in some way.

- -

For many people, technology makes things easier. For people with disabilities, technology makes things possible. Accessibility means developing content to be as accessible as possible no matter an individual's physical and cognitive abilities and no matter how they access the web.

- -

"The Web is fundamentally designed to work for all people, whatever their hardware, software, language, culture, location, or physical or mental ability. When the Web meets this goal, it is accessible to people with a diverse range of hearing, movement, sight, and cognitive ability."W3C - Accessibility

- -
-
-

Key tutorials

- -

The MDN Accessibility Learning Area contains modern, up-to-date tutorials covering accessibility essentials:

- -
-
What is accessibility?
-
This article starts off the module with a good look at what accessibility actually is — this includes what groups of people we need to consider and why, what tools different people use to interact with the Web, and how we can make accessibility part of our web development workflow.
-
HTML: A good basis for accessibility
-
A great deal of web content can be made accessible just by making sure the correct HTML elements are used for the correct purpose at all times. This article looks in detail at how HTML can be used to ensure maximum accessibility.
-
CSS and JavaScript accessibility best practices
-
CSS and JavaScript, when used properly, also have the potential to allow for accessible web experiences ... or they can significantly harm accessibility if misused. This article outlines some CSS and JavaScript best practices that should be considered to ensure even complex content is as accessible as possible.
-
WAI-ARIA basics
-
Following on from the previous article, sometimes making complex UI controls that involve unsemantic HTML and dynamic JavaScript-updated content can be difficult. WAI-ARIA is a technology that can help with such problems by adding in further semantics that browsers and assistive technologies can recognize and use to let users know what is going on. Here we'll show how to use it at a basic level to improve accessibility.
-
Accessible multimedia
-
Another category of content that can create accessibility problems is multimedia — video, audio, and image content need to be given proper textual alternatives so they can be understood by assistive technologies and their users. This article shows how.
-
Mobile accessibility
-
With web access on mobile devices being so popular, and popular platforms such as iOS and Android having fully-fledged accessibility tools, it is important to consider the accessibility of your web content on these platforms. This article looks at mobile-specific accessibility considerations.
-
-
- -
-

Other documentation

- -
-
Understanding the Web Content Accessibility Guidelines
-
-

This set of articles provides quick explanations to help you understand the steps that need to be taken to conform to the recommendations outlined in the W3C Web Content Accessibility Guidelines 2.0 (WCAG 2.0 or just WCAG, for the purposes of this writing).

-
-
Keyboard-navigable JavaScript widgets
-
Until now, web developers who want to make their styled <div> and <span> based widgets have lacked the proper techniques. Keyboard accessibility is part of the minimum accessibility requirements which a developer should be aware of.
-
ARIA
-
A collection of articles to learn how to use ARIA to make your HTML documents more accessible.
-
Assistive technology (AT) development
-
A collection of articles intended for AT developers
-
Mobile accessibility checklist
-
This document provides a concise checklist of accessibility requirements for mobile app developers.
-
Cognitive accessibility
-
When creating web content, be aware of how you can ensure that it is accessible to people cognitive impairments.
-
Accessibility for seizure disorders
-
Some types of visual web content can induce seizures in people with certain brain disorders. Understand the types of content that can be problematic, and find tools and strategies to help you avoid them.
-
-
- -

View all articles about Accessibility...

-
-
- -

See also

- - diff --git a/files/uk/web/accessibility/understanding_wcag/index.html b/files/uk/web/accessibility/understanding_wcag/index.html deleted file mode 100644 index fe71b20ebc..0000000000 --- a/files/uk/web/accessibility/understanding_wcag/index.html +++ /dev/null @@ -1,59 +0,0 @@ ---- -title: Understanding the Web Content Accessibility Guidelines -slug: Web/Accessibility/Understanding_WCAG -tags: - - NeedsTranslation - - TopicStub - - WCAG - - Web Content Accessibility Guidelines -translation_of: Web/Accessibility/Understanding_WCAG ---- -

This set of articles provides quick explanations to help you understand the steps that need to be taken to conform to the recommendations outlined in the W3C Web Content Accessibility Guidelines 2.0 or 2.1 (or just WCAG, for the purposes of this writing).

- -

The WCAG 2.0 and 2.1 provide a detailed set of guidelines for making web content more accessible to people with a wide variety of disabilities. It is comprehensive but incredibly detailed, and quite difficult to gain a rapid understanding of. For this reason, we have summarised the practical steps you need to take to satisfy the different recommendations, with further links to more details where required.

- -

The four principles

- -

WCAG is broadly broken down into four principles — major things that web content must be to be considered accessible (see Understanding the Four Principles of Accessibility for the WCAG definitions).

- -

Each of the links below will take you to pages that further expand on these areas, giving you practical advice on how to write your web content so it conforms to the success criteria outlined in each of the WCAG 2.0 and 2.1 guidelines that further sub-divides each principle.

- - - -

Should I use WCAG 2.0 or 2.1?

- -

WCAG 2.1 is the most recent and relevant accessibility standard. Use WCAG 2.1 to help more people with disabilities and reduce the future legal risk for web site owners. Target WCAG 2.0 first when allocating resources. Then step up to WCAG 2.1. 

- -

What is WCAG 2.1?

- -

WCAG 2.1 was published as an official recommendation on 05 June 2018. The European Union (EU) adopted WCAG 2.1 as the digital accessibility standard in September 2018. W3C published a press release WCAG 2.1 Adoption in Europe

- -

WCAG 2.1 includes:

- - - - - -

This guide is intended to provide practical information to help you build better, more accessible websites. However, we are not lawyers, and none of this constitutes legal advice. If you are worried about the legal implications of web accessibility, we'd recommend that you check the specific legislation governing accessibility for the web/public resources in your country or locale, and seek the advice of a qualified lawyer.

- -

What is accessibility? and particularity the Accessibility guidelines and the law section provide more related information.

diff --git a/files/uk/web/accessibility/understanding_wcag/keyboard/index.html b/files/uk/web/accessibility/understanding_wcag/keyboard/index.html deleted file mode 100644 index 1383c66354..0000000000 --- a/files/uk/web/accessibility/understanding_wcag/keyboard/index.html +++ /dev/null @@ -1,94 +0,0 @@ ---- -title: Клавіатура (Keyboard) -slug: Web/Accessibility/Understanding_WCAG/Keyboard -tags: - - tabIndex - - клікабельні елементи - - фокус клавіатури - - інтерактивні елементи -translation_of: Web/Accessibility/Understanding_WCAG/Keyboard ---- -
- -
Щоб бути у повній мірі доступною, веб-сторінка повинна бути керованою за допомогою однієї лише клавіатури для доступу до неї і управління нею. Це відноситься до користувачів скрінрідерів (екранні зчитувачі), але може також включати і користувачів, у яких виникають проблеми з управлінням вказівним пристроєм, наприклад, мишею або трекболом, або чия миша не працює в даний момент, або які просто вважають за краще використовувати клавіатуру для введення, коли це можливо.
- -

Елементи у фокусі повинні мати інтерактивну семантику

- -

Якщо елемент можна сфокусувати за допомогою клавіатури, то він повинен бути інтерактивним; тобто користувач повинен мати можливість щось робити з цим елементом, якусь зміну (наприклад, активізувати посилання або змінити параметр).

- -
-

Примітка: один важливий виняток для цього правила, якщо елемент має role="document" застосовану до нього, всередині інтерактивний контекст (наприклад, role="application"). У такому випадку фокусування вкладеного документа є єдиним способом повернення допоміжних технологій до неінтерактивного стану (часто званого "browse mode (режим перегляду)").

-
- -

Більшість інтерактивних елементів фокусуються за замовчуванням; ви можете зробити елемент фокусним, додавши йому значення атрибуту tabindex=0. Однак, ви повинні додавати tabindex тільки в тому випадку, якщо Ви зробили елемент інтерактивним, наприклад, визначили відповідні обробники подій клавіатури.

- -

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

- - - -

Уникайте використання tabindex атрибута який більше нуля

- -

tabindex атрибут вказує на те, що елемент фокусується за допомогою клавіатури. Значення нуля вказує на те, що елемент є частиною встановленого за замовчуванням порядку фокусування, який ґрунтується на порядку розташування елементів в HTML-документі. Позитивне значення ставить елемент попереду тих, які знаходяться в порядку за замовчуванням; елементи з позитивними значеннями фокусуються в порядку їх tabindex значення (1, а потім 2, потім 3 і т.д.).

- -

Це створює плутанину для користувачів лише клавіатури, коли порядок фокусування відрізняється від логічного ладу сторінки. Найкраща стратегія - структурувати HTML-документ так, щоб елементи фокусування перебували в логічному порядку, без потреби змінювати порядок їх tabindex значень.

- -

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

- - - -

Клікабельні елементи повинні бути такими що фокусуються і мають інтерактивну семантику

- -

Якщо елемент можна натиснути вказівним пристроєм, наприклад, мишкою, то він також повинен бути таким що фокусується за допомогою клавіатури, і користувач повинен мати можливість щось робити, взаємодіючи з ним.

- -

Елемент є клікабельним, якщо має onclick встановлений обробник події. Ви можете зробити його таким що фокусує, додавши tabindex=0 значення атрибута для нього. Ви маєте змогу зробити його працездатним за допомогою клавіатури, визначивши onkeydown обробник подій; у більшості випадків дії обробника подій повинні бути однаковими для обох типів подій.

- -

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

- - - -

Інтерактивні елементи повинні мати можливість бути активовані за допомогою клавіатури

- -

Якщо користувач може взаємодіяти з елементом за допомогою сенсорного або вказівного пристрою, то цей елемент також повинен підтримувати взаємодію за допомогою клавіатури. Тобто, якщо ви визначили оброблювачі подій для подій дотику або кліку, їх також слід визначити для подій клавіатури. Обробники подій клавіатури повинні забезпечувати таку ж взаємодію, що і обробники сенсорних і клікабельних елементів.

- -

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

- - - -

Інтерактивні елементи повинні бути такими що фокусуються

- -

Якщо користувач може взаємодіяти з елементом (наприклад, за допомогою сенсорного або вказівного пристрою), то він також повинен мати можливість фокусування за допомогою клавіатури. Ви можете зробити його такими що фокусується, додавши tabindex=0 значення атрибута до нього. Це додасть елемент в список об'єктів, які можна сфокусувати, натиснувши кнопку Tab, в послідовності таких елементів, яка задана в HTML-документі.

- -

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

- - - -

Елемент що фокусується повинен змінювати стиль при фокусуванні

- -

Будь-який елемент, який може отримати фокус клавіатури, повинен мати помітний стиль, який вказує на те що елемент сфокусований. Ви можете зробити це за допомогою :focus CSS псевдоклас.

- -

Стандартні елементи фокусування, такі як посилання і поля вводу, за замовчуванням задаються браузером в спеціальному стилі, тому, можливо, вам не доведеться ставити стиль фокусування для таких елементів, якщо тільки ви не хочете, щоб стиль фокусування був більш характерним.

- -

Якщо ви створюєте свої власні елементи фокусування, переконайтеся, що ви також визначаєте стиль фокусування для них.

- -

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

- - diff --git a/files/uk/web/api/ambient_light_events/index.html b/files/uk/web/api/ambient_light_events/index.html deleted file mode 100644 index 3c5d48cc76..0000000000 --- a/files/uk/web/api/ambient_light_events/index.html +++ /dev/null @@ -1,66 +0,0 @@ ---- -title: Ambient Light Events -slug: Web/API/Ambient_Light_Events -translation_of: Web/API/Ambient_Light_Events ---- -
{{DefaultAPISidebar("Ambient Light Events")}}{{SeeCompatTable}}
- -

Ambient Light Events - це зручний спосіб реагувати на будь-які зміни інтенсивності світла, наприклад, змінюючи кольорову контрастність інтерфейсу користувача (UI) або змінюючи експозицію, необхідну для фотографування.

- -

Опис події

- -

Коли датчик освітленості пристрою виявляє зміну рівня освітленості, він повідомляє браузер про цю зміну. Браузер, після отримання такого сповіщення, запускає подію {{domxref ("DeviceLightEvent")}}, яка надає інформацію про точну інтенсивність світла (в одиницях люкс).

- -

Цю подію можна перехопити на рівні об'єкту window за допомогою методу {{domxref ("EventTarget.addEventListener", "addEventListener")}} (використовуючи назву події {{event ("devicelight")}}) або прикріпивши обробку події як властивість {{domxref ("window.ondevicelight")}}.

- -

Після перехоплення об'єкт події надає доступ до інтенсивності світла, вираженої у {{interwiki ("wikipedia", "lux")}} через властивість {{domxref ("DeviceLightEvent.value")}}.

- -

Приклад

- -
if ('ondevicelight' in window) {
-  window.addEventListener('devicelight', function(event) {
-    var body = document.querySelector('body');
-    if (event.value < 50) {
-      body.classList.add('darklight');
-      body.classList.remove('brightlight');
-    } else {
-      body.classList.add('brightlight');
-      body.classList.remove('darklight');
-    }
-  });
-} else {
-  console.log('Подія devicelight не підтримується');
-}
-
- -

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

- - - - - - - - - - - - - - - - -
СпецифікаціяСтатусКоментар
{{SpecName("AmbientLight", "", "Ambient Light Events")}}{{Spec2("AmbientLight")}}Initial definition
- -

Сумісність

- - - -

{{Compat("api.DeviceLightEvent")}}

- -

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

- - diff --git a/files/uk/web/api/angle_instanced_arrays/index.html b/files/uk/web/api/angle_instanced_arrays/index.html deleted file mode 100644 index db1d1906ff..0000000000 --- a/files/uk/web/api/angle_instanced_arrays/index.html +++ /dev/null @@ -1,83 +0,0 @@ ---- -title: ANGLE_instanced_arrays -slug: Web/API/ANGLE_instanced_arrays -translation_of: Web/API/ANGLE_instanced_arrays ---- -
{{APIRef("WebGL")}}
- -

ANGLE_instanced_arrays розширення є частиною WebGL API і дозволяє малювати один і той же об'єкт або групи подібних об'єктів кілька разів, якщо вони поділяють однакові вершинні дані, лічильник примітиву і тип.

- -

Розширення WebGL доступні за допомогою метода{{domxref("WebGLRenderingContext.getExtension()")}} . Для отримання додаткової інформації див Using Extensions в WebGL tutorial.

- -
-

Доступність: Це розширення доступне лише для {{domxref("WebGLRenderingContext", "WebGL1", "", 1)}} контексті. В {{domxref("WebGL2RenderingContext", "WebGL2", "", 1)}}, функціональність цього розширення доступна на WebGL2 контекст за замовчуванням і константи і методи доступні без суфіксу  "ANGLE".

- -

Незважаючи на назву "ANGLE", це розширення працює на будь-якому пристрої, якщо його підтримує апаратне забезпечення, а не тільки на Windows, коли використовується бібліотека ANGLE.  "ANGLE" просто вказує, що це розширення було написано авторами бібліотеки ANGLE.

-
- -

Константи

- -

Це розширення виставляє одну нову константу, яку можна використовувати метод {{domxref("WebGLRenderingContext.getVertexAttrib()", "gl.getVertexAttrib()")}} :

- -
-
ext.VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE
-
Повертає {{domxref("GLint")}} опису частотного дільника, використовуваного для інтрадерного візуалізації при використанні в {{domxref("WebGLRenderingContext.getVertexAttrib()", "gl.getVertexAttrib()")}} як параметр pname .
-
- -

Methods

- -

This extension exposes three new methods.

- -
-
{{domxref("ANGLE_instanced_arrays.drawArraysInstancedANGLE()", "ext.drawArraysInstancedANGLE()")}}
-
-

Behaves identically to {{domxref("WebGLRenderingContext.drawArrays()", "gl.drawArrays()")}} except that multiple instances of the range of elements are executed, and the instance advances for each iteration.

-
-
{{domxref("ANGLE_instanced_arrays.drawElementsInstancedANGLE()", "ext.drawElementsInstancedANGLE()")}}
-
-

Behaves identically to {{domxref("WebGLRenderingContext.drawElements()", "gl.drawElements()")}} except that multiple instances of the set of elements are executed and the instance advances between each set.

-
-
{{domxref("ANGLE_instanced_arrays.vertexAttribDivisorANGLE()", "ext.vertexAttribDivisorANGLE()")}}
-
-

Modifies the rate at which generic vertex attributes advance when rendering multiple instances of primitives with {{domxref("ANGLE_instanced_arrays.drawArraysInstancedANGLE()", "ext.drawArraysInstancedANGLE()")}} and {{domxref("ANGLE_instanced_arrays.drawElementsInstancedANGLE()", "ext.drawElementsInstancedANGLE()")}}.

-
-
- -

Examples

- -

Enabling the extension:

- -
var ext = gl.getExtension('ANGLE_instanced_arrays');
-
- -

Specifications

- - - - - - - - - - - - - - -
SpecificationStatusComment
{{SpecName('ANGLE_instanced_arrays', '', 'ANGLE_instanced_arrays')}}{{Spec2('ANGLE_instanced_arrays')}}Initial definition.
- -

Browser compatibility

- - - -

{{Compat("api.ANGLE_instanced_arrays")}}

- -

See also

- - diff --git a/files/uk/web/api/blob/index.html b/files/uk/web/api/blob/index.html deleted file mode 100644 index 3cdfbcf46a..0000000000 --- a/files/uk/web/api/blob/index.html +++ /dev/null @@ -1,230 +0,0 @@ ---- -title: Blob -slug: Web/API/Blob -translation_of: Web/API/Blob ---- -
{{APIRef("File API")}}
- -

Об'єкт Blob являє собою файло-подібний об'єкт незмінних, початкових даних. Blob представляє дані, що не обов'язкові у нативному форматі JavaScript. Вигляд {{domxref("File")}} заснований на Blob, наслідує функціонал Blob та доповнює його для підтримки файлів з файлової системи користувача.

- -

Для формування Blob з інших не-blob об'єктів й даних використовується конструктор {{domxref("Blob.Blob", "Blob()")}}. Для створення Blob, що міститиме підмножину інших даних Blob, викликається метод {{domxref("Blob.slice()", "slice()")}}. Для отримання Blob для файла з файлової системи користувача перегляньте документацію до {{domxref("File")}}.

- -

API, що працюють з  Blob, також перелічені у документації {{domxref("File")}}.

- -
-

Зауваження: Метод slice() другим парметром приймає початкову довжину для індикації кількості байтів, які будуть скопійовані у новий Blob. Якщо вказувати змінні таким чином: початковій індекс + довижина, що привищує розмір джерела Blob, повератємий Blob буде містити дані від початкового індексу до кінця джерела Blob.

-
- -
Зауваження: Майте на увазі, що метод slice() має вендорні префікси у деяких браузерах и версіях: blob.mozSlice() для Firefox 12 та попередніх й blob.webkitSlice() у Safari. Стара версія методу slice(), без вендорних префіксів, має іншу семантику та вважається застарілою. Підтримка blob.mozSlice() була припинена з Firefox 30.
- -

Конструктор

- -
-
{{domxref("Blob.Blob", "Blob(blobParts[, options])")}}
-
Повертає новостворенний об'єкт Blob, чий контент складається з ланцюга масивів значень вхідних парметрів.
-
- -

Властивості

- -
-
{{domxref("Blob.isClosed")}} {{readonlyinline}} {{experimental_inline}}
-
Булєве значення, що вказує, чи був метод {{domxref("Blob.close()")}} викликан на Blob. Закритий Blob не може бути прочитаний.
-
{{domxref("Blob.size")}} {{readonlyinline}}
-
Розмір, у байтах, даних, що міститься у об'єкті Blob.
-
{{domxref("Blob.type")}} {{readonlyinline}}
-
Строка, що вказує MIME тип даних, що містяться у Blob. Якщо тип невідомий, ця строка порожня.
-
- -

Методи

- -
-
{{domxref("Blob.close()")}} {{experimental_inline}}
-
Закриває об'єкт Blob, можливо, звілняючи використовувані ресурси.
-
{{domxref("Blob.slice()", "Blob.slice([start[, end[, contentType]]])")}}
-
Повертає новий об'єкт Blob, що містить дані у вказаному диапазоні байтів джерела Blob.
-
- -

Приклади

- -

Приклад використання конструктора Blob

- -

{{domxref("Blob.Blob", "Blob() constructor")}} дозволяє створювати Blob з інших об'єктів. Наприклад, щоб сконструювати Blob із стрічки:

- -
var debug = {hello: "world"};
-var blob = new Blob([JSON.stringify(debug, null, 2)], {type : 'application/json'});
- -
-

До того, як конструктор Blob став доступний, це можна було зробити за допомогою {{domxref("BlobBuilder")}} API, яка зараз вважається застарілою:

- -
var builder = new BlobBuilder();
-var fileParts = ['<a id="a"><b id="b">hey!</b></a>'];
-builder.append(fileParts[0]);
-var myBlob = builder.getBlob('text/xml');
-
-
- -

Приклад створення URL типізованого масиву з використанням Blob

- -

Наступний код:

- -
var typedArray = GetTheTypedArraySomehow();
-var blob = new Blob([typedArray], {type: 'application/octet-binary'}); // pass a useful mime type here
-var url = URL.createObjectURL(blob);
-// url буде виглядати наступним чином: blob:d3958f5c-0777-0845-9dcf-2cb28783acaf
-// тепер ви можете використовувати url у будь-якому контексті, де можуть бути використані звичайні URLs, наприклад img.src, тощо.
-
- -

Приклад отримання даних з Blob

- -

Єдиний шлях для отримання даних з Blob це використовуючи {{domxref("FileReader")}}. Наступиний код зчитує дані з Blob у вигляді типізованого масиву.

- -
var reader = new FileReader();
-reader.addEventListener("loadend", function() {
-   // reader.result містить контент Blob у вигляді типізованого масиву
-});
-reader.readAsArrayBuffer(blob);
- -

Вікористовуючи інші методи {{domxref("FileReader")}}, можна прочитати контент Blob у вигляді строки або URL.

- -

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

- - - - - - - - - - - - - - -
СпецифікацияСтатусКоментар
{{SpecName('File API','#blob','Blob')}}{{Spec2('File API')}}Initial definition
- -

Сумісність з браузерами

- -

{{CompatibilityTable}}

- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FeatureChromeFirefox (Gecko)Internet ExplorerOperaSafari (WebKit)
Basic support5[1]4[2]1011.10[1]5.1[1]
slice()10 {{property_prefix("webkit")}}
- 21
5 {{property_prefix("moz")}}[3]
- 13
10125.1 {{property_prefix("webkit")}}
Blob() constructor20{{CompatGeckoDesktop("13.0")}}1012.106
close() and isClosed{{CompatUnknown}}{{CompatNo}}[4]{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FeatureAndroidFirefox Mobile (Gecko)IE PhoneOpera MobileSafari Mobile
Basic support{{CompatUnknown}}{{CompatGeckoMobile("13.0")}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}
slice(){{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}
Blob() constructor{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}
close() and isClosed{{CompatUnknown}}{{CompatNo}}[4]{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}
-
- -

[1] A version of slice() taking the length as second argument was implemented in WebKit and Opera 11.10. However, since that syntax differed from {{jsxref("Array/slice", "Array.slice()")}} and {{jsxref("String/slice", "String.slice()")}}, WebKit removed support and added support for the new syntax as Blob.webkitSlice().

- -

[2] A version of slice() taking the length as second argument was implemented in Firefox 4. However, since that syntax differed from {{jsxref("Array/slice", "Array.slice()")}} and {{jsxref("String/slice", "String.slice()")}}, Gecko removed support and added support for the new syntax as mozSlice().

- -

[3] Prior to Gecko 12.0 {{geckoRelease("12.0")}}, there was a bug that affected the behavior of slice(); it did not work for start and end positions outside the range of signed 64-bit values; it has now been fixed to support unsigned 64-bit values.

- -

[4] See {{bug("1048325")}}

- -

Gecko notes: availability in privileged code

- -

To use from chrome code, JSM and Bootstrap scope, you have to import it like this:

- -
Cu.importGlobalProperties(['Blob']);
-
- -

Blob is available in Worker scopes.

- -

See also

- - diff --git a/files/uk/web/api/canvas_api/index.html b/files/uk/web/api/canvas_api/index.html deleted file mode 100644 index 70dbbf1f8d..0000000000 --- a/files/uk/web/api/canvas_api/index.html +++ /dev/null @@ -1,166 +0,0 @@ ---- -title: Canvas API -slug: Web/API/Canvas_API -tags: - - API - - Canvas - - NeedsTranslation - - Overview - - Reference - - TopicStub -translation_of: Web/API/Canvas_API ---- -
{{CanvasSidebar}}
- -

Доданий в HTML5, елемент HTML {{HTMLElement("canvas")}} призначений для створення графіки засобами JavaScript. Для прикладу, його використовують для малювання графіків, створення композиції фотографій, створення анімацій, і навіть для обробки та рендерингу відео в реальному часі.

- -

Mozilla applications gained support for <canvas> starting with Gecko 1.8 (i.e. Firefox 1.5). The element was originally introduced by Apple for the OS X Dashboard and Safari. Internet Explorer supports <canvas> from version 9 onwards; for earlier versions of IE, a page can effectively add support for <canvas> by including a script from Google's Explorer Canvas project. Google Chrome and Opera 9 also support <canvas>.

- -

The <canvas> element is also used by WebGL to draw hardware-accelerated 3D graphics on web pages.

- -

Example

- -

This is just a simple code snippet which uses the {{domxref("CanvasRenderingContext2D.fillRect()")}} method.

- -

HTML

- -
<canvas id="canvas"></canvas>
-
- -

JavaScript

- -
var canvas = document.getElementById('canvas');
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = 'green';
-ctx.fillRect(10, 10, 100, 100);
-
- -

Edit the code below and see your changes update live in the canvas:

- - - -

{{ EmbedLiveSample('Playable_code', 700, 360) }}

- -

Reference

- -
- -
- -

The interfaces related to the WebGLRenderingContext are referenced under WebGL.

- -

Guides and tutorials

- -
-
Canvas tutorial
-
A comprehensive tutorial covering both the basic usage of <canvas> and its advanced features.
-
Code snippets: Canvas
-
Some extension developer-oriented code snippets involving <canvas>.
-
Demo: A basic ray-caster
-
A demo of ray-tracing animation using canvas.
-
Drawing DOM objects into a canvas
-
How to draw DOM content, such as HTML elements, into a canvas.
-
Manipulating video using canvas
-
Combining {{HTMLElement("video")}} and {{HTMLElement("canvas")}} to manipulate video data in real time.
-
- -

Resources

- -

Generic

- - - -

Libraries

- - - -

Specifications

- - - - - - - - - - - - - - - - -
SpecificationStatusComment
{{SpecName('HTML WHATWG', 'scripting.html#the-canvas-element', '<canvas>')}}{{Spec2('HTML WHATWG')}} 
- -

See also

- - diff --git a/files/uk/web/api/canvas_api/tutorial/basic_usage/index.html b/files/uk/web/api/canvas_api/tutorial/basic_usage/index.html deleted file mode 100644 index e57e9fe4a0..0000000000 --- a/files/uk/web/api/canvas_api/tutorial/basic_usage/index.html +++ /dev/null @@ -1,152 +0,0 @@ ---- -title: Базове використання canvas -slug: Web/API/Canvas_API/Tutorial/Basic_usage -translation_of: Web/API/Canvas_API/Tutorial/Basic_usage ---- -
{{CanvasSidebar}} {{PreviousNext("Web/API/Canvas_API/Tutorial", "Web/API/Canvas_API/Tutorial/Drawing_shapes")}}
- -
-

Давайте почнемо цей урок з розгляду елемента  {{HTMLElement("canvas")}} {{Glossary("HTML")}} як такого. Наприкінці ви дізнаєтесь, як задати canvas 2D context та  зможете намалювати перший приклад в соєму браузері.

-
- -

Елемент <canvas>

- -
<canvas id="tutorial" width="150" height="150"></canvas>
-
- -

Елемент {{HTMLElement("canvas")}} схожий на елемент {{HTMLElement("img")}} , з єдиною видимою різницею - він не має атрибутів src та alt attributes. Дійсно, <canvas> має лише два атрибути, {{htmlattrxref("width", "canvas")}} та{{htmlattrxref("height", "canvas")}}. Обидва вони не є обов'язковими, та можуть бути задані за допомогою {{Glossary("DOM")}} властивостей. Коли значення width та height не встановлені, canvas за замовчуванням буде 300 пікселів шириною, та 150 пікселів у висоту. Також можливо задати довільні розміри за допомогою  {{Glossary("CSS")}}, але під час ренедерингу зображення буде масштабуватися згідно з його розмірами: якщо задані в CSS параметри не відповідають початковому співвідношенню сторін canvas, воно буде викривленим. 

- -
-

Примітка: Якщо ваше зображення здається викривленимб спробуйте задати атрибути width and height атрибути в тегу <canvas> не використовуючи CSS.

-
- -

Атрибут id не специфіцний для  <canvas>, проте це один з global HTML attributes які можна викростивувати для  HTML елементів (наприклад, class). Використання id завжди є хорошим рішенням, тому що полегшує ідентифікацію елемента в скрипті. .

- -

<canvas> може бути стилізований так само, як і будь-яке звичайне зображення ({{cssxref("margin")}}, {{cssxref("border")}}, {{cssxref("background")}}…). Ці правила, однак, не впливають на фактичний малюнок на canvas. Ми побачимо, як це робиться в спеціальній главі цього підручника. Якщо до canvas не застосовуються правила стилізації, воно за замовчуванням буде повністю прозорим.

- -
-

Резервний вміст

- -

<canvas> відрізняється від {{HTMLElement("img")}} тим, щоя як і для {{HTMLElement("video")}}, {{HTMLElement("audio")}}, або {{HTMLElement("picture")}} елементів, легко визначити деякий резервний вміст, котрий буде відображатися в старих браузерах, що не підтримують <canvas>, таких, як версії Internet Explorer до 9ї версії чи  текстових браузерах. Ви завжди повинні задавати резервний вміст, який буде відображатися в таких браузерах.

- -

Задати резервний вміст дуже просто, достатнь просто вставити альтернативний контент всередину елемента <canvas>. Браузери, які його не підтримують, проігноруюьб контейнер та відобразять альтернативний вміст замість нього. Браузери, які підтримують, пропустять вміст <canvas> і просто покажуть зображення нормально.

- -

наприклад, ми можемо задати текстовий опис вмісту  canvas чи використати статичне зображення динамічно створюваного контентуge of the dynamically rendered content. This can look something like this:

- -
<canvas id="stockGraph" width="150" height="150">
-  current stock price: $3.15 + 0.15
-</canvas>
-
-<canvas id="clock" width="150" height="150">
-  <img src="images/clock.png" width="150" height="150" alt=""/>
-</canvas>
-
- -

Рекомендація користувачу встановити інший браузер, що підтримує canvas,  не допомогає тим з них, хто не може взагалі прочтитати вміст canvas, наприклад. Використання резервного вмісту або додаткового DOM допомогає make the canvas more accessible.

- -

Обов'язковий тег </canvas> 

- -

Як наслідок способу надання резервного вмісту,  на відміну від елемента {{HTMLElement("img")}}, {{HTMLElement("canvas")}} вимагає  закриваючого тега (</canvas>). у випадку його відстусності, весь документ після  </canvas> буде розглядатися як резервний вміст та не буде показаний.

- -

Якщо резервний вміст не потрібен, простий <canvas id="foo" ...></canvas> повністю сумісний з усіма браузерами, що підтримують canvas.

- -

The rendering context

- -

The {{HTMLElement("canvas")}} element creates a fixed-size drawing surface that exposes one or more rendering contexts, which are used to create and manipulate the content shown. In this tutorial, we focus on the 2D rendering context. Other contexts may provide different types of rendering; for example, WebGL uses a 3D context based on OpenGL ES.

- -

The canvas is initially blank. To display something, a script first needs to access the rendering context and draw on it. The {{HTMLElement("canvas")}} element has a method called {{domxref("HTMLCanvasElement.getContext", "getContext()")}}, used to obtain the rendering context and its drawing functions. getContext() takes one parameter, the type of context. For 2D graphics, such as those covered by this tutorial, you specify "2d" to get a {{domxref("CanvasRenderingContext2D")}}.

- -
var canvas = document.getElementById('tutorial');
-var ctx = canvas.getContext('2d');
-
- -

The first line in the script retrieves the node in the DOM representing the {{HTMLElement("canvas")}} element by calling the {{domxref("document.getElementById()")}} method. Once you have the element node, you can access the drawing context using its getContext() method.

- -
-

Checking for support

- -

The fallback content is displayed in browsers which do not support {{HTMLElement("canvas")}}. Scripts can also check for support programmatically by simply testing for the presence of the getContext() method. Our code snippet from above becomes something like this:

- -
var canvas = document.getElementById('tutorial');
-
-if (canvas.getContext) {
-  var ctx = canvas.getContext('2d');
-  // drawing code here
-} else {
-  // canvas-unsupported code here
-}
-
-
-
- -

A skeleton template

- -

Here is a minimalistic template, which we'll be using as a starting point for later examples.

- -
-

Note: it is not good practice to embed a script inside HTML. We do it here to keep the example concise.

-
- -
<!DOCTYPE html>
-<html>
-  <head>
-    <meta charset="utf-8"/>
-    <title>Canvas tutorial</title>
-    <script type="text/javascript">
-      function draw() {
-        var canvas = document.getElementById('tutorial');
-        if (canvas.getContext) {
-          var ctx = canvas.getContext('2d');
-        }
-      }
-    </script>
-    <style type="text/css">
-      canvas { border: 1px solid black; }
-    </style>
-  </head>
-  <body onload="draw();">
-    <canvas id="tutorial" width="150" height="150"></canvas>
-  </body>
-</html>
-
- -

The script includes a function called draw(), which is executed once the page finishes loading; this is done by listening for the {{event("load")}} event on the document. This function, or one like it, could also be called using {{domxref("WindowTimers.setTimeout", "window.setTimeout()")}}, {{domxref("WindowTimers.setInterval", "window.setInterval()")}}, or any other event handler, as long as the page has been loaded first.

- -

Here is how a template would look in action. As shown here, it is initially blank.

- -

{{EmbedLiveSample("A_skeleton_template", 160, 160)}}

- -

A simple example

- -

To begin, let's take a look at a simple example that draws two intersecting rectangles, one of which has alpha transparency. We'll explore how this works in more detail in later examples.

- -
<!DOCTYPE html>
-<html>
- <head>
-  <meta charset="utf-8"/>
-  <script type="application/javascript">
-    function draw() {
-      var canvas = document.getElementById('canvas');
-      if (canvas.getContext) {
-        var ctx = canvas.getContext('2d');
-
-        ctx.fillStyle = 'rgb(200, 0, 0)';
-        ctx.fillRect(10, 10, 50, 50);
-
-        ctx.fillStyle = 'rgba(0, 0, 200, 0.5)';
-        ctx.fillRect(30, 30, 50, 50);
-      }
-    }
-  </script>
- </head>
- <body onload="draw();">
-   <canvas id="canvas" width="150" height="150"></canvas>
- </body>
-</html>
-
- -

This example looks like this:

- -

{{EmbedLiveSample("A_simple_example", 160, 160, "https://mdn.mozillademos.org/files/228/canvas_ex1.png")}}

- -

{{PreviousNext("Web/API/Canvas_API/Tutorial", "Web/API/Canvas_API/Tutorial/Drawing_shapes")}}

diff --git a/files/uk/web/api/canvas_api/tutorial/hit_regions_and_accessibility/index.html b/files/uk/web/api/canvas_api/tutorial/hit_regions_and_accessibility/index.html deleted file mode 100644 index e02e218fa5..0000000000 --- a/files/uk/web/api/canvas_api/tutorial/hit_regions_and_accessibility/index.html +++ /dev/null @@ -1,109 +0,0 @@ ---- -title: Чутливі ділянки та доступність -slug: Web/API/Canvas_API/Tutorial/Hit_regions_and_accessibility -tags: - - Canvas - - Графіка - - Полотно - - Підручник -translation_of: Web/API/Canvas_API/Tutorial/Hit_regions_and_accessibility -original_slug: Web/API/Canvas_API/Tutorial/Чутливі_ділянки_та_доступність ---- -
{{CanvasSidebar}} {{ PreviousNext("Web/API/Canvas_API/Tutorial/Pixel_manipulation_with_canvas", "Web/API/Canvas_API/Tutorial/Optimizing_canvas") }}
- -
Власне HTML-елемент {{HTMLElement("canvas")}} являє собою лише множину кольорових точок і не містить жодних відомостей про намальовані об'єкти. Вміст полотна жодним чином не розкривається інструментам доступності, як це передбачено для семантичного HTML. Тож загалом, слід уникати використання полотен в застосунках або сайтах, від яких вимагається підтримка доступності. Проте наведені нижче настанови допоможуть все ж дещо уприступнити вміст полотен.
- -

Запасний вміст

- -

Вміст між тегами <canvas> … </canvas> може відігравати роль запасного варіанту для тих {{glossary("Browser", "переглядачів")}}, що не мають підтримки полотен. Він також вельми корисний тоді, коли користувач потребує допоміжних засобів (як-от екранний диктор), які можуть читати дерево DOM всередині. Чудовий приклад з html5accessibility.com показує, як це можна здійснити:

- -
<canvas>
-  <h2>Shapes</h2>
-  <p>A rectangle with a black border.
-   In the background is a pink circle.
-   Partially overlaying the <a href="http://en.wikipedia.org/wiki/Circle" onfocus="drawCircle();" onblur="drawPicture();">circle</a>.
-   Partially overlaying the circle is a green
-   <a href="http://en.wikipedia.org/wiki/Square" onfocus="drawSquare();" onblur="drawPicture();">square</a>
-   and a purple <a href="http://en.wikipedia.org/wiki/Triangle" onfocus="drawTriangle();" onblur="drawPicture();">triangle</a>,
-   both of which are semi-opaque, so the full circle can be seen underneath.</p>
-</canvas> 
- -

Перегляньте відео від Стіва Фолкнера про те, як екранний диктор NVDA читає цей приклад.

- -

Правила ARIA

- -

Accessible Rich Internet Applications (ARIA) визначає способи того, як зробити веб-застосунки та вміст доступнішими для людей з певними вадами. Можна вжити ARIA-атрибути для описання поведінки й призначення HTML-елемента полотна:

- -
<canvas id="button" tabindex="0" role="button" aria-pressed="false" aria-label="Start game"></canvas>
-
- -

Дивіться ARIA та Використання ARIA, щоб дізнатись більше.

- -

Чутливі ділянки

- -

Однією з поширених задач є з'ясування того, чи належать координати миші до певної ділянки на полотні. Відповідний API уможливлює створення певних чутливих ділянок на полотні та дає інші можливості розкрити взаємодіяльний вміст полотна інструментам доступності. Він дозволяє полегшити виявлення влучень (належності координат миші певній ділянці) та доправити відповідні події до елементів DOM. Цей API має такі три методи (досі лишаються дослідними в сучасних переглядачах, тож перевіряйте таблиці сумісності):

- -
-
{{domxref("CanvasRenderingContext2D.addHitRegion()")}} {{experimental_inline}}
-
Створює чутливу ділянку на полотні.
-
{{domxref("CanvasRenderingContext2D.removeHitRegion()")}} {{experimental_inline}}
-
Видаляє з полотна чутливу ділянку із зазначеним id .
-
{{domxref("CanvasRenderingContext2D.clearHitRegions()")}} {{experimental_inline}}
-
Видаляє з полотна всі чутливі ділянки.
-
- -

Створюючи новий контур з допомогою {{domxref("CanvasRenderingContext2D.beginPath()")}} можна перетворити його на чутливу ділянку, а тоді, перевіряючи значення властивості {{domxref("MouseEvent.region")}}, з'ясовувати, чи влучає миша у вказану область:

- -

HTML

- -
<canvas id="canvas"></canvas>
- -

JavaScript

- -
var canvas = document.getElementById('canvas');
-var ctx = canvas.getContext('2d');
-
-ctx.beginPath();
-ctx.arc(70, 80, 10, 0, 2 * Math.PI, false);
-ctx.fill();
-ctx.addHitRegion({id: 'circle'});
-
-canvas.addEventListener('mousemove', function(event) {
-  if (event.region) {
-    console.log('Влучив у ділянку: ' + event.region);  // Влучив у ділянку: circle
-  }
-});
-
- -

Крім того, метод addHitRegion() може також приймати параметр control, що вказує елемент (має бути нащадком елемента canvas), до якого доправлятимуться події:

- -
ctx.addHitRegion({control: element});
- -

Наприклад, це може стати в нагоді для доправлення подій до елементів {{HTMLElement("input")}}.

- -

Облямівки фокуса

- -

Для роботи з клавіатури, облямівки фокуса є зручними індикаторами, що полегшують пересування сторінкою. Щоб намалювати облямівку фокуса навколо малюнка (контура) на полотні, можна скористатися методом drawFocusIfNeeded().

- -
-
{{domxref("CanvasRenderingContext2D.drawFocusIfNeeded()")}} {{experimental_inline}}
-
Якщо відповідний елемент перебуває у фокусі, цей метод намалює облямівку навколо контура.
-
- -

Крім того, можна використати метод scrollPathIntoView(), щоб зробити елемент видимим на екрані, якщо він перебуває у фокусі, наприклад.

- -
-
{{domxref("CanvasRenderingContext2D.scrollPathIntoView()")}} {{experimental_inline}}
-
Гортає поточний чи вказаний контур до видимої області.
-
- -

Див. також

- - - -
{{ PreviousNext("Web/API/Canvas_API/Tutorial/Pixel_manipulation_with_canvas", "Web/API/Canvas_API/Tutorial/Optimizing_canvas") }}
diff --git a/files/uk/web/api/canvas_api/tutorial/index.html b/files/uk/web/api/canvas_api/tutorial/index.html deleted file mode 100644 index f712d8ed88..0000000000 --- a/files/uk/web/api/canvas_api/tutorial/index.html +++ /dev/null @@ -1,63 +0,0 @@ ---- -title: Canvas tutorial -slug: Web/API/Canvas_API/Tutorial -tags: - - Canvas - - Graphics - - Guide - - HTML - - HTML5 - - Intermediate - - NeedsTranslation - - TopicStub - - Web -translation_of: Web/API/Canvas_API/Tutorial ---- -
{{CanvasSidebar}}
- -

- -
-

<canvas> is an HTML element which can be used to draw graphics using scripting (usually JavaScript). This can, for instance, be used to draw graphs, make photo composition or simple (and not so simple) animations. The images on this page show examples of <canvas> implementations which will be created in this tutorial.

-
- -

This tutorial describes how to use the <canvas> element to draw 2D graphics, starting with the basics. The examples provided should give you some clear ideas what you can do with canvas and will provide code snippets that may get you started in building your own content.

- -

First introduced in WebKit by Apple for the OS X Dashboard, <canvas> has since been implemented in browsers. Today, all major browsers support it.

- -

Before you start

- -

Using the <canvas> element is not very difficult, but you do need a basic understanding of HTML and JavaScript. The <canvas> element is not supported in some older browsers, but is supported in recent versions of all major browsers. The default size of the canvas is 300 px × 150 px (width × height). But custom sizes can be defined using the HTML height and width property. In order to draw graphics on the canvas we use a JavaScript context object, which creates graphics on the fly.

- -

In this tutorial

- - - -

See also

- - - -

A note to contributors

- -

Due to an unfortunate technical error that occurred the week of June 17, 2013, we lost the history of this tutorial, including attributions to all past contributors to its content. We apologize for this, and hope you'll forgive this unfortunate mishap.

- -
{{ Next("Web/API/Canvas_API/Tutorial/Basic_usage") }}
diff --git a/files/uk/web/api/console/dir/index.html b/files/uk/web/api/console/dir/index.html deleted file mode 100644 index 1f697b7b5e..0000000000 --- a/files/uk/web/api/console/dir/index.html +++ /dev/null @@ -1,104 +0,0 @@ ---- -title: Console.dir() -slug: Web/API/Console/dir -translation_of: Web/API/Console/dir ---- -
{{APIRef("Console API")}}{{Non-standard_header}}
- -

Відображає інтерактивний перелік властивостей заданого JavaScript об'єкту. Кінцеві дані показуються у вигляді ієрархічного списку з трикутниками, клікнувши на які мишкою Ви можете переглянути вміст дочірніх об'єктів.

- -

{{AvailableInWorkers}}

- -

console-dir.png

- -

Синтакс

- -
console.dir(object);
-
- -

Параметри

- -
-
object
-
Об'єкт JavaScript, властивості якого ви хочете переглянути.
-
- -

Сумісність із браузерами

- -

{{CompatibilityTable}}

- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FeatureChromeEdgeFirefox (Gecko)Internet ExplorerOperaSafari
Basic support{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatGeckoDesktop("8.0")}}9{{CompatVersionUnknown}}{{CompatVersionUnknown}}
Available in workers{{CompatUnknown}}{{CompatVersionUnknown}}{{CompatGeckoDesktop("38.0")}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FeatureAndroidEdgeFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Basic support{{CompatUnknown}}{{CompatVersionUnknown}}{{CompatGeckoMobile("8.0")}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}
Available in workers{{CompatUnknown}}{{CompatVersionUnknown}}{{CompatGeckoDesktop("38.0")}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}
-
- -

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

- - diff --git a/files/uk/web/api/console/index.html b/files/uk/web/api/console/index.html deleted file mode 100644 index 8a19610a53..0000000000 --- a/files/uk/web/api/console/index.html +++ /dev/null @@ -1,278 +0,0 @@ ---- -title: Console -slug: Web/API/Console -tags: - - API - - Debugging - - Interface - - NeedsCompatTable - - NeedsTranslation - - Reference - - TopicStub - - console - - web console -translation_of: Web/API/Console ---- -
{{APIRef("Console API")}}
- -

The Console object provides access to the browser's debugging console (e.g., the Web Console in Firefox). The specifics of how it works vary from browser to browser, but there is a de facto set of features that are typically provided.

- -

The Console object can be accessed from any global object, {{domxref("Window")}} on browsing scopes, {{domxref("WorkerGlobalScope")}}, and its specific variants in workers via property console. It's exposed as {{domxref("Window.console")}}, and can be referenced as simply console. For example:

- -
console.log("Failed to open the specified link")
- -

This page documents the {{anch("Methods")}} available on the Console object and gives a few {{anch("Usage")}} examples.

- -

{{AvailableInWorkers}}

- -

Methods

- -
-
{{domxref("Console.assert()")}}
-
Log a message and stack trace to console if first argument is false.
-
{{domxref("Console.clear()")}}
-
Clear the console.
-
{{domxref("Console.count()")}}
-
Log the number of times this line has been called with the given label.
-
{{domxref("Console.debug()")}}
-
An alias for log() - starting with Chromium 58 this method is a no-op on Chromium browsers.
-
{{domxref("Console.dir()")}} {{Non-standard_inline}}
-
Displays an interactive listing of the properties of a specified JavaScript object. This listing lets you use disclosure triangles to examine the contents of child objects.
-
{{domxref("Console.dirxml()")}} {{Non-standard_inline}}
-
-

Displays an XML/HTML Element representation of the specified object if possible or the JavaScript Object view if it is not.

-
-
{{domxref("Console.error()")}}
-
Outputs an error message. You may use string substitution and additional arguments with this method.
-
{{domxref("Console.exception()")}} {{Non-standard_inline}} {{deprecated_inline}}
-
An alias for error()
-
{{domxref("Console.group()")}}
-
Creates a new inline group, indenting all following output by another level. To move back out a level, call groupEnd().
-
{{domxref("Console.groupCollapsed()")}}
-
Creates a new inline group, indenting all following output by another level; unlike group(), this starts with the inline group collapsed, requiring the use of a disclosure button to expand it. To move back out a level, call groupEnd().
-
{{domxref("Console.groupEnd()")}}
-
Exits the current inline group.
-
{{domxref("Console.info()")}}
-
Informative logging information. You may use string substitution and additional arguments with this method.
-
{{domxref("Console.log()")}}
-
For general output of logging information. You may use string substitution and additional arguments with this method.
-
{{domxref("Console.profile()")}} {{Non-standard_inline}}
-
Starts the browser's build-in profiler (for example, the Firefox performance tool). You can specify an optional name for the profile.
-
{{domxref("Console.profileEnd()")}} {{Non-standard_inline}}
-
Stops the profiler. You can see the resulting profile in the browser's performance tool (for example, the Firefox performance tool).
-
{{domxref("Console.table()")}}
-
Displays tabular data as a table.
-
{{domxref("Console.time()")}}
-
Starts a timer with a name specified as an input parameter. Up to 10,000 simultaneous timers can run on a given page.
-
{{domxref("Console.timeEnd()")}}
-
Stops the specified timer and logs the elapsed time in seconds since its start.
-
{{domxref("Console.timeStamp()")}} {{Non-standard_inline}}
-
Adds a marker to the browser's Timeline or Waterfall tool.
-
{{domxref("Console.trace()")}}
-
Outputs a stack trace.
-
{{domxref("Console.warn()")}}
-
Outputs a warning message. You may use string substitution and additional arguments with this method.
-
- - -

Usage

- -

Outputting text to the console

- -

The most frequently-used feature of the console is logging of text and other data. There are four categories of output you can generate, using the {{domxref("console.log()")}}, {{domxref("console.info()")}}, {{domxref("console.warn()")}}, and {{domxref("console.error()")}} methods. Each of these results in output that's styled differently in the log, and you can use the filtering controls provided by your browser to only view the kinds of output that interest you.

- -

There are two ways to use each of the output methods; you can simply pass in a list of objects whose string representations get concatenated into one string, then output to the console, or you can pass in a string containing zero or more substitution strings followed by a list of the objects with which to replace them.

- -

Outputting a single object

- -

The simplest way to use the logging methods is to output a single object:

- -
var someObject = { str: "Some text", id: 5 };
-console.log(someObject);
-
- -

The output looks something like this:

- -
[09:27:13.475] ({str:"Some text", id:5})
- -

Outputting multiple objects

- -

You can also output multiple objects by simply listing them when calling the logging method, like this:

- -
var car = "Dodge Charger";
-var someObject = {str:"Some text", id:5};
-console.info("My first car was a", car, ". The object is: ", someObject);
- -

This output will look like this:

- -
[09:28:22.711] My first car was a Dodge Charger . The object is:  ({str:"Some text", id:5})
-
- -

Using string substitutions

- -

Gecko 9.0 {{geckoRelease("9.0")}} introduced support for string substitutions. When passing a string to one of the console object's methods that accepts a string, you may use these substitution strings:

- - - - - - - - - - - - - - - - - - - - - - - - -
Substitution stringDescription
%o or %OOutputs a JavaScript object. Clicking the object name opens more information about it in the inspector.
%d or %iOutputs an integer. Number formatting is supported, for example  console.log("Foo %.2d", 1.1) will output the number as two significant figures with a leading 0: Foo 01
%sOutputs a string.
%fOutputs a floating-point value. Formatting is supported, for example  console.log("Foo %.2f", 1.1) will output the number to 2 decimal places: Foo 1.10
- -

Each of these pulls the next argument after the format string off the parameter list. For example:

- -
for (var i=0; i<5; i++) {
-  console.log("Hello, %s. You've called me %d times.", "Bob", i+1);
-}
-
- -

The output looks like this:

- -
[13:14:13.481] Hello, Bob. You've called me 1 times.
-[13:14:13.483] Hello, Bob. You've called me 2 times.
-[13:14:13.485] Hello, Bob. You've called me 3 times.
-[13:14:13.487] Hello, Bob. You've called me 4 times.
-[13:14:13.488] Hello, Bob. You've called me 5 times.
-
- -

Styling console output

- -

You can use the "%c" directive to apply a CSS style to console output:

- -
console.log("This is %cMy stylish message", "color: yellow; font-style: italic; background-color: blue;padding: 2px");
- -
The text before the directive will not be affected, but the text after the directive will be styled using the CSS declarations in the parameter.
- -
 
- -
- -
 
- -
-

Note: Quite a few CSS properties are supported by this styling; you should experiment and see which ones provide useful.

-
- -
 
- -
{{h3_gecko_minversion("Using groups in the console", "9.0")}}
- -

You can use nested groups to help organize your output by visually combining related material. To create a new nested block, call console.group(). The console.groupCollapsed() method is similar, but creates the new block collapsed, requiring the use of a disclosure button to open it for reading.

- -
Note: Collapsed groups are not supported yet in Gecko; the groupCollapsed() method is the same as group() at this time.
- -

To exit the current group, simply call console.groupEnd(). For example, given this code:

- -
console.log("This is the outer level");
-console.group();
-console.log("Level 2");
-console.group();
-console.log("Level 3");
-console.warn("More of level 3");
-console.groupEnd();
-console.log("Back to level 2");
-console.groupEnd();
-console.debug("Back to the outer level");
-
- -

The output looks like this:

- -

nesting.png

- -
{{h3_gecko_minversion("Timers", "10.0")}}
- -

In order to calculate the duration of a specific operation, Gecko 10 introduced the support of timers in the console object. To start a timer, call the console.time() method, giving it a name as the only parameter. To stop the timer, and to get the elapsed time in milliseconds, just call the console.timeEnd() method, again passing the timer's name as the parameter. Up to 10,000 timers can run simultaneously on a given page.

- -

For example, given this code:

- -
console.time("answer time");
-alert("Click to continue");
-console.timeEnd("answer time");
-
- -

will log the time needed by the user to discard the alert box:

- -

timerresult.png

- -

Notice that the timer's name is displayed both when the timer is started and when it's stopped.

- -
Note: It's important to note that if you're using this to log the timing for network traffic, the timer will report the total time for the transaction, while the time listed in the network panel is just the amount of time required for the header. If you have response body logging enabled, the time listed for the response header and body combined should match what you see in the console output.
- -

Stack traces

- -

The console object also supports outputting a stack trace; this will show you the call path taken to reach the point at which you call {{domxref("console.trace()")}}. Given code like this:

- -
function foo() {
-  function bar() {
-    console.trace();
-  }
-  bar();
-}
-
-foo();
-
- -

The output in the console looks something like this:

- -

- -

Specifications

- - - - - - - - - - - - - - -
SpecificationStatusComment
{{SpecName('Console API')}}{{Spec2('Console API')}}Initial definition.
- -

Notes

- - - -

See also

- - - -

Other implementations

- - diff --git a/files/uk/web/api/console/log/index.html b/files/uk/web/api/console/log/index.html deleted file mode 100644 index 8155ab780b..0000000000 --- a/files/uk/web/api/console/log/index.html +++ /dev/null @@ -1,173 +0,0 @@ ---- -title: Console.log() -slug: Web/API/Console/log -translation_of: Web/API/Console/log ---- -
{{APIRef("Console API")}}
- -

Виводить повідомлення  у веб консоль.

- -

Повідомлення може бути одним рядком (з необов'язковими значеннями заміщення) або може бути будь-яким одним або декількома об'єктами JavaScript.

- -

{{AvailableInWorkers}}

- -

Синтаксис

- -
console.log(obj1 [, obj2, ..., objN]);
-console.log(msg [, subst1, ..., substN]);
-
- -

Параметри

- -
-
obj1 ... objN
-
Перелік  JavaScript об'єктів для відображення. Представлення  кожного з цих об'єктів  об'єднаних разом та відображених в порядку переліку. Будьте обачливі, якщо ви вносите об'єкти в логи у останніх версіях Chrome та Firefox, адже те, що ви отримуєте у логах в консолі - це посилання на об'єкти, які не обов'язково є "значенням" даного об'єкту на момент виклику console.log(), але точно є значенням об'єкту в момент кліку по ньому, щоб відкрити.
-
msg
-
 JavaScript рядок містить нуль або більше  символів підміни.
-
subst1 ... substN
-
JavaScript об'єкти за допомогою яких можливо заміняти символи підміни в межах msg. Це надає додатковий контроль формату виводу.
-
- -

Дивіться Вивід тексту в консоль у документації {{domxref("console")}} більш детально.

- -

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

- - - - - - - - - - - - - - - - -
СпецифікаціяСтатусКоментар
{{SpecName("Console API", "#log", "console.log()")}}{{Spec2("Console API")}}Initial definition
- -

Сумісність із браузерами

- -

{{CompatibilityTable}}

- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ОзнакаChromeEdgeFirefox (Gecko)Internet ExplorerOperaSafari
Базова підтримка{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatGeckoDesktop("2.0")}}8{{CompatVersionUnknown}}{{CompatVersionUnknown}}
Рядки заміщення{{CompatVersionUnknown}}
- {{CompatChrome(28)}}[1]
{{CompatVersionUnknown}}{{CompatGeckoDesktop("9.0")}}10[2]{{CompatVersionUnknown}}{{CompatVersionUnknown}}
Доступність для "воркерів"{{CompatUnknown}}{{CompatVersionUnknown}}{{CompatGeckoDesktop("38.0")}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ОзнакаAndroidEdgeFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Базова підтримка{{CompatUnknown}}{{CompatVersionUnknown}}{{CompatGeckoMobile("2.0")}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}
Рядки заміщення{{CompatUnknown}}{{CompatVersionUnknown}}{{CompatGeckoMobile("9.0")}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}
Доступність для "воркерів"{{CompatUnknown}}{{CompatVersionUnknown}}{{CompatGeckoMobile("38.0")}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}
-
- -

[1] Якщо від`ємне значення прямує до %d, воно буде заокруглене до найближчого від`ємного цілого, тому -0.1 стає -1.

- -

[2] %c не підтримується, %d буде візуалізоване, як 0, якщо це не є числом.

- -

Різниця із console.dir()

- -

Ви можете запитати себе, яка ж відмінність між console.dir() та console.log().

- -

Інша корисна відмінність існує у Chrome, коли відбувається надсилання DOM- елементів до консолі.

- -

- -

Помітимо:

- - - -

Зокрема, console.log надає спеціальну обробку для DOM - елементів, тоді як console.dir цього не робить. Це часто виявляється корисним при спробі отримати повне уявлення про об`єкти DOM JS.

- -

Більше інформації про ці та інші функції можна отримати за посиланням: Chrome Console API.

- -

Також перегляньте:

- - diff --git a/files/uk/web/api/customevent/index.html b/files/uk/web/api/customevent/index.html deleted file mode 100644 index 76b8aeef1a..0000000000 --- a/files/uk/web/api/customevent/index.html +++ /dev/null @@ -1,96 +0,0 @@ ---- -title: CustomEvent -slug: Web/API/CustomEvent -tags: - - API - - DOM - - Interface - - NeedsCompatTable - - NeedsExample - - NeedsTranslation - - Reference - - TopicStub -translation_of: Web/API/CustomEvent ---- -

{{APIRef("DOM")}} Інтерфейс CustomEvent являє собою події, ініціалізовані додатком для будь-яких цілей.

- -

{{AvailableInWorkers}}

- -

Конструктор

- -
-
{{domxref("CustomEvent.CustomEvent", "CustomEvent()")}}
-
Створює CustomEvent.
-
- -

Властивості

- -
-
{{domxref("CustomEvent.detail")}} {{readonlyinline}}
-
Будь-які дані, передані при ініціалізації події.
-
- -

Цей інтерфейс успадковує властивості від батьків, {{domxref("Event")}}:

- -

{{Page("/en-US/docs/Web/API/Event", "Properties")}}

- -

Методи

- -
-
{{domxref("CustomEvent.initCustomEvent()")}} {{deprecated_inline}}
-
-

Ініціалізує об'єкт CustomEvent. Якщо подія вже відправлена, цей метод нічого не робить.

-
-
- -

Цей інтерфейс успадковує властивості від батьків, {{domxref("Event")}}:

- -

{{Page("/en-US/docs/Web/API/Event", "Methods")}}

- -

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

- - - - - - - - - - - - - - - - -
СпецифікаціяСтатусКомертарі
{{SpecName('DOM WHATWG','#interface-customevent','CustomEvent')}}{{Spec2('DOM WHATWG')}}Початкове визначення.
- -

Браузерна сумісність

- - - -

{{Compat("api.CustomEvent")}}

- -

Firing from privileged code to non-privileged code

- -

When firing a CustomEvent from privileged code (i.e. an extension) to non-privileged code (i.e. a webpage), security issues should be considered. Firefox and other Gecko applications restrict an object created in one context from being directly used for another, which will automatically prevent security holes, but these restrictions may also prevent your code from running as expected.

- -

While creating a CustomEvent object, you must create the object from the same window. The detail attribute of your CustomEvent will be subjected to the same restrictions. String and Array values will be readable by the content without restrictions, but custom Objects will not. While using a custom Object, you will need to define the attributes of that object that are readable from the content script using Components.utils.cloneInto().

- -
// doc is a reference to the content document
-function dispatchCustomEvent(doc) {
-  var eventDetail = Components.utils.cloneInto({foo: 'bar'}, doc.defaultView);
-  var myEvent = doc.defaultView.CustomEvent("mytype", eventDetail);
-  doc.dispatchEvent(myEvent);
-}
- -

But one needs to keep in mind that exposing a function will allow the content script to run it with chrome privileges, which can open a security vulnerability.

- -

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

- - diff --git a/files/uk/web/api/customevent/initcustomevent/index.html b/files/uk/web/api/customevent/initcustomevent/index.html deleted file mode 100644 index 84ea6d6a28..0000000000 --- a/files/uk/web/api/customevent/initcustomevent/index.html +++ /dev/null @@ -1,120 +0,0 @@ ---- -title: CustomEvent.initCustomEvent() -slug: Web/API/CustomEvent/initCustomEvent -translation_of: Web/API/CustomEvent/initCustomEvent ---- -

{{APIRef("DOM")}}{{deprecated_header}}

- -

Метод CustomEvent.initCustomEvent() ініціалізує  CustomEvent об'єкт. Якщо на момент ініціалізації event-об'єкт вже був переданий(dispatched), то виклик метода {{ domxref("CustomEvent.initCustomEvent()") }} не матиме ніякого ефекту.

- -

Події,ініціалізовані у такий спосіб, повинні бути створені за допомогою метода {{domxref("Document.createEvent()") }}.Вказаний метод має бути викликаний для створення події до того, як вона буде передана за допомогою {{ domxref("EventTarget.dispatchEvent()") }}. Як тільки подія є переданою, ніяких дій цей метод більше не виконує. 

- -
-

Більше не використовуйте цей метод, оскільки він засуджується.

- -

Натомість, використовуйте спеціальні конструктори подій, наприклад {{domxref("CustomEvent.CustomEvent", "CustomEvent()")}}. Сторінка про  Creating and triggering events містить більше інформації про способи їхнього використання.

-
- -

Синтаксис

- -
event.initCustomEvent(type, canBubble, cancelable, detail);
-
- -

Параметри

- -
-
type
-
Це {{domxref("DOMString")}} , що містить назву події
-
canBubble
-
Це {{jsxref("Boolean")}} , що вказує чи подія виринає вгору(bubbles up) крізь DOM чи ні.
-
cancelable
-
Це {{jsxref("Boolean")}} , що вказує чи подія є cancelable.
-
detail
-
Дані, передані під час ініціалізації події
-
- -

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

- - - - - - - - - - - - - - - - -
СпецифікаціяСтатусОпис
{{SpecName('DOM WHATWG','#dom-customevent-initcustomevent','CustomEvent')}}{{Spec2('DOM WHATWG')}}Початкове визначення, однак, вже вважається небажаним, натомість, рекомендується використання конструктора,{{domxref("CustomEvent.CustomEvent", "CustomEvent()")}}
- -

Браузерна сумісність

- -

{{ CompatibilityTable() }}

- -
- - - - - - - - - - - - - - - - - - - - - -
ОписChromeEdgeFirefox (Gecko)Internet ExplorerOperaSafari (WebKit)
-

Базова підтримка

-
{{ CompatVersionUnknown() }}[1]{{CompatVersionUnknown}}{{CompatGeckoDesktop(6)}}9115.1 (533.3)
-
- -
- - - - - - - - - - - - - - - - - - - - - - - -
ОписAndroid WebviewChrome для AndroidEdgeFirefox Mobile (Gecko)IE PhoneOpera MobileSafari Mobile
Базова підтримка{{ CompatVersionUnknown() }}[1]{{ CompatVersionUnknown() }}[1]{{CompatVersionUnknown}}{{CompatGeckoMobile(6)}}{{ CompatUnknown() }}{{ CompatUnknown() }}{{ CompatUnknown() }}
-
- -

[1] Починаючи з Chrome 59, canBubble, cancelable, та detail є необов'язковими параметрами , які за замовчуванням містять значення false, false, та null відповідно.

- -

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

- - diff --git a/files/uk/web/api/document/index.html b/files/uk/web/api/document/index.html deleted file mode 100644 index 491eaa618e..0000000000 --- a/files/uk/web/api/document/index.html +++ /dev/null @@ -1,470 +0,0 @@ ---- -title: Document -slug: Web/API/Document -tags: - - API - - DOM - - Інтерфейс - - Документ - - Посилання -translation_of: Web/API/Document ---- -
{{APIRef}}
- -
 
- -

Document інтерфейс представляє будь-яку веб-сторінку, завантажену в браузер і яка слугує точкою входу в контент веб-сторінки, чим є DOM tree. DOM tree включає елементи такі як {{HTMLElement("body")}} і {{HTMLElement("table")}}, серед багатьох інших. Це забезпечує глобальну функціональність для документу, таку як отримувати URL сторінки і створювати нові елементи в документі.

- -

{{inheritanceDiagram}}

- -

Інтерфейс Document описує загальні властивості і методи для будь-якого типу документу. Залежно від типу документу (e.g. HTML, XML, SVG, …), більший API доступний: HTML-документи, які подаються з text/html типом контенту, також реалізовують {{domxref("HTMLDocument")}} інтерфейс, тоді як XML і SVG документи реалізовують {{domxref("XMLDocument")}} інтерфейс.

- -

Конструктор

- -
-
{{domxref("Document.Document","Document()")}}{{non-standard_inline}}
-
Створює новий Document об'єкт.
-
- -

Властивості

- -

Цей інтерфейс також розширює {{domxref("Node")}} і {{domxref("EventTarget")}} інтерфейси.

- -
-
{{domxref("Document.all")}} {{Deprecated_inline}} {{non-standard_inline}}
-
Забезпечує доступ до всіх елементів в документі. Це застарілий, нестандартний інтерфейс і він не повинен використовуватись.
-
{{domxref("Document.async")}} {{Deprecated_inline}}
-
Використовується з {{domxref("Document.load")}} щоб вказати асинхронний запит.
-
{{domxref("Document.body")}}
-
Повертає {{HTMLElement("body")}}, або {{htmlelement("frameset")}} вузол поточного документу.
-
{{domxref("Document.characterSet")}} {{readonlyinline}}
-
Повертає кодування, яке використовується в документі.
-
{{domxref("Document.charset")}} {{readonlyinline}} {{Deprecated_inline}}
-
Псевдонім для {{domxref("Document.characterSet")}}. Використовуй цю властивість взамін.
-
{{domxref("Document.compatMode")}} {{readonlyinline}} {{experimental_inline}}
-
Вказує чи документ інтерпретується в quirks чи strict режимі.
-
{{domxref("Document.contentType")}} {{readonlyinline}} {{experimental_inline}}
-
Повертає Content-Type з MIME-заголовку поточного документу.
-
{{domxref("Document.doctype")}} {{readonlyinline}}
-
Повертає Визначення Типу Документу (DTD) поточного документу.
-
{{domxref("Document.documentElement")}} {{readonlyinline}}
-
Повертає {{domxref("Element")}}, який є прямим нащадком document. Для HTML-документів, це, як правило, {{domxref("HTMLElement")}} елемент.
-
{{domxref("Document.documentURI")}} {{readonlyinline}}
-
Повертає розміщення документу у вигляді стрічки.
-
{{domxref("Document.domConfig")}} {{Deprecated_inline}}
-
Повинна повертати {{domxref("DOMConfiguration")}} об'єкт.
-
{{domxref("Document.fullscreen")}} {{obsolete_inline}}
-
true,якщо документ в {{domxref("Using_full-screen_mode","full-screen mode")}}.
-
{{domxref("Document.hidden")}} {{readonlyinline}}
-
-
{{domxref("Document.implementation")}} {{readonlyinline}}
-
Повертає DOM реалізацію, асоційовану з поточним документом.
-
{{domxref("Document.inputEncoding")}} {{readonlyinline}} {{Deprecated_inline}}
-
Псевдонім для {{domxref("Document.characterSet")}}. Використовуй цю властивість взамін.
-
{{domxref("Document.lastStyleSheetSet")}} {{readonlyinline}}
-
Повертає ім'я набору стилів, які були останніми включені.  Має значення null, аж поки таблиця стилів змінена встановленням значення {{domxref("document.selectedStyleSheetSet","selectedStyleSheetSet")}}.
-
{{domxref("Document.mozSyntheticDocument")}} {{non-standard_inline}} {{gecko_minversion_inline("8.0")}}
-
Повертає {{jsxref("Boolean")}}, яким є true лише якщо цей документ є синтетичним, таким як окреме зображення, відео-, аудіо-файл, або т. п.
-
{{domxref("Document.mozFullScreenElement")}} {{readonlyinline}} {{non-standard_inline}} {{gecko_minversion_inline("9.0")}}
-
Елемент, який зараз є в повноекранному режимі для цього документу.
-
{{domxref("Document.mozFullScreenEnabled")}} {{readonlyinline}} {{non-standard_inline}} {{gecko_minversion_inline("9.0")}}
-
true, якщо виклик {{domxref("Element.mozRequestFullscreen()")}} буде успішним в поточному документі.
-
{{domxref("Document.preferredStyleSheetSet")}} {{readonlyinline}}
-
Повертає бажаний набір стилів, як вказано автором сторінки.
-
{{domxref("Document.scrollingElement")}} {{readonlyinline}}
-
Повертає посилання на {{domxref("Element")}} ,який прокручує документ.
-
{{domxref("Document.selectedStyleSheetSet")}}
-
Повертає набір стилів, який зараз у використанні.
-
{{domxref("Document.styleSheetSets")}} {{readonlyinline}}
-
Повертає список наборів стилів, доступних для документу.
-
{{domxref("Document.timeline")}} {{readonlyinline}}
-
-
{{domxref("Document.undoManager")}} {{readonlyinline}} {{experimental_inline}}
-
-
{{domxref("Document.visibilityState")}} {{readonlyinline}}
-
-

Повертає string, яка виражає видимість стану документу. Можливими значеннями є visiblehiddenprerender, і unloaded.

-
-
{{domxref("Document.xmlEncoding")}} {{Deprecated_inline}}
-
Повертає кодування, як визначено XML-оголошенням.
-
{{domxref("Document.xmlStandalone")}} {{obsolete_inline("10.0")}}
-
Повертає true, якщо оголошення XML  вказує документу бути автономним (e.g., Зовнішня частина DTD впливає на контент документу), або false.
-
{{domxref("Document.xmlVersion")}} {{obsolete_inline("10.0")}}
-
Повертає номер версії, як вказано в XML-оголошенні, або "1.0", якщо оголошення відсутнє.
-
- -

Document інтерфейс розширюється {{domxref("ParentNode")}} інтерфейсом:

- -

{{page("/en-US/docs/Web/API/ParentNode","Properties")}}

- -

 Розширення для HTML-документу

- -

Інтерфейс Document для HTML-документів розширює {{domxref("HTMLDocument")}} інтерфейс, або, починаючи з HTML5,  розширюється для таких документів.

- -
-
{{domxref("Document.alinkColor")}} {{Deprecated_inline}}
-
Повертає або встановлює колір активних посилань в тілі документу.
-
{{domxref("Document.anchors")}}
-
Повертає список всіх якорів в документі.
-
{{domxref("Document.applets")}} {{Deprecated_inline}}
-
Повертає впорядкований список апплетів в межах документу.
-
{{domxref("Document.bgColor")}} {{Deprecated_inline}}
-
Отримує/встановлює фоновий колір поточного документу.
-
{{domxref("Document.cookie")}}
-
Повертає список куків, розділених крапкою з комою, для того документу або встановлює одиничний кукі.
-
{{domxref("Document.defaultView")}} {{readonlyinline}}
-
Повертає посилання на об'єкт window.
-
{{domxref("Document.designMode")}}
-
Отримує/встановлює можливість редагування цілого документу.
-
{{domxref("Document.dir")}} {{readonlyinline}}
-
Отримує/встановлює направленість (rtl - справа наліво/ltr зліва направо) документу.
-
{{domxref("Document.domain")}}
-
Отримує/встановлює домен поточного документу.
-
{{domxref("Document.embeds")}} {{readonlyinline}}
-
Повертає список вбудованих {{HTMLElement('embed')}} елементів в межах поточного документу.
-
{{domxref("document.fgColor")}} {{Deprecated_inline}}
-
Отримує/встановлює колір переднього плану, або колір тексту поточного документу.
-
{{domxref("Document.forms")}} {{readonlyinline}}
-
Повертає список {{HTMLElement("form")}} елементів в межах поточного документу.
-
{{domxref("Document.head")}} {{readonlyinline}}
-
Повертає {{HTMLElement("head")}} елемент поточного документу.
-
{{domxref("Document.height")}} {{non-standard_inline}} {{obsolete_inline}}
-
Отримує/встановлює висоту поточного документу.
-
{{domxref("Document.images")}} {{readonlyinline}}
-
Повертає список зображень в поточному документі.
-
{{domxref("Document.lastModified")}} {{readonlyinline}}
-
Повертає дату, коли документ був востаннє змінений.
-
{{domxref("Document.linkColor")}} {{Deprecated_inline}}
-
Отримує/встановлює колір гіперпосилань в документі.
-
{{domxref("Document.links")}} {{readonlyinline}}
-
Повертає список всіх гіперпосилань в документі.
-
{{domxref("Document.location")}} {{readonlyinline}}
-
Повертає URI поточного документу.
-
{{domxref("Document.plugins")}} {{readonlyinline}}
-
Повертає список доступних плагінів.
-
{{domxref("Document.readyState")}} {{readonlyinline}}  {{gecko_minversion_inline("1.9.2")}}
-
Повертає статус завантаження документу.
-
{{domxref("Document.referrer")}} {{readonlyinline}}
-
Повертає URI сторінки, яка прив'язана до цієї сторінки.
-
{{domxref("Document.scripts")}} {{readonlyinline}}
-
Повертає всі {{HTMLElement("script")}} елементи в документі.
-
{{domxref("Document.title")}}
-
Встановлює або отримує назву поточного документу.
-
{{domxref("Document.URL")}} {{readonlyInline}}
-
Повертає розміщення документу у вигляді стрічки.
-
{{domxref("Document.vlinkColor")}} {{Deprecated_inline}}
-
Отримує/встановлює колір відвіданих гіперпосилань.
-
{{domxref("Document.width")}} {{non-standard_inline}} {{obsolete_inline}}
-
Повертає ширину поточного документу.
-
- -

Властивості, включені з DocumentOrShadowRoot

- -

Інтерфейс Document включає наступні властивості, визначені в {{domxref("DocumentOrShadowRoot")}} міксині. Зверни увагу, що це, на даний час, реалізовано в Chrome; інші браузери все ще реалізують їх безпосередньо через {{domxref("Document")}} інтерфейс.

- -
-
{{domxref("DocumentOrShadowRoot.activeElement")}} {{readonlyInline}}
-
Returns the {{domxref('Element')}} within the shadow tree that has focus.
-
{{domxref("Document.fullscreenElement")}} {{readonlyinline}}
-
The element that's currently in full screen mode for this document.
-
{{domxref("DocumentOrShadowRoot.pointerLockElement")}} {{readonlyinline}} {{experimental_inline}}
-
Returns the element set as the target for mouse events while the pointer is locked. null if lock is pending, pointer is unlocked, or if the target is in another document.
-
{{domxref("DocumentOrShadowRoot.styleSheets")}} {{readonlyInline}}
-
Returns a {{domxref('StyleSheetList')}} of {{domxref('CSSStyleSheet')}} objects for stylesheets explicitly linked into, or embedded in a document.
-
- -

Event handlers

- -
-
{{domxref("Document.onafterscriptexecute")}} {{non-standard_inline}}
-
Represents the event handling code for the {{event("afterscriptexecute")}} event.
-
{{domxref("Document.onbeforescriptexecute")}} {{non-standard_inline}}
-
Represents the event handling code for the {{event("beforescriptexecute")}} event.
-
{{domxref("Document.oncopy")}} {{non-standard_inline}}
-
Represents the event handling code for the {{event("copy")}} event.
-
{{domxref("Document.oncut")}} {{non-standard_inline}}
-
Represents the event handling code for the {{event("cut")}} event.
-
{{domxref("Document.onfullscreenchange")}}
-
Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("fullscreenchange")}} event is raised.
-
{{domxref("Document.onfullscreenerror")}}
-
Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("fullscreenerror")}} event is raised.
-
{{domxref("Document.onpaste")}} {{non-standard_inline}}
-
Represents the event handling code for the {{event("paste")}} event.
-
{{domxref("Document.onpointerlockchange")}} {{experimental_inline}}
-
Represents the event handling code for the {{event("pointerlockchange")}} event.
-
{{domxref("Document.onpointerlockerror")}} {{experimental_inline}}
-
Represents the event handling code for the {{event("pointerlockerror")}} event.
-
{{domxref("Document.onreadystatechange")}} {{gecko_minversion_inline("1.9.2")}}
-
Represents the event handling code for the {{event("readystatechange")}} event.
-
{{domxref("Document.onselectionchange")}} {{experimental_inline}}
-
Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("selectionchange")}} event is raised.
-
{{domxref("Document.onvisibilitychange")}}
-
Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("visibilitychange")}} event is raised.
-
{{domxref("Document.onwheel")}} {{non-standard_inline}}
-
Represents the event handling code for the {{event("wheel")}} event.
-
- -

The Document interface is extended with the {{domxref("GlobalEventHandlers")}} interface:

- -

{{Page("/en-US/docs/Web/API/GlobalEventHandlers", "Properties")}}

- -

Методи

- -

Цей інтерфейс також розширює {{domxref("Node")}} і {{domxref("EventTarget")}} інтерфейси.

- -
-
{{domxref("Document.adoptNode()")}}
-
Приймає вузол із зовнішнього документу.
-
{{domxref("Document.captureEvents()")}} {{Deprecated_inline}}
-
Дивись {{domxref("Window.captureEvents")}}.
-
{{domxref("Document.caretRangeFromPoint()")}}{{non-standard_inline}}
-
Отримує об'єкт {{Domxref("Range")}} для фрагмента документу у відповідності до вказаних координат.
-
{{domxref("Document.createAttribute()")}}
-
Створює новий об'єкт {{domxref("Attr")}} і повертає його.
-
{{domxref("Document.createAttributeNS()")}}
-
Створює  новий вузол атрибута в заданому просторі імен і повертає його.
-
{{domxref("Document.createCDATASection()")}}
-
Створює новий вузол CDATA і повертає його.
-
{{domxref("Document.createComment()")}}
-
 Створює новий вузол коментаря і повертає його.
-
{{domxref("Document.createDocumentFragment()")}}
-
Створює новий фрагмент документу.
-
{{domxref("Document.createElement()")}}
-
Створює новий елемент із заданим ім'ям тега.
-
{{domxref("Document.createElementNS()")}}
-
Створює новий елемент із заданим ім'ям тега і URI простором імен.
-
{{domxref("Document.createEntityReference()")}} {{obsolete_inline}}
-
Створює нове посилання на об'єкт і повертає його.
-
{{domxref("Document.createEvent()")}}
-
Створює об'єкт події.
-
{{domxref("Document.createNodeIterator()")}}
-
Створює об'єкт {{domxref("NodeIterator")}}.
-
{{domxref("Document.createProcessingInstruction()")}}
-
Створює новий об'єкт {{domxref("ProcessingInstruction")}}.
-
{{domxref("Document.createRange()")}}
-
Створює об'єкт {{domxref("Range")}}.
-
{{domxref("Document.createTextNode()")}}
-
Створює текстовий вузол.
-
{{domxref("Document.createTouch()")}} {{Deprecated_inline}}
-
Створює об'єкт {{domxref("Touch")}}.
-
{{domxref("Document.createTouchList()")}}
-
Створює об'єкт {{domxref("TouchList")}}.
-
{{domxref("Document.createTreeWalker()")}}
-
 Створює об'єкт{{domxref("TreeWalker")}}.
-
{{domxref("Document.enableStyleSheetsForSet()")}}
-
Вмикає таблиці стилів для вказаного набору таблиць стилів.
-
{{domxref("Document.exitPointerLock()")}} {{experimental_inline}}
-
Звільняє блокування вказівника.
-
{{domxref("Document.getAnimations()")}} {{experimental_inline}}
-
Повертає масив всіх об'єктів {{domxref("Animation")}}, які діють на даний момент, чиї цільові елементи є нащадками document.
-
{{domxref("Document.getElementsByClassName()")}}
-
Повертає список елементів із заданим ім'ям класу.
-
{{domxref("Document.getElementsByTagName()")}}
-
Повертає список елементів із заданим ім'ям тега.
-
{{domxref("Document.getElementsByTagNameNS()")}}
-
Повертає список елементів із заданим ім'ям тега і простором імен.
-
{{domxref("Document.importNode()")}}
-
Повертає клон вузла з зовнішнього документу.
-
{{domxref("Document.normalizeDocument()")}} {{obsolete_inline}}
-
Заміняє сутності, нормалізує текстові вузли, і т. д.
-
{{domxref("Document.releaseCapture()")}} {{non-standard_inline}} {{gecko_minversion_inline("2.0")}}
-
Звільняє поточний захват мишки, якщо він знаходиться на елементі в цьому документі.
-
{{domxref("Document.releaseEvents()")}} {{non-standard_inline}} {{Deprecated_inline}}
-
Дивись {{domxref("Window.releaseEvents()")}}.
-
{{domxref("Document.routeEvent()")}} {{non-standard_inline}} {{obsolete_inline(24)}}
-
Дивись {{domxref("Window.routeEvent()")}}.
-
{{domxref("Document.mozSetImageElement()")}} {{non-standard_inline}} {{gecko_minversion_inline("2.0")}}
-
Дозволяє змінити елемент, який використовуєтья в якості фонового зображення для вказаного ідентифікатора елемента. 
-
- -

Інтерфейс Document розширюється інтерфейсом {{domxref("ParentNode")}}:

- -
-
{{domxref("document.getElementById","document.getElementById(String id)")}}
-
Повертає посилання на об'єкт визначеного елемента.
-
{{domxref("document.querySelector","document.querySelector(String selector)")}} {{gecko_minversion_inline("1.9.1")}}
-
Повертає перший Element-вузол в межах документу, в порядку документу, який співпадає зі вказаними селекторами.
-
{{domxref("document.querySelectorAll","document.querySelectorAll(String selector)")}} {{gecko_minversion_inline("1.9.1")}}
-
Повертає список всіх Element-вузлів в межах документу, які співпадають з вказаними селекторами.
-
- -

Інтерфейс Document розширюється інтерфейсом {{domxref("XPathEvaluator")}}:

- -
-
{{domxref("document.createExpression","document.createExpression(String expression, XPathNSResolver resolver)")}}
-
Компілює XPathExpression який може тоді бути використаний для (повторюваних) оцінювань.
-
{{domxref("document.createNSResolver","document.createNSResolver(Node resolver)")}}
-
Створює об'єкт {{domxref("XPathNSResolver")}}.
-
{{domxref("document.evaluate","document.evaluate(String expression, Node contextNode, XPathNSResolver resolver, Number type, Object result)")}}
-
Вираховує вираз XPath.
-
- -

Розширення для HTML-документів

- -

інтерфейс Document для HTML-документів наслідується від інтерфейсу {{domxref("HTMLDocument")}} або, починаючи з HTML5,  розширюється для таких документів:

- -
-
{{domxref("document.clear()")}} {{non-standard_inline}} {{Deprecated_inline}}
-
In majority of modern browsers, including recent versions of Firefox and Internet Explorer, this method does nothing.
-
{{domxref("document.close()")}}
-
Closes a document stream for writing.
-
{{domxref("document.execCommand","document.execCommand(String command[, Boolean showUI[, String value]])")}}
-
On an editable document, executes a formating command.
-
{{domxref("document.getElementsByName","document.getElementsByName(String name)")}}
-
Returns a list of elements with the given name.
-
{{domxref("document.hasFocus()")}}
-
Returns true if the focus is currently located anywhere inside the specified document.
-
{{domxref("document.open()")}}
-
Opens a document stream for writing.
-
{{domxref("document.queryCommandEnabled","document.queryCommandEnabled(String command)")}}
-
Returns true if the formating command can be executed on the current range.
-
{{domxref("document.queryCommandIndeterm","document.queryCommandIndeterm(String command)")}}
-
Returns true if the formating command is in an indeterminate state on the current range.
-
{{domxref("document.queryCommandState","document.queryCommandState(String command)")}}
-
Returns true if the formating command has been executed on the current range.
-
{{domxref("document.queryCommandSupported","document.queryCommandSupported(String command)")}}
-
Returns true if the formating command is supported on the current range.
-
{{domxref("document.queryCommandValue","document.queryCommandValue(String command)")}}
-
Returns the current value of the current range for a formating command.
-
{{domxref("document.write","document.write(String text)")}}
-
Writes text in a document.
-
{{domxref("document.writeln","document.writeln(String text)")}}
-
Writes a line of text in a document.
-
- -

Methods included from DocumentOrShadowRoot

- -

The Document interface includes the following methods defined on the {{domxref("DocumentOrShadowRoot")}} mixin. Note that this is currently only implemented by Chrome; other browsers still implement them on the {{domxref("Document")}} interface.

- -
-
{{domxref("DocumentOrShadowRoot.getSelection()")}}
-
Returns a {{domxref('Selection')}} object representing the range of text selected by the user, or the current position of the caret.
-
{{domxref("DocumentOrShadowRoot.elementFromPoint()")}}
-
Returns the topmost element at the specified coordinates.
-
{{domxref("DocumentOrShadowRoot.elementsFromPoint()")}}
-
Returns an array of all elements at the specified coordinates.
-
{{domxref("DocumentOrShadowRoot.caretPositionFromPoint()")}}
-
Returns a {{domxref('CaretPosition')}} object containing the DOM node containing the caret, and caret's character offset within that node.
-
- -

Specifications

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
SpecificationStatusComment
{{SpecName('Page Visibility API', '#onvisiblitychange-event-handler', 'onvisibilitychange')}}{{Spec2('Page Visibility API')}}Adds onvisibilitychange.
{{SpecName('Selection API', '', 'Extend Document and GlobalEventHandlers')}}{{Spec2('Selection API')}}Adds onselectstart and onselectionchange.
{{SpecName('DOM1','#i-Document','Document')}}{{Spec2('DOM1')}}Initial definition for the interface
{{SpecName('DOM2 Core','#i-Document','Document')}}{{Spec2('DOM2 Core')}}Supersede DOM 1
{{SpecName('DOM3 Core','#i-Document','Document')}}{{Spec2('DOM3 Core')}}Supersede DOM 2
{{SpecName('DOM WHATWG','#interface-document','Document')}}{{Spec2('DOM WHATWG')}}Intend to supersede DOM 3
{{SpecName('HTML WHATWG','dom.html#the-document-object','Document')}}{{Spec2('HTML WHATWG')}}Turn the {{domxref("HTMLDocument")}} interface into a Document extension.
{{SpecName('DOM3 XPath','xpath.html#XPathEvaluator','XPathEvaluator')}}{{Spec2('DOM3 XPath')}}Define the {{domxref("XPathEvaluator")}} interface which extend document.
{{SpecName('Page Visibility API', '#sec-document-interface', 'Document')}}{{Spec2('Page Visibility API')}}Extend the Document interface with the visibilityState and hidden attributes
{{SpecName('HTML Editing','#dom-document-getselection','Document')}}{{Spec2('HTML Editing')}}Extend the Document interface
{{SpecName('CSSOM View','#extensions-to-the-document-interface','Document')}}{{Spec2('CSSOM View')}}Extend the Document interface
{{SpecName('CSSOM','#extensions-to-the-document-interface','Document')}}{{Spec2('CSSOM')}}Extend the Document interface
{{SpecName('Pointer Lock','#extensions-to-the-document-interface','Document')}}{{Spec2('Pointer Lock')}}Extend the Document interface
- -

Browser compatibility notes

- -

Firefox notes

- -

Mozilla defines a set of non-standard properties made only for XUL content:

- -
-
{{domxref("document.currentScript")}} {{non-standard_inline}} {{gecko_minversion_inline("2.0")}}
-
Returns the {{HTMLElement("script")}} element that is currently executing.
-
{{domxref("document.documentURIObject")}} {{gecko_minversion_inline("1.9")}}
-
(Mozilla add-ons only!) Returns the {{Interface("nsIURI")}} object representing the URI of the document. This property only has special meaning in privileged JavaScript code (with UniversalXPConnect privileges).
-
{{domxref("document.popupNode")}}
-
Returns the node upon which a popup was invoked.
-
{{domxref("document.tooltipNode")}}
-
Returns the node which is the target of the current tooltip.
-
- -

Mozilla also define some non-standard methods:

- -
-
{{domxref("document.execCommandShowHelp")}} {{obsolete_inline("14.0")}}
-
This method never did anything and always threw an exception, so it was removed in Gecko 14.0 {{geckoRelease("14.0")}}.
-
{{domxref("document.getBoxObjectFor")}} {{obsolete_inline}}
-
Use the {{domxref("Element.getBoundingClientRect()")}} method instead.
-
{{domxref("document.loadOverlay")}}
-
Loads a XUL overlay dynamically. This only works in XUL documents.
-
{{domxref("document.queryCommandText")}} {{obsolete_inline("14.0")}}
-
This method never did anything but throw an exception, and was removed in Gecko 14.0 {{geckoRelease("14.0")}}.
-
- -

Internet Explorer notes

- -

Microsoft defines some non-standard properties:

- -
-
{{domxref("document.fileSize")}}* {{non-standard_inline}} {{obsolete_inline}}
-
Returns size in bytes of the document. Starting with Internet Explorer 11, that property is no longer supported. See MSDN.
-
Internet Explorer does not support all methods from the Node interface in the Document interface:
-
- -
-
{{domxref("document.contains")}}
-
As a work-around, document.body.contains() can be used.
-
diff --git a/files/uk/web/api/document/visibilitychange_event/index.html b/files/uk/web/api/document/visibilitychange_event/index.html deleted file mode 100644 index be68d28a48..0000000000 --- a/files/uk/web/api/document/visibilitychange_event/index.html +++ /dev/null @@ -1,82 +0,0 @@ ---- -title: 'Документ: зміна видимості' -slug: Web/API/Document/visibilitychange_event -tags: - - API - - API відображення сторінки - - visibilitychange - - відображення сторінки - - фоновий режим -translation_of: Web/API/Document/visibilitychange_event ---- -
{{APIRef}}
- -

Подія  visibilitychange запускається в документі, коли вміст його вкладки змінився, став видимим або прихованим.

- - - - - - - - - - - - - - - - - - - - -
БульбашкиТак
СкасовуєтьсяНі
Інтерфейс{{domxref("event")}}
Свойство обработчика события{{domxref("Document.onvisibilitychange", "onvisibilitychange")}}
- -

Інформація про використання

- -

У подію не включено оновлення статусу видимості документа, але цю інформацію можна отримати з властивості {{domxref ("Document.visibilityState", "visibilityState")}} документа.

- -

Приклади

- -

У цьому прикладі починається відтворення музичного запису, коли документ стає видимим, і призупиняється відтворення музики, коли документ більше не видно.

- -
document.addEventListener("visibilitychange", function() {
-  if (document.visibilityState === 'visible') {
-    backgroundMusic.play();
-  } else {
-    backgroundMusic.pause();
-  }
-});
-
- -

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

- - - - - - - - - - - - - - - - -
СпецифікаціяСтатусКоментар
{{SpecName('Page Visibility API','#sec-visibilitychange-event','visibilitychange')}}{{Spec2('Page Visibility API')}}
- -

Сумісність з браузерами

- -

{{Compat("api.Document.visibilitychange")}}

- -

Дивись також

- - diff --git a/files/uk/web/api/domstring/index.html b/files/uk/web/api/domstring/index.html deleted file mode 100644 index 54ba0dee57..0000000000 --- a/files/uk/web/api/domstring/index.html +++ /dev/null @@ -1,45 +0,0 @@ ---- -title: DOMString -slug: Web/API/DOMString -translation_of: Web/API/DOMString ---- -
{{APIRef("DOM")}}
- -

DOMString  є 16-бітовою послідовністю безнакових цілих, типово інтерпретуєтьсят як UTF-16 code units. Це точно відповідає до JavaScript примітивному типу String. Коли DOMString застосовється у JavaScript, це напряму відображує відповідну {{jsxref("String")}}.

- -

When a Web API accepts a DOMString, the value provided will be stringified, using the ToString abstract operation. (For types other than Symbol, this has the same behavior as the {{jsxref("String/String", "String()")}} function.)

- -

Certain Web APIs accepting a DOMString have an additional legacy behavior, where passing {{jsxref("null")}} stringifies to the empty string instead of the usual "null".

- -

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

- - - - - - - - - - - - - - - - - - - - - -
SpecificationStatusComment
{{SpecName('WebIDL', '#idl-DOMString', 'DOMString')}}{{Spec2('WebIDL')}}
{{SpecName('WebIDL', '#es-DOMString')}}{{Spec2('WebIDL')}}This defines how JavaScript values are converted to DOMString and vice versa.
- -

Також дивися:

- - diff --git a/files/uk/web/api/element/getclientrects/index.html b/files/uk/web/api/element/getclientrects/index.html deleted file mode 100644 index 5a88f0321c..0000000000 --- a/files/uk/web/api/element/getclientrects/index.html +++ /dev/null @@ -1,219 +0,0 @@ ---- -title: Element.getClientRects() -slug: Web/API/Element/getClientRects -translation_of: Web/API/Element/getClientRects ---- -
{{APIRef("DOM")}}
- -

getClientRects() метод {{domxref("Element")}} інтерфейсу повертає колекцію {{DOMxRef("DOMRect")}} об'єктів, які позначають границі прямокутників для кожної CSS border box в клієнта.

- -

Syntax

- -
let rectCollection = object.getClientRects();
- -

Return value

- -

Повернене значення є колекцією {{DOMxRef("DOMRect")}} об'єктів, один для кожної CSS border box асоційованої з елементом. Кожен {{DOMxRef("DOMRect")}} об'єкт містить лише для читання left, top, right і bottom властивості, які описують border box, в пікселях, з top-left відносно до top-left видимої області веб-сторінки. For tables with captions, the caption is included even though it's outside the border box of the table. When called on SVG elements other than an outer-<svg>, the "viewport" that the resulting rectangles are relative to is the viewport that the element's outer-<svg> establishes (and to be clear, the rectangles are also transformed by the outer-<svg>'s viewBox transform, if any).

- -

Originally, Microsoft intended this method to return a TextRectangle object for each line of text. However, the CSSOM working draft specifies that it returns a {{DOMxRef("DOMRect")}} for each border box. For an inline element, the two definitions are the same. But for a block element, Mozilla will return only a single rectangle.

- -

{{Fx_MinVersion_Note(3.5, "Firefox 3.5 adds width and height properties to the TextRectangle object.")}}

- -

The amount of scrolling that has been done of the viewport area (or any other scrollable element) is taken into account when computing the rectangles.

- -

The returned rectangles do not include the bounds of any child elements that might happen to overflow.

- -

For HTML {{HtmlElement("area")}} elements, SVG elements that do not render anything themselves, display:none elements, and generally any elements that are not directly rendered, an empty list is returned.

- -

Rectangles are returned even for CSS boxes that have empty border-boxes. The left, top, right, and bottom coordinates can still be meaningful.

- -

Fractional pixel offsets are possible.

- -

Examples

- -

These examples draw client rects in various colors. Note that the JavaScript function that paints the client rects is connected to the markup via the class withClientRectsOverlay.

- -

HTML

- -

Example 1: This HTML creates three paragraphs with a <span> inside, each embedded in a <div> block. Client rects are painted for the paragraph in the second block, and for the <span> element in the third block.

- -
<h3>A paragraph with a span inside</h3>
-<p>Both the span and the paragraph have a border set. The
-  client rects are in red. Note that the p has onlyone border
-  box, while the span has multiple border boxes.</p>
-
-<div>
-  <strong>Original</strong>
-  <p>
-    <span>Paragraph that spans multiple lines</span>
-  </p>
-</div>
-
-<div>
-  <strong>p's rect</strong>
-  <p class="withClientRectsOverlay">
-    <span>Paragraph that spans multiple lines</span>
-  </p>
-</div>
-
-<div>
-  <strong>span's rect</strong>
-  <p>
-    <span class="withClientRectsOverlay">Paragraph that spans multiple lines</span>
-  </p>
-</div>
- -

Example 2: This HTML creates three ordered lists. Client rects are painted for the <ol> in the second block, and for each <li> element in the third block.

- -
<h3>A list</h3>
-<p>Note that the border box doesn't include the number, so
-  neither do the client rects.</p>
-
-<div>
-  <strong>Original</strong>
-  <ol>
-    <li>Item 1</li>
-    <li>Item 2</li>
-  </ol>
-</div>
-
-<div>
-  <strong>ol's rect</strong>
-  <ol class="withClientRectsOverlay">
-    <li>Item 1</li>
-    <li>Item 2</li>
-  </ol>
-</div>
-
-<div>
-  <strong>each li's rect</strong>
-  <ol>
-    <li class="withClientRectsOverlay">Item 1</li>
-    <li class="withClientRectsOverlay">Item 2</li>
-  </ol>
-</div>
- -

Example 3: This HTML creates two tables with captions. Client rects are painted for the <table> in the second block.

- -
<h3>A table with a caption</h3>
-<p>Although the table's border box doesn't include the
-  caption, the client rects do include the caption.</p>
-
-<div>
-  <strong>Original</strong>
-  <table>
-    <caption>caption</caption>
-    <thead>
-      <tr><th>thead</th></tr>
-    </thead>
-    <tbody>
-      <tr><td>tbody</td></tr>
-    </tbody>
-  </table>
-</div>
-
-<div>
-  <strong>table's rect</strong>
-  <table class="withClientRectsOverlay">
-    <caption>caption</caption>
-    <thead>
-      <tr><th>thead</th></tr>
-    </thead>
-    <tbody>
-      <tr><td>tbody</td></tr>
-    </tbody>
-  </table>
-</div>
- -

CSS

- -

The CSS draws borders around the paragraph and the <span> inside each <div> block for the first example, around the <ol> and li for the second example, and around <table>, <th>, and <td> elements for the third example.

- -
strong {
-  text-align: center;
-}
-div {
-  display: inline-block;
-  width: 150px;
-}
-div p, ol, table {
-  border: 1px solid blue;
-}
-span, li, th, td {
-  border: 1px solid green;
-}
- -

JavaScript

- -

The JavaScript code draws the client rects for all HTML elements that have CSS class withClientRectsOverlay assigned.

- -
function addClientRectsOverlay(elt) {
-  /* Absolutely position a div over each client rect so that its border width
-     is the same as the rectangle's width.
-     Note: the overlays will be out of place if the user resizes or zooms. */
-  var rects = elt.getClientRects();
-  for (var i = 0; i != rects.length; i++) {
-    var rect = rects[i];
-    var tableRectDiv = document.createElement('div');
-    tableRectDiv.style.position = 'absolute';
-    tableRectDiv.style.border = '1px solid red';
-    var scrollTop = document.documentElement.scrollTop || document.body.scrollTop;
-    var scrollLeft = document.documentElement.scrollLeft || document.body.scrollLeft;
-    tableRectDiv.style.margin = tableRectDiv.style.padding = '0';
-    tableRectDiv.style.top = (rect.top + scrollTop) + 'px';
-    tableRectDiv.style.left = (rect.left + scrollLeft) + 'px';
-    // We want rect.width to be the border width, so content width is 2px less.
-    tableRectDiv.style.width = (rect.width - 2) + 'px';
-    tableRectDiv.style.height = (rect.height - 2) + 'px';
-    document.body.appendChild(tableRectDiv);
-  }
-}
-
-(function() {
-  /* Call function addClientRectsOverlay(elt) for all elements with
-     assigned class "withClientRectsOverlay" */
-  var elt = document.getElementsByClassName('withClientRectsOverlay');
-  for (var i = 0; i < elt.length; i++) {
-    addClientRectsOverlay(elt[i]);
-  }
-})();
- -

Result

- -

{{EmbedLiveSample('Examples', 680, 650)}}

- -

Specifications

- - - - - - - - - - - - - - - - -
SpecificationStatusComment
{{SpecName("CSSOM View", "#dom-element-getclientrects", "Element.getClientRects()")}}{{Spec2("CSSOM View")}}Initial definition
- -

Notes

- -

getClientRects() was first introduced in the MS IE DHTML object model.

- -

Browser compatibility

- - - -

{{Compat("api.Element.getClientRects")}}

- -

See also

- - diff --git a/files/uk/web/api/element/index.html b/files/uk/web/api/element/index.html deleted file mode 100644 index aa007c48e7..0000000000 --- a/files/uk/web/api/element/index.html +++ /dev/null @@ -1,490 +0,0 @@ ---- -title: Element -slug: Web/API/Element -tags: - - API - - DOM - - DOM Reference - - Element - - Interface - - NeedsTranslation - - Reference - - TopicStub - - Web API -translation_of: Web/API/Element ---- -
{{APIRef("DOM")}}
- -

Elementце найбільш загальний базовий классз якого наслідуються всі об'єкти {{DOMxRef("Document")}} .  Тільки він має методи та властивості, загальні для всіх видів елементів. Більшість специфічних классів наслідуються з Element. Наприклад, {{DOMxRef("HTMLElement")}} інтерфейс є базовим інтерфейсом для HTML елементів, тоді як {{DOMxRef("SVGElement")}} інтерфейс є базовим для усіх SVG елементів. Більшість функціональності визначається ще далі у ієрархії классу.

- -

Мови за межами сфери Web платформ, такі як XUL, через інтерфейс XULElement , також застосовують Element.

- -

{{InheritanceDiagram}}implement

- -

Properties

- -

Inherits properties from its parent interface, {{DOMxRef("Node")}}, and by extension that interface's parent, {{DOMxRef("EventTarget")}}. It implements the properties of {{DOMxRef("ParentNode")}}, {{DOMxRef("ChildNode")}}, {{DOMxRef("NonDocumentTypeChildNode")}}, and {{DOMxRef("Animatable")}}.

- -
-
{{DOMxRef("Element.attributes")}} {{readOnlyInline}}
-
Returns a {{DOMxRef("NamedNodeMap")}} object containing the assigned attributes of the corresponding HTML element.
-
{{DOMxRef("Element.classList")}} {{readOnlyInline}}
-
Returns a {{DOMxRef("DOMTokenList")}} containing the list of class attributes.
-
{{DOMxRef("Element.className")}}
-
Is a {{DOMxRef("DOMString")}} representing the class of the element.
-
{{DOMxRef("Element.clientHeight")}} {{readOnlyInline}}
-
Returns a {{jsxref("Number")}} representing the inner height of the element.
-
{{DOMxRef("Element.clientLeft")}} {{readOnlyInline}}
-
Returns a {{jsxref("Number")}} representing the width of the left border of the element.
-
{{DOMxRef("Element.clientTop")}} {{readOnlyInline}}
-
Returns a {{jsxref("Number")}} representing the width of the top border of the element.
-
{{DOMxRef("Element.clientWidth")}} {{readOnlyInline}}
-
Returns a {{jsxref("Number")}} representing the inner width of the element.
-
{{DOMxRef("Element.computedName")}} {{readOnlyInline}}
-
Returns a {{DOMxRef("DOMString")}} containing the label exposed to accessibility.
-
{{DOMxRef("Element.computedRole")}} {{readOnlyInline}}
-
Returns a {{DOMxRef("DOMString")}} containing the ARIA role that has been applied to a particular element. 
-
{{DOMxRef("Element.id")}}
-
Is a {{DOMxRef("DOMString")}} representing the id of the element.
-
{{DOMxRef("Element.innerHTML")}}
-
Is a {{DOMxRef("DOMString")}} representing the markup of the element's content.
-
{{DOMxRef("Element.localName")}} {{readOnlyInline}}
-
A {{DOMxRef("DOMString")}} representing the local part of the qualified name of the element.
-
{{DOMxRef("Element.namespaceURI")}} {{readonlyInline}}
-
The namespace URI of the element, or null if it is no namespace. -
-

Note: In Firefox 3.5 and earlier, HTML elements are in no namespace. In later versions, HTML elements are in the http://www.w3.org/1999/xhtml namespace in both HTML and XML trees. {{ gecko_minversion_inline("1.9.2")}}

-
-
-
{{DOMxRef("NonDocumentTypeChildNode.nextElementSibling")}} {{readOnlyInline}}
-
Is an {{DOMxRef("Element")}}, the element immediately following the given one in the tree, or null if there's no sibling node.
-
{{DOMxRef("Element.outerHTML")}}
-
Is a {{DOMxRef("DOMString")}} representing the markup of the element including its content. When used as a setter, replaces the element with nodes parsed from the given string.
-
{{DOMxRef("Element.prefix")}} {{readOnlyInline}}
-
A {{DOMxRef("DOMString")}} representing the namespace prefix of the element, or null if no prefix is specified.
-
{{DOMxRef("NonDocumentTypeChildNode.previousElementSibling")}} {{readOnlyInline}}
-
Is a {{DOMxRef("Element")}}, the element immediately preceding the given one in the tree, or null if there is no sibling element.
-
{{DOMxRef("Element.scrollHeight")}} {{readOnlyInline}}
-
Returns a {{jsxref("Number")}} representing the scroll view height of an element.
-
{{DOMxRef("Element.scrollLeft")}}
-
Is a {{jsxref("Number")}} representing the left scroll offset of the element.
-
{{DOMxRef("Element.scrollLeftMax")}} {{Non-standard_Inline}} {{readOnlyInline}}
-
Returns a {{jsxref("Number")}} representing the maximum left scroll offset possible for the element.
-
{{DOMxRef("Element.scrollTop")}}
-
A {{jsxref("Number")}} representing number of pixels the top of the document is scrolled vertically.
-
{{DOMxRef("Element.scrollTopMax")}} {{Non-standard_Inline}} {{readOnlyInline}}
-
Returns a {{jsxref("Number")}} representing the maximum top scroll offset possible for the element.
-
{{DOMxRef("Element.scrollWidth")}} {{readOnlyInline}}
-
Returns a {{jsxref("Number")}} representing the scroll view width of the element.
-
{{DOMxRef("Element.shadowRoot")}}{{readOnlyInline}}
-
Returns the open shadow root that is hosted by the element, or null if no open shadow root is present.
-
{{DOMxRef("Element.openOrClosedShadowRoot")}} {{Non-standard_Inline}}{{readOnlyInline}}
-
Returns the shadow root that is hosted by the element, regardless if its open or closed. Available only to WebExtensions.
-
{{DOMxRef("Element.slot")}} {{Experimental_Inline}}
-
Returns the name of the shadow DOM slot the element is inserted in.
-
{{DOMxRef("Element.tabStop")}} {{Non-standard_Inline}}
-
Is a {{jsxref("Boolean")}} indicating if the element can receive input focus via the tab key.
-
{{DOMxRef("Element.tagName")}} {{readOnlyInline}}
-
Returns a {{jsxref("String")}} with the name of the tag for the given element.
-
{{DOMxRef("Element.undoManager")}} {{Experimental_Inline}} {{readOnlyInline}}
-
Returns the {{DOMxRef("UndoManager")}} associated with the element.
-
{{DOMxRef("Element.undoScope")}} {{Experimental_Inline}}
-
Is a {{jsxref("Boolean")}} indicating if the element is an undo scope host, or not.
-
- -
-

Note: DOM Level 3 defined namespaceURI, localName and prefix on the {{DOMxRef("Node")}} interface. In DOM4 they were moved to Element.

- -

This change is implemented in Chrome since version 46.0 and Firefox since version 48.0.

-
- -

Properties included from Slotable

- -

The Element interface includes the following property, defined on the {{DOMxRef("Slotable")}} mixin.

- -
-
{{DOMxRef("Slotable.assignedSlot")}}{{readonlyInline}}
-
Returns a {{DOMxRef("HTMLSlotElement")}} representing the {{htmlelement("slot")}} the node is inserted in.
-
- -

Event handlers

- -
-
{{domxref("Element.onfullscreenchange")}}
-
An event handler for the {{event("fullscreenchange")}} event, which is sent when the element enters or exits full-screen mode. This can be used to watch both for successful expected transitions, but also to watch for unexpected changes, such as when your app is running in the background.
-
{{domxref("Element.onfullscreenerror")}}
-
An event handler for the {{event("fullscreenerror")}} event, which is sent when an error occurs while attempting to change into full-screen mode.
-
- -

Methods

- -

Inherits methods from its parents {{DOMxRef("Node")}}, and its own parent, {{DOMxRef("EventTarget")}}, and implements those of {{DOMxRef("ParentNode")}}, {{DOMxRef("ChildNode")}}, {{DOMxRef("NonDocumentTypeChildNode")}}, and {{DOMxRef("Animatable")}}.

- -
-
{{DOMxRef("EventTarget.addEventListener()")}}
-
Registers an event handler to a specific event type on the element.
-
{{DOMxRef("Element.attachShadow()")}}
-
Attaches a shadow DOM tree to the specified element and returns a reference to its {{DOMxRef("ShadowRoot")}}.
-
{{DOMxRef("Element.animate()")}} {{Experimental_Inline}}
-
A shortcut method to create and run an animation on an element. Returns the created Animation object instance.
-
{{DOMxRef("Element.closest()")}} {{Experimental_Inline}}
-
Returns the {{DOMxRef("Element")}} which is the closest ancestor of the current element (or the current element itself) which matches the selectors given in parameter.
-
{{DOMxRef("Element.createShadowRoot()")}} {{Non-standard_Inline}} {{Deprecated_Inline}}
-
Creates a shadow DOM on on the element, turning it into a shadow host. Returns a {{DOMxRef("ShadowRoot")}}.
-
{{DOMxRef("Element.computedStyleMap()")}} {{Experimental_Inline}}
-
Returns a {{DOMxRef("StylePropertyMapReadOnly")}} interface which provides a read-only representation of a CSS declaration block that is an alternative to {{DOMxRef("CSSStyleDeclaration")}}.
-
{{DOMxRef("EventTarget.dispatchEvent()")}}
-
Dispatches an event to this node in the DOM and returns a {{jsxref("Boolean")}} that indicates whether no handler canceled the event.
-
{{DOMxRef("Element.getAnimations()")}} {{Experimental_Inline}}
-
Returns an array of Animation objects currently active on the element.
-
{{DOMxRef("Element.getAttribute()")}}
-
Retrieves the value of the named attribute from the current node and returns it as an {{jsxref("Object")}}.
-
{{DOMxRef("Element.getAttributeNames()")}}
-
Returns an array of attribute names from the current element.
-
{{DOMxRef("Element.getAttributeNS()")}}
-
Retrieves the value of the attribute with the specified name and namespace, from the current node and returns it as an {{jsxref("Object")}}.
-
{{DOMxRef("Element.getAttributeNode()")}} {{Obsolete_Inline}}
-
Retrieves the node representation of the named attribute from the current node and returns it as an {{DOMxRef("Attr")}}.
-
{{DOMxRef("Element.getAttributeNodeNS()")}} {{Obsolete_Inline}}
-
Retrieves the node representation of the attribute with the specified name and namespace, from the current node and returns it as an {{DOMxRef("Attr")}}.
-
{{DOMxRef("Element.getBoundingClientRect()")}}
-
Returns the size of an element and its position relative to the viewport.
-
{{DOMxRef("Element.getClientRects()")}}
-
Returns a collection of rectangles that indicate the bounding rectangles for each line of text in a client.
-
{{DOMxRef("Element.getElementsByClassName()")}}
-
Returns a live {{DOMxRef("HTMLCollection")}} that contains all descendants of the current element that possess the list of classes given in the parameter.
-
{{DOMxRef("Element.getElementsByTagName()")}}
-
Returns a live {{DOMxRef("HTMLCollection")}} containing all descendant elements, of a particular tag name, from the current element.
-
{{DOMxRef("Element.getElementsByTagNameNS()")}}
-
Returns a live {{DOMxRef("HTMLCollection")}} containing all descendant elements, of a particular tag name and namespace, from the current element.
-
{{DOMxRef("Element.hasAttribute()")}}
-
Returns a {{jsxref("Boolean")}} indicating if the element has the specified attribute or not.
-
{{DOMxRef("Element.hasAttributeNS()")}}
-
Returns a {{jsxref("Boolean")}} indicating if the element has the specified attribute, in the specified namespace, or not.
-
{{DOMxRef("Element.hasAttributes()")}}
-
Returns a {{jsxref("Boolean")}} indicating if the element has one or more HTML attributes present.
-
{{DOMxRef("Element.hasPointerCapture()")}}
-
Indicates whether the element on which it is invoked has pointer capture for the pointer identified by the given pointer ID.
-
{{DOMxRef("Element.insertAdjacentElement()")}}
-
Inserts a given element node at a given position relative to the element it is invoked upon.
-
{{DOMxRef("Element.insertAdjacentHTML()")}}
-
Parses the text as HTML or XML and inserts the resulting nodes into the tree in the position given.
-
{{DOMxRef("Element.insertAdjacentText()")}}
-
Inserts a given text node at a given position relative to the element it is invoked upon.
-
{{DOMxRef("Element.matches()")}} {{Experimental_Inline}}
-
Returns a {{jsxref("Boolean")}} indicating whether or not the element would be selected by the specified selector string.
-
{{DOMxRef("Element.pseudo()")}} {{Experimental_Inline}}
-
Returns a {{DOMxRef("CSSPseudoElement")}} representing the child pseudo-element matched by the specified pseudo-element selector.
-
{{DOMxRef("Element.querySelector()")}}
-
Returns the first {{DOMxRef("Node")}} which matches the specified selector string relative to the element.
-
{{DOMxRef("Element.querySelectorAll()")}}
-
Returns a {{DOMxRef("NodeList")}} of nodes which match the specified selector string relative to the element.
-
{{DOMxRef("Element.releasePointerCapture()")}}
-
Releases (stops) pointer capture that was previously set for a specific {{DOMxRef("PointerEvent","pointer event")}}.
-
{{DOMxRef("ChildNode.remove()")}} {{Experimental_Inline}}
-
Removes the element from the children list of its parent.
-
{{DOMxRef("Element.removeAttribute()")}}
-
Removes the named attribute from the current node.
-
{{DOMxRef("Element.removeAttributeNS()")}}
-
Removes the attribute with the specified name and namespace, from the current node.
-
{{DOMxRef("Element.removeAttributeNode()")}} {{Obsolete_Inline}}
-
Removes the node representation of the named attribute from the current node.
-
{{DOMxRef("EventTarget.removeEventListener()")}}
-
Removes an event listener from the element.
-
{{DOMxRef("Element.requestFullscreen()")}} {{Experimental_Inline}}
-
Asynchronously asks the browser to make the element full-screen.
-
{{DOMxRef("Element.requestPointerLock()")}} {{Experimental_Inline}}
-
Allows to asynchronously ask for the pointer to be locked on the given element.
-
- -
-
{{domxref("Element.scroll()")}}
-
Scrolls to a particular set of coordinates inside a given element.
-
{{domxref("Element.scrollBy()")}}
-
Scrolls an element by the given amount.
-
{{DOMxRef("Element.scrollIntoView()")}} {{Experimental_Inline}}
-
Scrolls the page until the element gets into the view.
-
{{domxref("Element.scrollTo()")}}
-
Scrolls to a particular set of coordinates inside a given element.
-
{{DOMxRef("Element.setAttribute()")}}
-
Sets the value of a named attribute of the current node.
-
{{DOMxRef("Element.setAttributeNS()")}}
-
Sets the value of the attribute with the specified name and namespace, from the current node.
-
{{DOMxRef("Element.setAttributeNode()")}} {{Obsolete_Inline}}
-
Sets the node representation of the named attribute from the current node.
-
{{DOMxRef("Element.setAttributeNodeNS()")}} {{Obsolete_Inline}}
-
Sets the node representation of the attribute with the specified name and namespace, from the current node.
-
{{DOMxRef("Element.setCapture()")}} {{Non-standard_Inline}}
-
Sets up mouse event capture, redirecting all mouse events to this element.
-
{{DOMxRef("Element.setPointerCapture()")}}
-
Designates a specific element as the capture target of future pointer events.
-
{{DOMxRef("Element.toggleAttribute()")}}
-
Toggles a boolean attribute, removing it if it is present and adding it if it is not present, on the specified element.
-
- -

Events

- -

Listen to these events using addEventListener() or by assigning an event listener to the oneventname property of this interface.

- -
-
{{domxref("Element/cancel_event", "cancel")}}
-
Fires on a {{HTMLElement("dialog")}} when the user instructs the browser that they wish to dismiss the current open dialog. For example, the browser might fire this event when the user presses the Esc key or clicks a "Close dialog" button which is part of the browser's UI.
- Also available via the {{domxref("GlobalEventHandlers/oncancel", "oncancel")}} property.
-
error
-
Fired when when a resource failed to load, or can't be used. For example, if a script has an execution error or an image can't be found or is invalid.
- Also available via the {{domxref("GlobalEventHandlers/onerror", "onerror")}} property.
-
{{domxref("Element/scroll_event", "scroll")}}
-
Fired when the document view or an element has been scrolled.
- Also available via the {{DOMxRef("GlobalEventHandlers.onscroll", "onscroll")}} property.
-
{{domxref("Element/select_event", "select")}}
-
Fired when some text has been selected.
- Also available via the {{DOMxRef("GlobalEventHandlers.onselect", "onselect")}} property.
-
{{domxref("Element/show_event", "show")}}
-
Fired when a contextmenu event was fired on/bubbled to an element that has a contextmenu attribute. {{deprecated_inline}}
- Also available via the {{DOMxRef("GlobalEventHandlers.onshow", "onshow")}} property.
-
{{domxref("Element/wheel_event","wheel")}}
-
Fired when the user rotates a wheel button on a pointing device (typically a mouse).
- Also available via the {{DOMxRef("GlobalEventHandlers.onwheel", "onwheel")}} property.
-
- -

Clipboard events

- -
-
{{domxref("Element/copy_event", "copy")}}
-
Fired when the user initiates a copy action through the browser's user interface.
- Also available via the {{domxref("HTMLElement/oncopy", "oncopy")}} property.
-
{{domxref("Element/cut_event", "cut")}}
-
Fired when the user initiates a cut action through the browser's user interface.
- Also available via the {{domxref("HTMLElement/oncut", "oncut")}} property.
-
{{domxref("Element/paste_event", "paste")}}
-
Fired when the user initiates a paste action through the browser's user interface.
- Also available via the {{domxref("HTMLElement/onpaste", "onpaste")}} property.
-
- -

Composition events

- -
-
{{domxref("Element/compositionend_event", "compositionend")}}
-
Fired when a text composition system such as an {{glossary("input method editor")}} completes or cancels the current composition session.
-
{{domxref("Element/compositionstart_event", "compositionstart")}}
-
Fired when a text composition system such as an {{glossary("input method editor")}} starts a new composition session.
-
{{domxref("Element/compositionupdate_event", "compositionupdate")}}
-
Fired when a new character is received in the context of a text composition session controlled by a text composition system such as an {{glossary("input method editor")}}.
-
- -

Focus events

- -
-
{{domxref("Element/blur_event", "blur")}}
-
Fired when an element has lost focus.
- Also available via the {{domxref("GlobalEventHandlers/onblur", "onblur")}} property.
-
{{domxref("Element/focus_event", "focus")}}
-
Fired when an element has gained focus.
- Also available via the {{domxref("GlobalEventHandlers/onfocus", "onfocus")}} property
-
{{domxref("Element/focusin_event", "focusin")}}
-
Fired when an element is about to gain focus.
-
{{domxref("Element/focusout_event", "focusout")}}
-
Fired when an element is about to lose focus.
-
- -

Fullscreen events

- -
-
{{domxref("Element/fullscreenchange_event", "fullscreenchange")}}
-
Sent to an {{domxref("Element")}} when it transitions into or out of full-screen mode.
- Also available via the {{domxref("Element.onfullscreenchange", "onfullscreenchange")}}  property.
-
{{domxref("Element/fullscreenerror_event", "fullscreenerror")}}
-
Sent to an Element if an error occurs while attempting to switch it into or out of full-screen mode.
- Also available via the {{domxref("Element.onfullscreenerror", "onfullscreenerror")}} property.
-
- -

Keyboard events

- -
-
{{domxref("Element/keydown_event", "keydown")}}
-
Fired when a key is pressed.
- Also available via the {{domxref("GlobalEventHandlers/onkeydown", "onkeydown")}} property.
-
{{domxref("Element/keypress_event", "keypress")}}
-
Fired when a key that produces a character value is pressed down. {{deprecated_inline}}
- Also available via the {{domxref("GlobalEventHandlers/onkeypress", "onkeypress")}} property.
-
{{domxref("Element/keyup_event", "keyup")}}
-
Fired when a key is released.
- Also available via the {{domxref("GlobalEventHandlers/onkeyup", "onkeyup")}} property.
-
- -

Mouse events

- -
-
{{domxref("Element/auxclick_event", "auxclick")}}
-
Fired when a non-primary pointing device button (e.g., any mouse button other than the left button) has been pressed and released on an element.
- Also available via the {{domxref("GlobalEventHandlers/onauxclick", "onauxclick")}} property.
-
{{domxref("Element/click_event", "click")}}
-
Fired when a pointing device button (e.g., a mouse's primary button) is pressed and released on a single element.
- Also available via the {{domxref("GlobalEventHandlers/onclick", "onclick")}} property.
-
{{domxref("Element/contextmenu_event", "contextmenu")}}
-
Fired when the user attempts to open a context menu.
- Also available via the {{domxref("GlobalEventHandlers/oncontextmenu", "oncontextmenu")}} property.
-
{{domxref("Element/dblclick_event", "dblclick")}}
-
Fired when a pointing device button (e.g., a mouse's primary button) is clicked twice on a single element.
- Also available via the {{domxref("GlobalEventHandlers/ondblclick", "ondblclick")}} property.
-
{{domxref("Element/DOMActivate_event", "DOMActivate")}} {{Deprecated_Inline}}
-
Occurs when an element is activated, for instance, through a mouse click or a keypress.
-
{{domxref("Element/mousedown_event", "mousedown")}}
-
Fired when a pointing device button is pressed on an element.
- Also available via the {{domxref("GlobalEventHandlers/onmousedown", "onmousedown")}} property.
-
{{domxref("Element/mouseenter_event", "mouseenter")}}
-
Fired when a pointing device (usually a mouse) is moved over the element that has the listener attached.
- Also available via the {{domxref("GlobalEventHandlers/onmouseenter", "onmouseenter")}} property.
-
{{domxref("Element/mouseleave_event", "mouseleave")}}
-
Fired when the pointer of a pointing device (usually a mouse) is moved out of an element that has the listener attached to it.
- Also available via the {{domxref("GlobalEventHandlers/onmouseleave", "onmouseleave")}} property.
-
{{domxref("Element/mousemove_event", "mousemove")}}
-
Fired when a pointing device (usually a mouse) is moved while over an element.
- Also available via the {{domxref("GlobalEventHandlers/onmousemove", "onmousemove")}} property.
-
{{domxref("Element/mouseout_event", "mouseout")}}
-
Fired when a pointing device (usually a mouse) is moved off the element to which the listener is attached or off one of its children.
- Also available via the {{domxref("GlobalEventHandlers/onmouseout", "onmouseout")}} property.
-
{{domxref("Element/mouseover_event", "mouseover")}}
-
Fired when a pointing device is moved onto the element to which the listener is attached or onto one of its children.
- Also available via the {{domxref("GlobalEventHandlers/onmouseover", "onmouseover")}} property.
-
{{domxref("Element/mouseup_event", "mouseup")}}
-
Fired when a pointing device button is released on an element.
- Also available via the {{domxref("GlobalEventHandlers/onmouseup", "onmouseup")}} property.
-
{{domxref("Element/webkitmouseforcechanged_event", "webkitmouseforcechanged")}}
-
Fired each time the amount of pressure changes on the trackpadtouchscreen.
-
{{domxref("Element/webkitmouseforcedown_event", "webkitmouseforcedown")}}
-
Fired after the mousedown event as soon as sufficient pressure has been applied to qualify as a "force click".
-
{{domxref("Element/webkitmouseforcewillbegin_event", "webkitmouseforcewillbegin")}}
-
Fired before the {{domxref("Element/mousedown_event", "mousedown")}} event.
-
{{domxref("Element/webkitmouseforceup_event", "webkitmouseforceup")}}
-
Fired after the {{domxref("Element/webkitmouseforcedown_event", "webkitmouseforcedown")}} event as soon as the pressure has been reduced sufficiently to end the "force click".
-
- -

Touch events

- -
-
{{domxref("Element/touchcancel_event", "touchcancel")}}
-
Fired when one or more touch points have been disrupted in an implementation-specific manner (for example, too many touch points are created).
- Also available via the {{domxref("GlobalEventHandlers/ontouchcancel", "ontouchcancel")}} property.
-
{{domxref("Element/touchend_event", "touchend")}}
-
Fired when one or more touch points are removed from the touch surface.
- Also available via the {{domxref("GlobalEventHandlers/ontouchend", "ontouchend")}} property
-
{{domxref("Element/touchmove_event", "touchmove")}}
-
Fired when one or more touch points are moved along the touch surface.
- Also available via the {{domxref("GlobalEventHandlers/ontouchmove", "ontouchmove")}} property
-
{{domxref("Element/touchstart_event", "touchstart")}}
-
Fired when one or more touch points are placed on the touch surface.
- Also available via the {{domxref("GlobalEventHandlers/ontouchstart", "ontouchstart")}} property
-
- -
-
-
- -

Specifications

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
SpecificationStatusComment
{{SpecName("CSS4 Pseudo-Elements", '#window-interface', 'Element')}}{{Spec2("CSS4 Pseudo-Elements")}}Added the pseudo() method.
{{SpecName("Web Animations", '', '')}}{{Spec2("Web Animations")}}Added the getAnimations() method.
{{SpecName('Undo Manager', '', 'Element')}}{{Spec2('Undo Manager')}}Added the undoScope and undoManager properties.
{{SpecName('Pointer Events 2', '#extensions-to-the-element-interface', 'Element')}}{{Spec2('Pointer Events 2')}}Added the following event handlers: ongotpointercapture and onlostpointercapture.
- Added the following methods: setPointerCapture() and releasePointerCapture().
{{SpecName('Pointer Events', '#extensions-to-the-element-interface', 'Element')}}{{Spec2('Pointer Events')}}Added the following event handlers: ongotpointercapture and onlostpointercapture.
- Added the following methods: setPointerCapture() and releasePointerCapture().
{{SpecName('Selectors API Level 1', '#interface-definitions', 'Element')}}{{Spec2('Selectors API Level 1')}}Added the following methods: querySelector() and querySelectorAll().
{{SpecName('Pointer Lock', 'index.html#element-interface', 'Element')}}{{Spec2('Pointer Lock')}}Added the requestPointerLock() method.
{{SpecName('Fullscreen', '#api', 'Element')}}{{Spec2('Fullscreen')}}Added the requestFullscreen() method.
{{SpecName('DOM Parsing', '#extensions-to-the-element-interface', 'Element')}}{{Spec2('DOM Parsing')}}Added the following properties: innerHTML, and outerHTML.
- Added the following method: insertAdjacentHTML().
{{SpecName('CSSOM View', '#extensions-to-the-element-interface', 'Element')}}{{Spec2('CSSOM View')}}Added the following properties: scrollTop, scrollLeft, scrollWidth, scrollHeight, clientTop, clientLeft, clientWidth, and clientHeight.
- Added the following methods: getClientRects(), getBoundingClientRect(), scroll()scrollBy(), scrollTo() and scrollIntoView().
{{SpecName('Element Traversal', '#ecmascript-bindings', 'Element')}}{{Spec2('Element Traversal')}}Added inheritance of the {{DOMxRef("ElementTraversal")}} interface.
{{SpecName('DOM WHATWG', '#interface-element', 'Element')}}{{Spec2('DOM WHATWG')}}Added the following methods: closest(), insertAdjacentElement() and insertAdjacentText().
- Moved hasAttributes() from the Node interface to this one.
{{SpecName("DOM4", "#interface-element", "Element")}}{{Spec2("DOM4")}}Removed the following methods: setIdAttribute(), setIdAttributeNS(), and setIdAttributeNode().
- Modified the return value of getElementsByTagName() and getElementsByTagNameNS().
- Removed the schemaTypeInfo property.
{{SpecName('DOM3 Core', 'core.html#ID-745549614', 'Element')}}{{Spec2('DOM3 Core')}}Added the following methods: setIdAttribute(), setIdAttributeNS(), and setIdAttributeNode(). These methods were never implemented and have been removed in later specifications.
- Added the schemaTypeInfo property. This property was never implemented and has been removed in later specifications.
{{SpecName('DOM2 Core', 'core.html#ID-745549614', 'Element')}}{{Spec2('DOM2 Core')}}The normalize() method has been moved to {{DOMxRef("Node")}}.
{{SpecName('DOM1', 'level-one-core.html#ID-745549614', 'Element')}}{{Spec2('DOM1')}}Initial definition.
- -

Browser compatibility

- - - -

{{Compat("api.Element")}}

diff --git a/files/uk/web/api/event/index.html b/files/uk/web/api/event/index.html deleted file mode 100644 index 34a2a8e9e9..0000000000 --- a/files/uk/web/api/event/index.html +++ /dev/null @@ -1,189 +0,0 @@ ---- -title: Подія -slug: Web/API/Event -translation_of: Web/API/Event -original_slug: Web/API/Подія ---- -

{{APIRef("DOM")}}

- -

Event інтерфейс представляє подію, що відбувається в DOM. Подія може бути ініційована дією користувача, наприклад, кліком мишки або натисканням клавіши на клавіатурі, або згенерована API, щоб показати прогрес асинхронного завдання, тощо. Це може бути також ініційовано програмно викликом HTMLElement.click() методу елемента, або створенням екземпляру події, потім відправленням його до вказаного цільового елементу, використовуючи EventTarget.dispatchEvent().

- -

Існує багато різновидів подій, деякі з котрих використовують інші інтерфейси, основані на головному інтерфейсі Event. Сам по собі Event вміщає можливості та методи, спільні для всіх подій.

- -

Багато елементів DOM можуть бути налаштовані прийняти (або "почути") ці події та виконати код у відповідь на процес їхньої обробки. Хендлери подій звичайно пов'язані або додаються до різноманітних HTML elements (таких як <button><div>, <span>, і т.п.) при використанні EventTarget.addEventListener(), а це, як правило, замінює використання атрибутів хендлера подій старого HTML. Надалі за необхідності додавання, такі хендлери також можна відключати, якщо потрібно, використовуючи removeEventListener().  

- -

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

- -

Коли є багато вкладених елементів, кожний зі своїм особистим хендлером (хендлерами), обробка подій може стати дуже складною - особливо там, де батьківський елемент отримує ту ж саму подію, що й її дочірній елемент, тому що "просторово" вони перетинаються і таким чином подія технічно з'являється в них обох, а порядок обробки таких подій залежить від параметрів вспливаючих подій та захоплення кожного обробника.

- -

Інтерфейси на основі Event

- -

Нижче надано список інтерфейсів, які існують на основі головного Event інтерфейсу, із ссилками на відповідну документацію в довіднику MDN API.

- -

Зверніть увагу, що всі інтерфейси подій мають назви із закінченням "Event".

- - - -
- -
- -

Конструктор

- -
-
{{domxref("Event.Event", "Event()")}}
-
Створює  Event об'єкт та повертає його абоненту.
-
- -

Властивості

- -
-
{{domxref("Event.bubbles")}} {{readonlyinline}}
-
Булевий вираз вказує на те, чи вспливає подія через DOM.
-
{{domxref("Event.cancelBubble")}}
-
Історичний псевдонім {{domxref("Event.stopPropagation()")}}. Встановлення його значення true  перед поверненням з обробника події запобігає поширенню події.
-
{{domxref("Event.cancelable")}} {{readonlyinline}}
-
Булевий вираз вказує на те, чи скасовується подія.
-
{{domxref("Event.composed")}} {{ReadOnlyInline}}
-
Булевий вираз вказує на те, чи може подія всплити через межу між  тінню DOM та черговим DOM.
-
{{domxref("Event.currentTarget")}} {{readonlyinline}}
-
Посилання на зареєстровану зараз ціль події. Це об'єкт, на котрий наразі планується відіслати подію. Можливо, це змінилося по дорозі через retargeting.
-
{{domxref("Event.deepPath")}} {{non-standard_inline}}
-
 {{jsxref("Array")}} of DOM {{domxref("Node")}}, через який всплила подія.
-
{{domxref("Event.defaultPrevented")}} {{readonlyinline}}
-
Вказує, чи виклик {{domxref("event.preventDefault()")}}  скасував подію.
-
{{domxref("Event.eventPhase")}} {{readonlyinline}}
-
Вказує, яка фаза потоку подій обробляється.
-
{{domxref("Event.explicitOriginalTarget")}} {{non-standard_inline}} {{readonlyinline}}
-
Явна оригінальна мета події (Mozilla-specific).
-
{{domxref("Event.originalTarget")}} {{non-standard_inline}} {{readonlyinline}}
-
Початкова ціль події перед будь-якими ретаргетингами. (Mozilla-specific).
-
{{domxref("Event.returnValue")}}
-
Історична властивість, представлена Internet Explorer і згодом прийнята в специфікацію DOM для того, щоб забезпечити продовження  роботи існуючих сайтів. В ідеалі, вам слід спробувати використати {{domxref("Event.preventDefault()")}} та {{domxref("Event.defaultPrevented")}} замість нього, але ви можете використовувати returnValue, якщо ви  вирішите це зробити.
-
{{domxref("Event.returnValue")}} {{non-standard_inline}}
-
Нестандартний псевдонім (зі старої версії Microsoft Internet Explorer) для {{domxref("Event.target")}}. Деякі інші браузери починають підтримувати його для веб-сумісності.
-
{{domxref("Event.target")}} {{readonlyinline}}
-
Посилання на ціль, до якої спочатку була відправлена подія.
-
{{domxref("Event.timeStamp")}} {{readonlyinline}}
-
Час, коли було створено подію (в мілісекундах).  За специфікацією, це значення - час з епохи - але насправді визначення браузерів різняться.Крім того, ведеться робота, щоб змінити його на {{domxref("DOMHighResTimeStamp")}} .
-
{{domxref("Event.isTrusted")}} {{readonlyinline}}
-
Вказує, чи  була подія ініційована браузером (наприклад, після натискання клавіши на клавіатурі користувачем) або за сценарієм (використовуючи метод створення подій, наприклад {{domxref("Event.initEvent")}}).
-
Застарілі властивості
-
- -

{{domxref("Event.scoped")}} {{readonlyinline}} {{obsolete_inline}}

- -

Застарілі; використовуйте замість них {{domxref("Event.composed", "composed")}}. ({{jsxref("Boolean")}} вказує, чи вспливе дана подія через тіньовий корінь у стандарт DOM.)

- -

Методи

- -
-
{{domxref("Event.createEvent()")}} {{deprecated_inline}}
-
Створює нову подію, котра повинна бути ініційована викликом її  initEvent() методу.
-
{{domxref("Event.composedPath()")}}
-
Повертає шлях події (об'єкти, на які слухачі будуть викликані). Це не включає вузли через тіньові дерева, якщо тіньовий корінь було створено із закритим {{domxref("ShadowRootmode")}}.
-
{{domxref("Event.preventDefault()")}}
-
Скасовує подію, (якщо її можливо скасувати).
-
{{domxref("Event.stopImmediatePropagation()")}}
-
Для цієї конкретної події не дозволяйте викликати всіх інших слухачів. Сюди входять слухачі, приєднані до одного й того ж елемента, а також ті, що додаються до елементів, які буде прищеплено пізніше (наприклад, під час фази введення).
-
{{domxref("Event.stopPropagation()")}}
-
Зупиняє розповсюдження подій далі у DOM.
-
Застарілі методи
-
{{domxref("Event.getPreventDefault()")}} {{non-standard_inline}}
-
Нестандартний. Використовуйте замість нього {{domxref("Event.defaultPrevented")}}.  (Повертає значення {{domxref("Event.defaultPrevented")}}.)
-
{{domxref("Event.preventBubble()")}} {{non-standard_inline}} {{Obsolete_inline(24)}}
-
Застарілий; використовуйте замість нього {{domxref("event.stopPropagation")}}. (Захищає подію від вспливання).
-
{{domxref("Event.preventcapture()")}} {{non-standard_inline}} {{Obsolete_inline(24)}}
-
Застарілий; використовуйте замість нього {{domxref("event.stopPropagation")}}.
-
- -

Технічні характеристики

- - - - - - - - - - - - - - -
ХарактеристикаСтатусКоментар
{{SpecName('DOM WHATWG', '#interface-event', 'Event')}}{{Spec2('DOM WHATWG')}}
- -

Сумісність з браузером

- -

приховано

- -

Таблиця сумісності на цій сторінці формується із структурованих даних. Якщо ви захочете побачити її, будь ласка, перевірте та відправте нам запит https://github/com/mdn/browser-compat-data

- - - -

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

- - diff --git a/files/uk/web/api/event/target/index.html b/files/uk/web/api/event/target/index.html deleted file mode 100644 index c9a09ca3e9..0000000000 --- a/files/uk/web/api/event/target/index.html +++ /dev/null @@ -1,135 +0,0 @@ ---- -title: Event.target -slug: Web/API/Event/target -translation_of: Web/API/Event/target -original_slug: Web/API/Подія/target ---- -

{{ApiRef("DOM")}}

- -

Властивість target інтерфейсу {{domxref("Event")}} є посиланням на об'єкт який відправив подію. Він відрізняється від {{domxref("Event.currentTarget")}} коли обробник події викликається в фазі спливання або фіксації події.

- -

Синтаксис

- -
var theTarget = event.target;
- -

Приклад

- -

Властивість event.target може бути використана для реалізації делегування події.

- -
// Зробити список
-var ul = document.createElement('ul');
-document.body.appendChild(ul);
-
-var li1 = document.createElement('li');
-var li2 = document.createElement('li');
-ul.appendChild(li1);
-ul.appendChild(li2);
-
-function hide(e){
-  // e.target вказує на елемент <li> на якому було натиснуто
-  // Це відрізняється від e.currentTarget який буде посилатися на батьківський <ul> в даному контексті
-  e.target.style.visibility = 'hidden';
-}
-
-// Приєднання слухача подій до списка
-// Він запуститься при натисканні кожного <li>
-ul.addEventListener('click', hide, false);
-
- -

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

- - - - - - - - - - - - - - - - - - - - - - - - -
SpecificationStatusComment
{{SpecName("DOM WHATWG", "#dom-event-target", "Event.target")}}{{Spec2("DOM WHATWG")}}
{{SpecName("DOM4", "#dom-event-target", "Event.target")}}{{Spec2("DOM4")}}
{{SpecName("DOM2 Events", "#Events-Event-target", "Event.target")}}{{Spec2("DOM2 Events")}}Initial definition
- -

Сумісність з браузерами

- -

{{CompatibilityTable}}

- -
- - - - - - - - - - - - - - - - - - - - - -
FeatureChromeEdgeFirefox (Gecko)Internet ExplorerOperaSafari
Basic support{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
-
- -
- - - - - - - - - - - - - - - - - - - - - -
FeatureAndroidEdgeFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Basic support{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
-
- -

Нотатки про сумісність

- -

В браузерах IE 6-8 використовується інша модель подій. Слухачі подій приєднуються з використанням нестандартного методу {{domxref('EventTarget.attachEvent')}}. В цій моделі, об'єкт події має {{domxref('Event.srcElement')}} властивість, замість властивості target, і воно має ту ж саму семантику як event.target.

- -
function hide(e) {
-  // Підтримка IE6-8
-  var target = e.target || e.srcElement;
-  target.style.visibility = 'hidden';
-}
-
- -

Читати також

- - diff --git a/files/uk/web/api/globaleventhandlers/index.html b/files/uk/web/api/globaleventhandlers/index.html deleted file mode 100644 index 982d3d2ca3..0000000000 --- a/files/uk/web/api/globaleventhandlers/index.html +++ /dev/null @@ -1,273 +0,0 @@ ---- -title: GlobalEventHandlers -slug: Web/API/GlobalEventHandlers -tags: - - API - - GlobalEventHandlers - - HTML DOM - - Mixin - - NeedsTranslation - - Reference - - TopicStub - - events -translation_of: Web/API/GlobalEventHandlers ---- -
{{ApiRef("HTML DOM")}}
- -

The GlobalEventHandlers mixin describes the event handlers common to several interfaces like {{domxref("HTMLElement")}}, {{domxref("Document")}}, or {{domxref("Window")}}. Each of these interfaces can, of course, add more event handlers in addition to the ones listed below.

- -
-

Note: GlobalEventHandlers is a mixin and not an interface; you can't actually create an object of type GlobalEventHandlers.

-
- -

Properties

- -

This interface doesn't include any properties except for the event handlers listed below.

- -

Event handlers

- -

These event handlers are defined on the {{domxref("GlobalEventHandlers")}} mixin, and implemented by {{domxref("HTMLElement")}}, {{domxref("Document")}}, {{domxref("Window")}}, as well as by {{domxref("WorkerGlobalScope")}} for Web Workers.

- -
-
-
{{domxref("GlobalEventHandlers.onabort")}}
-
Is an {{domxref("EventHandler")}} representing the code to be called when the {{domxref("HTMLMediaElement/abort_event", "abort")}} event is raised.
-
{{domxref("GlobalEventHandlers.onanimationcancel")}} {{Non-standard_inline}}
-
An {{domxref("EventHandler")}} called when an {{event("animationcancel")}} event is sent, indicating that a running CSS animation has been canceled.
-
{{domxref("GlobalEventHandlers.onanimationend")}} {{Non-standard_inline}}
-
An {{domxref("EventHandler")}} called when an {{event("animationend")}} event is sent, indicating that a CSS animation has stopped playing.
-
{{domxref("GlobalEventHandlers.onanimationiteration")}} {{Non-standard_inline}}
-
An {{domxref("EventHandler")}} called when an {{event("animationiteration")}} event has been sent, indicating that a CSS animation has begun playing a new iteration of the animation sequence.
-
{{domxref("GlobalEventHandlers.onanimationstart")}} {{Non-standard_inline}}
-
An {{domxref("EventHandler")}} called when an {{event("animationstart")}} event is sent, indicating that a CSS animation has started playing.
-
{{domxref("GlobalEventHandlers.onauxclick")}} {{Non-standard_inline}}
-
An {{domxref("EventHandler")}} called when an {{event("auxclick")}} event is sent, indicating that a non-primary button has been pressed on an input device (e.g. a middle mouse button).
-
{{domxref("GlobalEventHandlers.onblur")}}
-
Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("blur")}} event is raised.
-
{{domxref("GlobalEventHandlers.onerror")}}
-
Is an {{domxref("OnErrorEventHandler")}} representing the code to be called when the {{event("error")}} event is raised.
-
{{domxref("GlobalEventHandlers.onfocus")}}
-
Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("focus")}} event is raised.
-
{{domxref("GlobalEventHandlers.oncancel")}}
-
Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("cancel")}} event is raised.
-
{{domxref("GlobalEventHandlers.oncanplay")}}
-
Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("canplay")}} event is raised.
-
{{domxref("GlobalEventHandlers.oncanplaythrough")}}
-
Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("canplaythrough")}} event is raised.
-
{{domxref("GlobalEventHandlers.onchange")}}
-
Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("change")}} event is raised.
-
{{domxref("GlobalEventHandlers.onclick")}}
-
Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("click")}} event is raised.
-
{{domxref("GlobalEventHandlers.onclose")}}
-
Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("close")}} event is raised.
-
{{domxref("GlobalEventHandlers.oncontextmenu")}}
-
Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("contextmenu")}} event is raised.
-
{{domxref("GlobalEventHandlers.oncuechange")}}
-
Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("cuechange")}} event is raised.
-
{{domxref("GlobalEventHandlers.ondblclick")}}
-
Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("dblclick")}} event is raised.
-
{{domxref("GlobalEventHandlers.ondrag")}}
-
Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("drag")}} event is raised.
-
{{domxref("GlobalEventHandlers.ondragend")}}
-
Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("dragend")}} event is raised.
-
{{domxref("GlobalEventHandlers.ondragenter")}}
-
Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("dragenter")}} event is raised.
-
{{domxref("GlobalEventHandlers.ondragexit")}}
-
Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("dragexit")}} event is raised.
-
{{domxref("GlobalEventHandlers.ondragleave")}}
-
Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("dragleave")}} event is raised.
-
{{domxref("GlobalEventHandlers.ondragover")}}
-
Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("dragover")}} event is raised.
-
{{domxref("GlobalEventHandlers.ondragstart")}}
-
Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("dragstart")}} event is raised.
-
{{domxref("GlobalEventHandlers.ondrop")}}
-
Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("drop")}} event is raised.
-
{{domxref("GlobalEventHandlers.ondurationchange")}}
-
Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("durationchange")}} event is raised.
-
{{domxref("GlobalEventHandlers.onemptied")}}
-
Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("emptied")}} event is raised.
-
{{domxref("GlobalEventHandlers.onended")}}
-
Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("ended")}} event is raised.
-
{{domxref("GlobalEventHandlers.onformdata")}}
-
Is an {{domxref("EventHandler")}} for processing {{event("formdata")}} events, fired after the entry list representing the form's data is constructed.
-
{{domxref("GlobalEventHandlers.ongotpointercapture")}}
-
Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("gotpointercapture")}} event type is raised.
-
{{domxref("GlobalEventHandlers.oninput")}}
-
Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("input")}} event is raised.
-
{{domxref("GlobalEventHandlers.oninvalid")}}
-
Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("invalid")}} event is raised.
-
{{domxref("GlobalEventHandlers.onkeydown")}}
-
Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("keydown")}} event is raised.
-
{{domxref("GlobalEventHandlers.onkeypress")}}
-
Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("keypress")}} event is raised.
-
{{domxref("GlobalEventHandlers.onkeyup")}}
-
Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("keyup")}} event is raised.
-
{{domxref("GlobalEventHandlers.onload")}}
-
Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("load")}} event is raised.
-
{{domxref("GlobalEventHandlers.onloadeddata")}}
-
Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("loadeddata")}} event is raised.
-
{{domxref("GlobalEventHandlers.onloadedmetadata")}}
-
Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("loadedmetadata")}} event is raised.
-
{{domxref("GlobalEventHandlers.onloadend")}}
-
Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("loadend")}} event is raised (when progress has stopped on the loading of a resource.)
-
{{domxref("GlobalEventHandlers.onloadstart")}}
-
Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("loadstart")}} event is raised (when progress has begun on the loading of a resource.)
-
{{domxref("GlobalEventHandlers.onlostpointercapture")}}
-
Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("lostpointercapture")}} event type is raised.
-
{{domxref("GlobalEventHandlers.onmousedown")}}
-
Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("mousedown")}} event is raised.
-
{{domxref("GlobalEventHandlers.onmouseenter")}}
-
Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("mouseenter")}} event is raised.
-
{{domxref("GlobalEventHandlers.onmouseleave")}}
-
Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("mouseleave")}} event is raised.
-
{{domxref("GlobalEventHandlers.onmousemove")}}
-
Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("mousemove")}} event is raised.
-
{{domxref("GlobalEventHandlers.onmouseout")}}
-
Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("mouseout")}} event is raised.
-
{{domxref("GlobalEventHandlers.onmouseover")}}
-
Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("mouseover")}} event is raised.
-
{{domxref("GlobalEventHandlers.onmouseup")}}
-
Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("mouseup")}} event is raised.
-
{{domxref("GlobalEventHandlers.onmousewheel")}} {{Non-standard_inline}} {{Deprecated_inline}}
-
Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("mousewheel")}} event is raised. Deprecated. Use onwheel instead.
-
{{ domxref("GlobalEventHandlers.onwheel") }}
-
Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("wheel")}} event is raised.
-
{{domxref("GlobalEventHandlers.onpause")}}
-
Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("pause")}} event is raised.
-
{{domxref("GlobalEventHandlers.onplay")}}
-
Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("play")}} event is raised.
-
{{domxref("GlobalEventHandlers.onplaying")}}
-
Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("playing")}} event is raised.
-
{{domxref("GlobalEventHandlers.onpointerdown")}}
-
Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("pointerdown")}} event is raised.
-
{{domxref("GlobalEventHandlers.onpointermove")}}
-
Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("pointermove")}} event is raised.
-
{{domxref("GlobalEventHandlers.onpointerup")}}
-
Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("pointerup")}} event is raised.
-
{{domxref("GlobalEventHandlers.onpointercancel")}}
-
Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("pointercancel")}} event is raised.
-
{{domxref("GlobalEventHandlers.onpointerover")}}
-
Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("pointerover")}} event is raised.
-
{{domxref("GlobalEventHandlers.onpointerout")}}
-
Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("pointerout")}} event is raised.
-
{{domxref("GlobalEventHandlers.onpointerenter")}}
-
Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("pointerenter")}} event is raised.
-
{{domxref("GlobalEventHandlers.onpointerleave")}}
-
Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("pointerleave")}} event is raised.
-
{{domxref("GlobalEventHandlers.onpointerlockchange")}} {{experimental_inline}}
-
Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("pointerlockchange")}} event is raised.
-
{{domxref("GlobalEventHandlers.onpointerlockerror")}} {{experimental_inline}}
-
Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("pointerlockerror")}} event is raised.
-
{{domxref("GlobalEventHandlers.onprogress")}}
-
Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("progress")}} event is raised.
-
{{domxref("GlobalEventHandlers.onratechange")}}
-
Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("ratechange")}} event is raised.
-
{{domxref("GlobalEventHandlers.onreset")}}
-
Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("reset")}} event is raised.
-
{{domxref("GlobalEventHandlers.onresize")}}
-
Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("resize")}} event is raised.
-
{{domxref("GlobalEventHandlers.onscroll")}}
-
Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("scroll")}} event is raised.
-
{{domxref("GlobalEventHandlers.onseeked")}}
-
Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("seeked")}} event is raised.
-
{{domxref("GlobalEventHandlers.onseeking")}}
-
Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("seeking")}} event is raised.
-
{{domxref("GlobalEventHandlers.onselect")}}
-
Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("select")}} event is raised.
-
{{domxref("GlobalEventHandlers.onselectstart")}}
-
Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("selectionchange")}} event is raised, i.e. when the user starts to make a new text selection on a web page.
-
{{domxref("GlobalEventHandlers.onselectionchange")}}
-
Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("selectionchange")}} event is raised, i.e. when the text selected on a web page changes.
-
{{domxref("GlobalEventHandlers.onshow")}}
-
Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("show")}} event is raised.
-
{{domxref("GlobalEventHandlers.onsort")}} {{experimental_inline}}
-
Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("sort")}} event is raised.
-
{{domxref("GlobalEventHandlers.onstalled")}}
-
Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("stalled")}} event is raised.
-
{{domxref("GlobalEventHandlers.onsubmit")}}
-
Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("submit")}} event is raised.
-
{{domxref("GlobalEventHandlers.onsuspend")}}
-
Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("suspend")}} event is raised.
-
{{domxref("GlobalEventHandlers.ontimeupdate")}}
-
Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("timeupdate")}} event is raised.
-
{{domxref("GlobalEventHandlers.onvolumechange")}}
-
Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("volumechange")}} event is raised.
-
{{domxref("GlobalEventHandlers.ontouchcancel")}} {{Non-standard_inline}} {{Experimental_inline}}
-
Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("touchcancel")}} event is raised.
-
{{domxref("GlobalEventHandlers.ontouchend")}} {{Non-standard_inline}} {{Experimental_inline}}
-
Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("touchend")}} event is raised.
-
{{domxref("GlobalEventHandlers.ontouchmove")}} {{Non-standard_inline}} {{Experimental_inline}}
-
Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("touchmove")}} event is raised.
-
{{domxref("GlobalEventHandlers.ontouchstart")}} {{Non-standard_inline}} {{Experimental_inline}}
-
Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("touchstart")}} event is raised.
-
{{domxref("GlobalEventHandlers.ontransitioncancel")}}
-
An {{domxref("EventHandler")}} called when a {{event("transitioncancel")}} event is sent, indicating that a CSS transition has been cancelled.
-
{{domxref("GlobalEventHandlers.ontransitionend")}}
-
An {{domxref("EventHandler")}} called when a {{event("transitionend")}} event is sent, indicating that a CSS transition has finished playing.
-
{{domxref("GlobalEventHandlers.ontransitionrun")}}
-
An {{domxref("EventHandler")}} called when a {{event("transitionrun")}} event is sent, indicating that a CSS transition is running, though not nessarilty started.
-
{{domxref("GlobalEventHandlers.ontransitionstart")}}
-
An {{domxref("EventHandler")}} called when a {{event("transitionstart")}} event is sent, indicating that a CSS transition has started transitioning.
-
{{domxref("GlobalEventHandlers.onwaiting")}}
-
Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("waiting")}} event is raised.
-
-
- -

Methods

- -

This interface defines no methods.

- -

Specifications

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
SpecificationStatusComment
{{SpecName("Selection API",'', 'Extension to GlobalEventHandlers')}}{{Spec2('Selection API')}}Adds onselectionchange.
{{SpecName('Pointer Lock', '#extensions-to-the-document-interface', 'Extension of Document')}}{{Spec2('Pointer Lock')}}Adds onpointerlockchange and onpointerlockerror on {{domxref("Document")}}. It is experimentally implemented on GlobalEventHandlers.
{{SpecName('HTML WHATWG', '#globaleventhandlers', 'GlobalEventHandlers')}}{{Spec2('HTML WHATWG')}}No change since the latest snapshot, {{SpecName("HTML5.1")}}.
{{SpecName('HTML5.1', '#globaleventhandlers', 'GlobalEventHandlers')}}{{Spec2('HTML5.1')}}Snapshot of {{SpecName("HTML WHATWG")}}. Added onsort since the {{SpecName("HTML5 W3C")}} snapshot.
{{SpecName("HTML5 W3C", "#globaleventhandlers", "GlobalEventHandlers")}}{{Spec2('HTML5 W3C')}}Snapshot of {{SpecName("HTML WHATWG")}}. Creation of GlobalEventHandlers (properties where on the target before it).
- -

Browser compatibility

- -
- - -

{{Compat("api.GlobalEventHandlers")}}

-
- -

See also

- - diff --git a/files/uk/web/api/globaleventhandlers/onkeydown/index.html b/files/uk/web/api/globaleventhandlers/onkeydown/index.html deleted file mode 100644 index 535fd8b0a0..0000000000 --- a/files/uk/web/api/globaleventhandlers/onkeydown/index.html +++ /dev/null @@ -1,93 +0,0 @@ ---- -title: GlobalEventHandlers.onkeydown -slug: Web/API/GlobalEventHandlers/onkeydown -tags: - - HTML DOM - - Обробник подій - - клавіатура - - події клавіатури -translation_of: Web/API/GlobalEventHandlers/onkeydown ---- -
{{ApiRef("HTML DOM")}}
- -

Властивість onkeydown спільно з GlobalEventHandlers є EventHandler обробляє події {{event("keydown")}}.

- -

Подія keydown спрацьовує, коли користувач натискає клавішу клавіатури.

- -

Синтаксис

- -
target.onkeydown = functionRef;
- -

Значення

- -

functionRef це ім'я функції або вираз функції. В якості єдиного аргументу функція отримує об'єкт {{domxref("KeyboardEvent")}}.

- -

Приклад

- -

У цьому прикладі виводитимуться значення {{domxref("KeyboardEvent.code")}} щоразу, коли ви натискаете клавішу всередині елемента  {{HtmlElement("input")}}.

- -

HTML

- -
<input>
-<p id="log"></p>
- -

JavaScript

- -
const input = document.querySelector('input');
-const log = document.getElementById('log');
-
-input.onkeydown = logKey;
-
-function logKey(e) {
-  log.textContent += ` ${e.code}`;
-}
- -

Підсумок

- -

{{EmbedLiveSample("Example")}}

- -

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

- - - - - - - - - - - - - - -
SpecificationStatusComment
{{SpecName('HTML WHATWG','webappapis.html#handler-onkeydown','onkeydown')}}{{Spec2('HTML WHATWG')}}
- -

Сумісність з браузерами 

- - - -

{{Compat("api.GlobalEventHandlers.onkeydown")}}

- -

Нотатки щодо сумісності

- -

Так якб Firefox 65 події клавіатури і ключа тепер запускаються під час складання IME, для поліпшення крос-браузерної сумісності для користувачів CJKT (bug 354358, також більш детальну інформацію дивіться keydown and keyup події наразі запускаються під час складання IME. Щоб проігнорувати всі події keyup , зробіть щось на зразок цього (229 це спеціальний набір значень для keyCode що відноситься до читу, який був використаний IME):

- -
eventTarget.addEventListener("keydown", event => {
-  if (event.isComposing || event.keyCode === 229) {
-    return;
-  }
-  // зробити що-небудь    });
-
- -

See also

- - diff --git a/files/uk/web/api/globaleventhandlers/onkeyup/index.html b/files/uk/web/api/globaleventhandlers/onkeyup/index.html deleted file mode 100644 index d429593327..0000000000 --- a/files/uk/web/api/globaleventhandlers/onkeyup/index.html +++ /dev/null @@ -1,95 +0,0 @@ ---- -title: GlobalEventHandlers.onkeyup -slug: Web/API/GlobalEventHandlers/onkeyup -tags: - - HTML DOM - - Обробник подій - - клавіатура - - події клавіатури -translation_of: Web/API/GlobalEventHandlers/onkeyup ---- -
{{ApiRef("HTML DOM")}}
- -
- -

Властивість onkeyup спільно з {{domxref("GlobalEventHandlers")}} є {{domxref("EventHandler")}} обробляє події  {{event("keyup")}} .

- -

Подія keyup спрацьовує, коли користувач відпускає раніше натиснуту клавішу клавіатури.

- -

Синтаксис

- -
target.onkeyup = functionRef;
- -

Значення

- -

functionRef це ім'я функції або вираз функції. В якості єдиного аргументу функція отримує об'єкт {{domxref("KeyboardEvent")}}.

- -

Приклад

- -

У цьому прикладі виводитимуться значення {{domxref ("KeyboardEvent.code")}} щоразу, коли ви відпускаєте клавішу всередині елемента {{HtmlElement ("input")}}.

- -

HTML

- -
<input>
-<p id="log"></p>
- -

JavaScript

- -
const input = document.querySelector('input');
-const log = document.getElementById('log');
-
-input.onkeyup = logKey; //
-
-function logKey(e) {
-  log.textContent += ` ${e.code}`; //Видає у тегу <p> ключ натиснутої клавіші
-}
- -

Підсумок

- -

{{EmbedLiveSample("Example")}}

- -

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

- - - - - - - - - - - - - - -
SpecificationStatusComment
{{SpecName('HTML WHATWG','webappapis.html#handler-onkeyup','onkeyup')}}{{Spec2('HTML WHATWG')}}
- -

Сумісність з браузерами

- - - -

{{Compat("api.GlobalEventHandlers.onkeyup")}}

- -

Нотатки щодо сумісності

- -

Так як Firefox 65, події клавіатури і ключа тепер запускаються під час складання IME, для поліпшення крос-браузерної сумісності для користувачів CJKT ({{bug (354358)}}, також більш детальну інформацію дивіться keydown and keyup події наразі запускаються під час складання IME. Щоб проігнорувати всі події keyup , зробіть щось на зразок цього (229 це спеціальний набір значень для keyCode що відноситься до читу, який був використаний IME):

- -
eventTarget.addEventListener("keyup", event => {
-  if (event.isComposing || event.keyCode === 229) {
-    return;
-  }
-  // зробити що-небудь
-});
- -

Див. також

- - diff --git a/files/uk/web/api/globaleventhandlers/onmouseover/index.html b/files/uk/web/api/globaleventhandlers/onmouseover/index.html deleted file mode 100644 index b3d98e075e..0000000000 --- a/files/uk/web/api/globaleventhandlers/onmouseover/index.html +++ /dev/null @@ -1,71 +0,0 @@ ---- -title: Обробник_глобальних_подій.onmouseover -slug: Web/API/GlobalEventHandlers/onmouseover -tags: - - Event Handler - - onmouseover - - Обробник глобальних подій - - Подія мищі -translation_of: Web/API/GlobalEventHandlers/onmouseover ---- -
{{ApiRef("HTML DOM")}}
- -

Властивістю onmouseover мікшіна {{domxref("GlobalEventHandlers")}} є {{domxref("EventHandler")}} , який обробляє події наведення миші {{event("mouseover")}}.

- -

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

- -

Синтаксис

- -
element.onmouseover = function;
-
- -

Приклад

- -

Цей приклад додає onmouseover та onmouseout подіі до параграфу. Спробуйте перемістити мишу до елементу.

- -

HTML

- -
<p>Test your mouse on me!</p>
- -

JavaScript

- -
const p = document.querySelector('p');
-p.onmouseover = logMouseOver;
-p.onmouseout = logMouseOut;
-
-function logMouseOver() {
-  p.innerHTML = 'Виявлено MOUSE OVER';
-}
-
-function logMouseOut() {
-  p.innerHTML = 'Виявлено MOUSE OUT';
-}
- -

Результат

- -

{{EmbedLiveSample("Example")}}

- -

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

- - - - - - - - - - - - - - -
SpecificationStatusComment
{{SpecName('HTML WHATWG','webappapis.html#handler-onmouseover','onmouseover')}}{{Spec2('HTML WHATWG')}}
- -

Сумісність з браузерами

- -
- - -

{{Compat("api.GlobalEventHandlers.onmouseover")}}

-
diff --git a/files/uk/web/api/headers/index.html b/files/uk/web/api/headers/index.html deleted file mode 100644 index 529712ef22..0000000000 --- a/files/uk/web/api/headers/index.html +++ /dev/null @@ -1,133 +0,0 @@ ---- -title: Заголовки -slug: Web/API/Headers -tags: - - API - - Fetch - - Fetch API - - Headers - - Інтерфейс - - Заголовки -translation_of: Web/API/Headers ---- -
{{ APIRef("Fetch") }}
- -

Інтерфейс Headers  Fetch API дозволяє вам виконувати різні дії з  HTTP запитами і заголовками відповідей. Ці дії включають отримання налаштування, додавання і видалення . Об'єкт Headers має асоціативний список заголовків, який по замовчуванню пустий і містить ноль чи більше пар імен і значень. Ви можете додавати то цього списку, використовуючи метод типу {{domxref("Headers.append","append()")}}. У всіх методах цього інтерфейсу імена заголовків знаходяться по  не чутливим до реєсту запитам 

- -

З метою безпеки деякі заголовки можуть контролюватись тільки за допомогою user agent. Ці заголовки включають: {{Glossary("Forbidden_header_name", "forbidden header names", 1)}}  і {{Glossary("Forbidden_response_header_name", "forbidden response header names", 1)}}.

- -

Об'єкт заголовку також має associated guard, що приймає значення: immutable, request, request-no-cors, response чи none. Це впливає на те чи меоди: {{domxref("Headers.set","set()")}}, {{domxref("Headers.delete","delete()")}}, і {{domxref("Headers.append","append()")}} змінюватимуть заголовок. Для більшої інформації дивіться {{Glossary("Guard")}}.

- -

Ви можете отримати об'єкт Headers  через властивості {{domxref("Request.headers")}} і{{domxref("Response.headers")}}, і створити новий об'єкт  Headers, використовуючи конструктор {{domxref("Headers.Headers()")}}.

- -

Об'єкт, що імплементує Headers може напряму використовуватись в структурі {{jsxref("Statements/for...of", "for...of")}} замість{{domxref('Headers.entries()', 'entries()')}}: for (var p of myHeaders)тотожний for (var p of myHeaders.entries()).

- -
-

Нотатка: Ви можете знайти більше про доступні заголовки прочитавши довідку по HTTP headers.

-
- -

Конструктор

- -
-
{{domxref("Headers.Headers()")}}
-
Створює новий об'єкт заголовку Headers.
-
- -

Методи

- -
-
{{domxref("Headers.append()")}}
-
Додає нове значення до існуючого заголовка в об'єкті Headers, або додає заголовок якщо той не існує.
-
{{domxref("Headers.delete()")}}
-
Видаляє заголовок з об'єкта Headers.
-
{{domxref("Headers.entries()")}}
-
Повертає {{jsxref("Iteration_protocols","iterator")}}, дозволяючи проводити через всі пари ключ/значення, що знаходяться в об'єкті.
-
{{domxref("Headers.forEach()")}}
-
Виконує вказану функцію для кожного елементу масива.
-
{{domxref("Headers.get()")}}
-
Повертає {{domxref("ByteString")}} послідовність всіх значеннях заголовків об'єкта Headers з заданим іменем.
-
{{domxref("Headers.has()")}}
-
Повертає логічне значення чи має обєкт Headers певний заголовок
-
{{domxref("Headers.keys()")}}
-
Повертає {{jsxref("Iteration_protocols", "iterator")}}, що дозволяє вам пройтись по всім ключам пар ключ/значення, що містяться в об'єкті.
-
{{domxref("Headers.set()")}}
-
Задає нове значення існуючого заголовку всередині об'єкта Headers, або додає заголовок, якщо той не існує.
-
{{domxref("Headers.values()")}}
-
Повертає {{jsxref("Iteration_protocols", "iterator")}}, що дозволяє вам проходитись по всім значенням пар ключ/значення, які містяться в цьому об'єкті.
-
- -
-

Нотатка:  Різниця між {{domxref("Headers.set()")}} і {{domxref("Headers.append()")}} в тому, що якщо вказаний заголовок уже існує і допускає багато значень, {{domxref("Headers.set()")}} перезаписуватиме існуючі значення новим., тоді як {{domxref("Headers.append()")}} буде додавати нове значення в кінець набору значень. Дивіться їх сторінки для прикладу кода.

-
- -
-

Нотатка: Всі методи Headers видаватимуть помилку TypeError якщо ви спробуєте передати не Валідне ім'я заголовку. Операції зміни заголовку видаватимуть TypeError, якщо заголовок  незмінний {{Glossary("Guard")}}. У разі інших невдач, вийняток не виникатиме.

-
- -
-

Нотатка: Коли значення Header повторюються вони автоматично сортуються в лексикографічному порядку і значення дубльованих заголовків комбінуються.

-
- -

Застарілі методи

- -
-
{{domxref("Headers.getAll()")}}
-
Використовується для повернення масиву всіх значень заголовка з заданим іменем в об'єкті Headers ; цей метод - видалений із специфікації і натомість тепер {{domxref("Headers.get()")}} повертає всі значення замість одного.
-
- -

Приклади

- -

В наступномуIn the following фрагменті ми створили новий заголовок, використавши конструктор Headers() constructor, додали новий заголовок за допомогою append(), потім повернули значення цього заголовку, використовуючи get():

- -
var myHeaders = new Headers();
-
-myHeaders.append('Content-Type', 'text/xml');
-myHeaders.get('Content-Type') // should return 'text/xml'
-
- -

Те ж можна досягнути передаванням масиву масивів чи літералу об'єкта до конструктора:

- -
var myHeaders = new Headers({
-    'Content-Type': 'text/xml'
-});
-
-// or, using an array of arrays:
-myHeaders = new Headers([
-    ['Content-Type', 'text/xml']
-]);
-
-myHeaders.get('Content-Type') // should return 'text/xml'
-
- -

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

- - - - - - - - - - - - - - -
СпецифікаціяСтатусКоментар
{{SpecName('Fetch','#headers-class','Headers')}}{{Spec2('Fetch')}} 
- -

Підтримка браузерів

- - - -

{{Compat("api.Headers")}}

- -

See also

- - - -

 

diff --git a/files/uk/web/api/history_api/index.html b/files/uk/web/api/history_api/index.html deleted file mode 100644 index 47dc8cad03..0000000000 --- a/files/uk/web/api/history_api/index.html +++ /dev/null @@ -1,122 +0,0 @@ ---- -title: History API -slug: Web/API/History_API -translation_of: Web/API/History_API ---- -
{{DefaultAPISidebar("History API")}}
- -

Об'єкт DOM {{DOMxRef("Window")}} надає доступ до сеансу історії браузера через об'єкт {{DOMxRef("Window.history","history")}}. Він має корисні методи та властивості, які дозволяють відкривати попередні і наступні сторінки з історії користувача та впливати на вміст стеку історії.

- -

Концепція та використання

- -

Навігація по історії користувача здійснюється за допомогою методів {{DOMxRef("History.back","back()")}}, {{DOMxRef("History.forward","forward()")}} та {{DOMxRef("History.go","go()")}}.

- -

Навігація вперед і назад

- -

Щоб відкрити попередню сторінку:

- -
window.history.back()
-
- -

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

- -

Подібним чином можна відкрити наступну сторінку (кнопка Вперед на панелі інструментів):

- -
window.history.forward()
-
- -

Перехід до певної точки в історії

- -

Щоб завантажити певну сторінку з історії сеансу використовується метод {{DOMxRef("History.go","go()")}}, передаючи як аргумент відносне положення до поточної сторінки (позиція поточної сторінки дорівнює 0.)

- -

Щоб повернутися на одну сторінку назад (еквівалент виклику {{DOMxRef("History.back","back()")}}):

- -
window.history.go(-1)
-
- -

Перехід на сторінку вперед, подібно до виклику {{DOMxRef("History.forward","forward()")}}:

- -
window.history.go(1)
-
- -

Подібним чином можна рухатись на 2 сторінки вперед, передаючи як аргумент 2 тощо.

- -

Ще одне застосування методу go() – оновлення поточної сторінки, використовуючи для цього аргумент 0, або викликаючи метод без аргументу:

- -
// Наступний код
-// оновить поточну сторінку
-window.history.go(0)
-window.history.go()
-
- -

Кількість сторінок у стеку історії визначається значенням властивості length:

- -
let numberOfEntries = window.history.length
-
- -

Інтерфейси

- -
-
{{domxref("History")}}
-
Дозволяє управляти історією сеансу браузера (відвіданими сторінками у вкладці або фреймі, куди завантажується поточна сторінка).
-
- -

Приклади

- -

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

- -
window.onpopstate = function(event) {
-  console.log(`location: ${document.location}, state: ${JSON.stringify(event.state)}`)
-}
-
-history.pushState({page: 1}, "title 1", "?page=1")
-history.pushState({page: 2}, "title 2", "?page=2")
-history.replaceState({page: 3}, "title 3", "?page=3")
-history.back() // виведе в консоль "location: http://example.com/example.html?page=1, state: {"page":1}"
-history.back() // виведе в консоль "location: http://example.com/example.html, state: null"
-history.go(2)  // виведе в консоль "location: http://example.com/example.html?page=3, state: {"page":3}"
- -

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

- - - - - - - - - - - - - - - - - - - - - -
СпецифікаціяСтатусКоментар
{{SpecName("HTML WHATWG", "browsers.html#history", "History")}}{{Spec2("HTML WHATWG")}}No change from {{SpecName("HTML5 W3C")}}.
{{SpecName("HTML5 W3C", "browsers.html#history", "History")}}{{Spec2("HTML5 W3C")}}Initial definition.
- -

Сумісність

- - - -

{{Compat("api.History")}}

- -

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

- -

Довідка

- - - -

Посібник

- - diff --git a/files/uk/web/api/html_dom_api/index.html b/files/uk/web/api/html_dom_api/index.html deleted file mode 100644 index 4f94294e96..0000000000 --- a/files/uk/web/api/html_dom_api/index.html +++ /dev/null @@ -1,472 +0,0 @@ ---- -title: The HTML DOM API -slug: Web/API/HTML_DOM_API -tags: - - API - - Beginner - - DOM - - Documents - - Elements - - HTML DOM - - HTML DOM API - - NeedsTranslation - - Nodes - - Overview - - TopicStub - - Web - - Windows - - hierarchy -translation_of: Web/API/HTML_DOM_API ---- -

{{DefaultAPISidebar("HTML DOM")}}

- -

The HTML DOM API is made up of the interfaces that define the functionality of each of the {{Glossary("element", "elements")}} in {{Glossary("HTML")}}, as well as any supporting types and interfaces they rely upon.

- -

The functional areas included in the HTML DOM API include:

- - - -

HTML DOM concepts and usage

- -

In this article, we'll focus on the parts of the HTML DOM that involve engaging with HTML elements. Discussion of other areas, such as Drag and Drop, WebSockets, Web Storage, etc. can be found in the documentation for those APIs.

- -

Structure of an HTML document

- -

The Document Object Model ({{Glossary("DOM")}}) is an architecture that describes the structure of a {{domxref("document")}}; each document is represented by an instance of the interface {{domxref("Document")}}. A document, in turn, consists of a hierarchical tree of nodes, in which a node is a fundamental record representing a single object within the document (such as an element or text node).

- -

Nodes may be strictly organizational, providing a means for grouping other nodes together or for providing a point at which a hierarchy can be constructed; other nodes may represent visible components of a document. Each node is based on the {{domxref("Node")}} interface, which provides properties for getting information about the node as well as methods for creating, deleting, and organizing nodes within the DOM.

- -

Nodes don't have any concept of including the content that is actually displayed in the document. They're empty vessels. The fundamental notion of a node that can represent visual content is introduced by the {{domxref("Element")}} interface. An Element object instance represents a single element in a document created using either HTML or an {{glossary("XML")}} vocabulary such as {{glossary("SVG")}}.

- -

For example, consider a document with two elements, one of which has two more elements nested inside it:

- -

Structure of a document with elements inside a document in a window

- -

While the {{domxref("Document")}} interface is defined as part of the DOM specification, the HTML specification significantly enhances it to add information specific to using the DOM in the context of a web browser, as well as to using it to represent HTML documents specifically.

- -

Among the things added to Document by the HTML standard are:

- - - -

HTML element interfaces

- -

The Element interface has been further adapted to represent HTML elements specifically by introducing the {{domxref("HTMLElement")}} interface, which all more specific HTML element classes inherit from. This expands the Element class to add HTML-specific general features to the element nodes. Properties added by HTMLElement include for example {{domxref("HTMLElement.hidden", "hidden")}} and {{domxref("HTMLElement.innerText", "innerText")}}. HTMLElement also adds all the global event handlers.

- -

An {{Glossary("HTML")}} document is a DOM tree in which each of the nodes is an HTML element, represented by the {{domxref("HTMLElement")}} interface. The HTMLElement class, in turn, implements Node, so every element is also a node (but not the other way around). This way, the structural features implemented by the {{domxref("Node")}} interface are also available to HTML elements, allowing them to be nested within each other, created and deleted, moved around, and so forth.

- -

The HTMLElement interface is generic, however, providing only the functionality common to all HTML elements such as the element's ID, its coordinates, the HTML making up the element, information about scroll position, and so forth.

- -

In order to expand upon the functionality of the core HTMLElement interface to provide the features needed by a specific element, the HTMLElement class is subclassed to add the needed properties and methods. For example, the {{HTMLElement("canvas")}} element is represented by an object of type {{domxref("HTMLCanvasElement")}}. HTMLCanvasElement augments the HTMLElement type by adding properties such as {{domxref("HTMLCanvasElement.height", "height")}} and methods like {{domxref("HTMLCanvasElement.getContext", "getContext()")}} to provide canvas-specific features.

- -

The overall inheritance for HTML element classes looks like this:

- -

Hierarchy of interfaces for HTML elements

- -

As such, an element inherits the properties and methods of all of its ancestors. For example, consider a {{HTMLElement("a")}} element, which is represented in the DOM by an object of type {{domxref("HTMLAnchorElement")}}. The element, then, includes the anchor-specific properties and methods described in that class's documentation, but also those defined by {{domxref("HTMLElement")}} and {{domxref("Element")}}, as well as from {{domxref("Node")}} and, finally, {{domxref("EventTarget")}}.

- -

Each level defines a key aspect of the utility of the element. From Node, the element inherits concepts surrounding the ability for the element to be contained by another element, and to contain other elements itself. Of special importance is what is gained by inheriting from EventTarget: the ability to receive and handle events such as mouse clicks, play and pause events, and so forth.

- -

There are elements that share commonalities and thus have an additional intermediary type. For example, the {{HTMLElement("audio")}} and {{HTMLElement("video")}} elements both present audiovisual media. The corresponding types, {{domxref("HTMLAudioElement")}} and {{domxref("HTMLVideoElement")}}, are both based upon the common type {{domxref("HTMLMediaElement")}}, which in turn is based upon {{domxref("HTMLElement")}} and so forth. HTMLMediaElement defines the methods and properties held in common between audio and video elements.

- -

These element-specific interfaces make up the majority of the HTML DOM API, and are the focus of this article. To learn more about the actual structure of the DOM, see Introduction to the DOM.

- -

HTML DOM target audience

- -

The features exposed by the HTML DOM are among the most commonly-used APIs in the web developer's arsenal. All but the most simple web applications will use some features of the HTML DOM.

- -

HTML DOM API interfaces

- -

The majority of the interfaces that comprise the HTML DOM API map almost one-to-one to individual HTML elements, or to a small group of elements with similar functionality. In addition, the HTML DOM API includes a few interfaces and types to support the HTML element interfaces.

- -

HTML element interfaces

- -

These interfaces represent specific HTML elements (or sets of related elements which have the same properties and methods associated with them).

- -
- -
- -

Web app and browser integration interfaces

- -

These interfaces offer access to the browser window and document that contain the HTML, as well as to the browser's state, available plugins (if any), and various configuration options.

- -
- -
- -

Form support interfaces

- -

These interfaces provide structure and functionality required by the elements used to create and manage forms, including the {{HTMLElement("form")}} and {{HTMLElement("input")}} elements.

- -
- -
- -

Canvas and image interfaces

- -

These interfaces represent objects used by the Canvas API as well as the {{HTMLElement("img")}} element and {{HTMLElement("picture")}} elements.

- -
- -
- -

Media interfaces

- -

The media interfaces provide HTML access to the contents of the media elements: {{HTMLElement("audio")}} and {{HTMLElement("video")}}.

- -
- -
- -

Drag and drop interfaces

- -

These interfaces are used by the HTML Drag and Drop API to represent individual draggable (or dragged) items, groups of dragged or draggable items, and to handle the drag and drop process.

- -
- -
- -

Page history interfaces

- -

The History API interfaces let you access information about the browser's history, as well as to shift the browser's current tab forward and backward through that history.

- -
- -
- -

Web Components interfaces

- -

These interfaces are used by the Web Components API to create and manage the available custom elements.

- -
- -
- -

Miscellaneous and supporting interfaces

- -

These supporting object types are used in a variety of ways in the HTML DOM API; in addition, {{domxref("PromiseRejectionEvent")}} represents the event delivered when a {{Glossary("JavaScript")}} {{jsxref("Promise")}} is rejected.

- -
- -
- -

Interfaces belonging to other APIs

- -

There are several interfaces which are technically defined in the HTML specification while actually being part of other APIs.

- -

Web storage interfaces

- -

The Web Storage API provides the ability for web sites to store data either temporarily or permanently on the user's device for later re-use.

- -
- -
- -

Web Workers interfaces

- -

These interfaces are used by the Web Workers API both to establish the ability for workers to interact with an app and its content, but also to support messaging between windows or apps.

- -
- -
- -

WebSocket interfaces

- -

These interfaces, defined by the HTML specification, are used by the WebSocket API.

- -
- -
- -

Server-sent events interfaces

- -

The {{domxref("EventSource")}} interface represents the source which sent or is sending server-sent events.

- -
- -
- -

Examples

- -

In this example, an {{HTMLElement("input")}} element's {{domxref("HTMLInputElement.input_event", "input")}} event is monitored in order to update the state of a form's "submit" button based on whether or not a given field currently has a value.

- -

JavaScript

- -
const nameField = document.getElementById("userName");
-const sendButton = document.getElementById("sendButton")
-
-sendButton.disabled = true;
-// [note: this is disabled since it causes this article to always load with this example focused and scrolled into view]
-//nameField.focus();
-
-nameField.addEventListener("input", event => {
-  const elem = event.target;
-  const valid = elem.value.length != 0;
-
-  if (valid && sendButton.disabled) {
-    sendButton.disabled = false;
-  } else if (!valid && !sendButton.disabled) {
-    sendButton.disabled = true;
-  }
-});
- -

This code uses the {{domxref("Document")}} interface's {{domxref("Document.getElementById", "getElementById()")}} method to get the DOM object representing the {{HTMLElement("input")}} elements whose IDs are userName and sendButton.  With these, we can access the properties and methods that provide information about and grant control over these elements.

- -

The {{domxref("HTMLInputElement")}} object for the "Send" button's {{domxref("HTMLInputElement.disabled", "disabled")}} property is set to true, which disables the "Send" button so it can't be clicked. In addition, the user name input field is made the active focus by calling the {{domxref("HTMLElement.focus", "focus()")}} method it inherits from {{domxref("HTMLElement")}}.

- -

Then {{domxref("EventTarget.addEventListener", "addEventListener()")}} is called to add a handler for the input event to the user name input. This code looks at the length of the current value of the input; if it's zero, then the "Send" button is disabled if it's not already disabled. Otherwise, the code ensures that the button is enabled.

- -

With this in place, the "Send" button is always enabled whenever the user name input field has a value, and disabled when it's empty.

- -

HTML

- -

The HTML for the form looks like this:

- -
<p>Please provide the information below. Items marked with "*" are required.</p>
-<form action="" method="get">
-  <p>
-    <label for="userName" required>Your name:</label>
-    <input type="text" id="userName"> (*)
-  </p>
-  <p>
-    <label for="email">Email:</label>
-    <input type="email" id="userEmail">
-  </p>
-  <input type="submit" value="Send" id="sendButton">
-</form>
-
- -

Result

- -

{{EmbedLiveSample("Examples", 640, 300)}}

- -

Specifications

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
SpecificationStatusComment
{{SpecName('HTML WHATWG')}}{{Spec2('HTML WHATWG')}}WHATWG HTML Specification
{{SpecName('HTML5 W3C')}}{{Spec2('HTML5 W3C')}}No change from {{SpecName("DOM2 HTML")}}
{{SpecName('DOM2 HTML')}}{{Spec2('DOM2 HTML')}}No change from {{SpecName("DOM1")}}.
{{SpecName('DOM1')}}{{Spec2('DOM1')}}Initial definition.
- -

Browser compatibility

- -
- - -

{{Compat("api.HTMLElement")}}

-
- -

See also

- -
-
References
-
- -
-
Guides
-
- -
-
diff --git a/files/uk/web/api/html_dom_api/microtask_guide/index.html b/files/uk/web/api/html_dom_api/microtask_guide/index.html deleted file mode 100644 index 7b02378a59..0000000000 --- a/files/uk/web/api/html_dom_api/microtask_guide/index.html +++ /dev/null @@ -1,324 +0,0 @@ ---- -title: Використання мікрозадач у JavaScript за допомогою queueMicrotask() -slug: Web/API/HTML_DOM_API/Microtask_guide -tags: - - API - - JavaScript - - ServiceWorker - - SharedWorker - - Window - - Worker - - queueMicrotask - - Довідник - - асинхронний - - мікрозадача - - пакет - - черга -translation_of: Web/API/HTML_DOM_API/Microtask_guide ---- -

{{APIRef("HTML DOM")}}

- -

Мікрозадача - це коротка функція, яка виконується після того, як функція чи програма, яка її створила, завершується, та тільки якщо стек виконання JavaScript порожній, але перед поверненням контролю до циклу подій {{Glossary("user agent", "користувацького агента")}} для керування середовищем виконання скрипта. Даний цикл подій може бути або головним циклом подій веб-переглядача, або циклом подій, що керує веб-виконавцем. Це дозволяє даній функції виконуватись без ризику втрутитись у виконання іншого скрипта, в той же час гарантує, що мікрозадача виконається до того, як користувацький агент матиме змогу відреагувати на дії, виконані цією мікрозадачею.

- -

Проміси JavaScript та Mutation Observer API використовують чергу мікрозадач для виконання своїх зворотніх викликів, але бувають інші випадки, коли здатність відкласти роботу до завершення поточного проходу циклу подій може бути корисна. Щоб дозволити стороннім бібліотекам, фреймворкам та поліфілам використовувати мікрозадачі, метод {{domxref("WindowOrWorkerGlobalScope.queueMicrotask", "queueMicrotask()")}} доступний у інтерфейсах {{domxref("Window")}} та {{domxref("Worker")}} через домішку {{domxref("WindowOrWorkerGlobalScope")}}.

- -

Задачі та мікрозадачі

- -

Щоб належно обговорювати мікрозадачі, насамперед, корисно знати, що таке задача JavaScript та чим мікрозадачі відрізняються від задач. Це швидке, спрощене пояснення, але якщо вам потрібно більше подробиць, ви можете їх дізнатись у статті В подробицях: мікрозадачі та середовище виконання JavaScript.

- -

Задачі

- -

Задача - це будь-який код JavaScript, що запланований до запуску стандартними механізмами, такими як початковий запуск програми, запуск зворотного виклику для події, або запуск таймера чи інтервалу. Всі вони розташовуються у черзі задач.

- -

Задачі додаються до черги задач, коли:

- - - -

Цикл подій, що керує вашим кодом, обробляє ці задачі одна за одною, в тому порядку, в якому вони були додані у чергу. Лише ті задачі, які вже знаходились у черзі задач, коли почався прохід циклу подій, будуть виконані протягом поточної ітерації. Решті доведеться зачекати наступної ітерації.

- -

Мікрозадачі

- -

Спершу різниця між мікрозадачами та задачами здається незначною. І вони дійсно схожі; і те, й інше - код JavaScript, який розміщується у черзі та запускається у належний час. Однак, в той час, як цикл подій запускає лише задачі, наявні у черзі на момент початку ітерації, одна за одною, з мікрозадачами він поводиться зовсім по-іншому.

- -

Є дві ключові відмінності.

- -

По-перше, кожен раз, коли задача завершується, цикл подій перевіряє, чи задача повертає контроль іншому коду JavaScript. Якщо ні, він запускає всі мікрозадачі з черги мікрозадач. Таким чином, черга мікрозадач обробляється багаторазово протягом однієї ітерації циклу подій, в тому числі після обробки подій та інших зворотних викликів.

- -

По-друге, якщо мікрозадача додає інші мікрозадачі до черги, викликаючи метод {{domxref("WindowOrWorkerGlobalScope.queueMicrotask", "queueMicrotask()")}}, ці додані мікрозадачі виконуються перед запуском наступної задачі. Все тому, що цикл подій викликатиме мікрозадачі, доки у черзі не залишиться жодної, навіть якщо при цьому додаються нові.

- -
-

Застереження: Оскільки мікрозадачі можуть ставити у чергу інші мікрозадачі, а цикл подій продовжуватиме обробляти мікрозадачі, доки черга не спорожніє, існує реальний ризик спричинити нескінченну обробку мікрозадач циклом подій. Будьте обережні, додаючи мікрозадачі рекурсивно.

-
- -

Використання мікрозадач

- -

Перед тим, як продовжити, важливо зазначити ще раз, що більшість програмістів нечасто використовують мікрозадачі, якщо взагалі використовують. Це вузькоспеціалізована функціональність сучасної JavaScript-розробки для переглядачів, що дозволяє вам запланувати виконання коду попереду чогось іншого у довгому списку речей, що чекають на виконання комп'ютером користувача. Зловживання цією можливістю призведе до проблем з продуктивністю.

- -

Додавання мікрозадач у чергу

- -

Таким чином, вам варто використовувати мікрозадачі лише тоді, коли немає іншого рішення, або при створенні фреймворків чи бібліотек, які мають використовувати мікрозадачі для створення функціональності, яку реалізують. Хоча раніше існували трюки, які дозволяли ставити мікрозадачі в чергу (наприклад, створення проміса, який негайно вирішується), введення методу {{domxref("WindowOrWorkerGlobalScope.queueMicrotask", "queueMicrotask()")}} додає стандартний спосіб створення мікрозадач безпечно та без допомоги трюків.

- -

Введення методу queueMicrotask() дозволяє уникнути вивертів, що трапляються під час такого проникнення у чергу мікрозадач за допомогою промісів. Наприклад, при використанні промісів для створення мікрозадач, винятки, викинуті зворотним викликом, повідомляються як відхилені проміси, а не як стандартні винятки. Також, створення та знищення промісів потребує додаткових витрат як часу, так і пам'яті, цього уникає функція, яка належним чином ставить мікрозадачі у чергу.

- -

Просто передайте {{jsxref("Function","функцію")}} JavaScript, яку треба викликати, коли контекст обробляє мікрозадачі, у метод queueMicrotask(), доступний у глобальному контексті, як визначено у інтерфейсі {{domxref("Window")}} або {{domxref("Worker")}}, в залежності від поточного контексту виконання.

- -
queueMicrotask(() => {
-  /* тут код, який виконує мікрозадача */
-});
-
- -

Сама функція мікрозадачі не приймає параметрів та не повертає значення.

- -

Коли використовувати мікрозадачі

- -

У цьому розділі ми розглянемо сценарії, в яких мікрозадачі є особливо корисними. Загалом, мова йде про отримання та перевірку результатів, або прибирання, після того, як головне тіло контексту виконання JavaScript завершується, але перед тим, як опрацьовуються будь-які обробники подій, таймери та інтервали, чи інші зворотні виклики.

- -

Коли це корисно?

- -

Головна причина використання мікрозадач проста: забезпечити послідовний порядок виконання задач, навіть коли результати чи дані доступні синхронно, одночасно знижуючи ризик помітних користувачу затримок у операціях.

- -

Забезпечення порядку виконання при використанні промісів в умовних конструкціях

- -

Одна з ситуацій, в якій можуть використовуватись мікрозадачі - це забезпечення завжди послідовного порядку виконання у ситуації, коли проміси використовуються у одному блоці конструкції if...else (чи іншої умовної конструкції), але не в іншому блоці. Розглянемо наступний код:

- -
customElement.prototype.getData = url => {
-  if (this.cache[url]) {
-    this.data = this.cache[url];
-    this.dispatchEvent(new Event("load"));
-  } else {
-    fetch(url).then(result => result.arrayBuffer()).then(data => {
-      this.cache[url] = data;
-      this.data = data;
-      this.dispatchEvent(new Event("load"));
-    });
-  }
-};
- -

Проблема тут полягає в тому, що, використовуючи задачу в одній гілці конструкції if...else (у випадку, коли зображення доступне з кешу), але маючи проміси у блоці else, ми отримуємо ситуацію, в якій порядок операцій може бути різним; наприклад, як показано нижче.

- -
element.addEventListener("load", () => console.log("Завантажені дані"));
-console.log("Отримання даних...");
-element.getData();
-console.log("Дані отримано");
-
- -

Виконання цього коду два рази підряд дає результати, наведені у таблиці:

- - - - - - - - - - - - - - - -
Результати, коли дані не кешовані (зліва) та коли дані знайдені в кеші
Дані не кешованіДані кешовані
-
-Отримання даних
-Дані отримано
-Завантажені дані
-
-
-
-Отримання даних
-Завантажені дані
-Дані отримано
-
-
- -

Навіть гірше, іноді властивість елементів data буде встановлена, а іноді не буде, на той момент, коли цей код завершує виконання.

- -

Ми можемо забезпечити послідовний порядок цих операцій використанням мікрозадачі у блоці if, щоб збалансувати два блоки:

- -
customElement.prototype.getData = url => {
-  if (this.cache[url]) {
-    queueMicrotask(() => {
-      this.data = this.cache[url];
-      this.dispatchEvent(new Event("load"));
-    });
-  } else {
-    fetch(url).then(result => result.arrayBuffer()).then(data => {
-      this.cache[url] = data;
-      this.data = data;
-      this.dispatchEvent(new Event("load"));
-    });
-  }
-};
- -

Це збалансовує два блоки, бо тепер в обох ситуаціях встановлення значення data та запуск події load відбувається всередині мікрозадачі (за допомогою queueMicrotask() у блоці if та за допомогою промісів, що використовуються методом {{domxref("WindowOrWorkerGlobalScope.fetch", "fetch()")}}, у блоці else).

- -

Пакетне виконання операцій

- -

Ви також можете використати мікрозадачі, щоб зібрати множину запитів з різних джерел у єдиний пакет, уникаючи можливих затрат, пов'язаних з багатьма викликами задля виконання задач одного типу.

- -

Фрагмент коду, наведений нижче, створює функцію, яка збирає множину повідомлень у масив, використовуючи мікрозадачу, щоб відправити їх як єдиний об'єкт по завершенні контексту.

- -
const messageQueue = [];
-
-let sendMessage = message => {
-  messageQueue.push(message);
-
-  if (messageQueue.length === 1) {
-    queueMicrotask(() => {
-      const json = JSON.stringify(messageQueue);
-      messageQueue.length = 0;
-      fetch("url-of-receiver", json);
-    });
-  }
-};
-
- -

Коли викликається sendMessage(), вказане повідомлення спочатку додається у масив черги повідомлень. А далі відбувається цікаве.

- -

Якщо повідомлення, яке ми додали до масиву, є першим, ми додаємо мікрозадачу, яка відправлятиме пакет. Мікрозадача виконається, як завжди, коли шлях виконання JavaScript сягне верхнього рівня, одразу перед зворотними викликами. Це означає, що будь-які подальші виклики sendMessage(), зроблені в цей час, додадуть свої повідомлення до черги повідомлень, але, завдяки перевірці довжини масиву перед додаванням мікрозадачі, нових мікрозадач у чергу не буде додано.

- -

Коли запускається мікрозадача, то вона має масив, потенційно, багатьох повідомлень, які на неї очікують. Вона починається кодуванням його як JSON за допомогою методу {{jsxref("JSON.stringify()")}}. Після цього вміст масиву більше не потрібний, а отже, ми спорожнюємо масив messageQueue. Нарешті, ми використовуємо метод {{domxref("WindowOrWorkerGlobalScope.fetch", "fetch()")}}, щоб відправити рядок JSON на сервер.

- -

Це дозволяє кожному виклику sendMessage(), зробленому під час тієї самої ітерації циклу подій, додавати свої повідомлення до тієї самої операції fetch(), без потенційних затримок трансмісії іншими задачами, такими як таймери та подібні.

- -

Сервер отримає рядок JSON, далі, ймовірно, декодує його та обробить повідомлення, які знайде у отриманому масиві.

- -

Приклади

- -

Простий приклад мікрозадачі

- -

У цьому простому прикладі ми бачимо, що додавання мікрозадачі у чергу спричиняє запуск зворотного виклику мікрозадачі після того, як тіло цього скрипта верхнього рівня завершує виконання.

- - - -

JavaScript

- - - -

У наступному коді ми бачимо виклик {{domxref("WindowOrWorkerGlobalScope.queueMicrotask", "queueMicrotask()")}}, що використовується для планування запуску мікрозадачі. Цей виклик оточують виклики log(), користувацької функції, яка просто виводить текст на екран.

- -
log("До розміщення мікрозадачі в черзі");
-queueMicrotask(() => {
-  log("Мікрозадача запустилась.")
-});
-log("Після розміщення мікрозадачі в черзі");
- -

Результат

- -

{{EmbedLiveSample("Простий_приклад_мікрозадачі", 640, 80)}}

- -

Таймер та приклад мікрозадачі

- -

У цьому прикладі встановлюється таймер для запуску через нуль мілісекунд (або "якомога швидше"). Це демонструє різницю між тим, що означає "якомога швидше" при плануванні нової задачі (наприклад, при використанні setTimeout()) у порівнянні з використанням мікрозадачі.

- - - -

JavaScript

- - - -

У наступному коді ми бачимо виклик {{domxref("WindowOrWorkerGlobalScope.queueMicrotask", "queueMicrotask()")}}, який використовується для планування запуску мікрозадачі. Цей виклик розташований між викликами log(), користувацької функції, яка просто виводить текст на екран.

- -

Наступний код встановлює таймер, який має запуститися через нуль мілісекунд, після чого додає у чергу мікрозадачу. Він оточений викликами log() для виводу додаткових повідомлень.

- -
let callback = () => log("Запустився звичайний зворотний виклик таймера");
-
-let urgentCallback = () => log("*** О, ні! Запустився терміновий зворотний виклик!");
-
-log("Початок головної програми");
-setTimeout(callback, 0);
-queueMicrotask(urgentCallback);
-log("Кінець головної програми");
- -

Результат

- -

{{EmbedLiveSample("Таймер_та_приклад_мікрозадачі", 640, 100)}}

- -

Зауважте, що текст, який виводиться головною програмою, з'являється першим, далі текст, виведений мікрозадачею, а за ним текст зворотного виклику таймера. Все тому, що, коли задача, що керує виконанням головної програми, завершується, черга мікрозадач обробляється раніше черги задач, в якій розташований зворотний виклик таймера. Знання того, що задачі та мікрозадачі розташовуються у різних чергах, і те, що мікрозадачі виконуються першими, допомагає легше в цьому розібратись.

- -

Мікрозадача з функції

- -

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

- - - -

JavaScript

- - - -

Код головної програми наступний. Функція doWork() викликає queueMicrotask(), але мікрозадача не запускається, доки вся програма не завершується, оскільки саме тоді завершується задача і не залишається нічого іншого у стеку виконання.

- -
let callback = () => log("Запустився звичайний зворотний виклик таймера");
-
-let urgentCallback = () => log("*** О, ні! Запустився терміновий зворотний виклик!");
-
-let doWork = () => {
-  let result = 1;
-
-  queueMicrotask(urgentCallback);
-
-  for (let i=2; i<=10; i++) {
-    result *= i;
-  }
-  return result;
-};
-
-log("Початок головної програми");
-setTimeout(callback, 0);
-log(`10! дорівнює ${doWork()}`);
-log("Кінець головної програми");
- -

Результат

- -

{{EmbedLiveSample("Мікрозадача_з_функції", 640, 100)}}

- -

Див. також

- - diff --git a/files/uk/web/api/htmlcanvaselement/index.html b/files/uk/web/api/htmlcanvaselement/index.html deleted file mode 100644 index 9f1a6452ed..0000000000 --- a/files/uk/web/api/htmlcanvaselement/index.html +++ /dev/null @@ -1,264 +0,0 @@ ---- -title: HTMLCanvasElement -slug: Web/API/HTMLCanvasElement -tags: - - API - - Canvas - - HTML DOM - - Interface - - NeedsTranslation - - Reference - - TopicStub -translation_of: Web/API/HTMLCanvasElement ---- -
-
{{APIRef("Canvas API")}}
-
- -

The HTMLCanvasElement interface provides properties and methods for manipulating the layout and presentation of canvas elements. The HTMLCanvasElement interface also inherits the properties and methods of the {{domxref("HTMLElement")}} interface.

- -

{{InheritanceDiagram}}

- -

Properties

- -

Inherits properties from its parent, {{domxref("HTMLElement")}}.

- -
-
{{domxref("HTMLCanvasElement.height")}}
-
Is a positive integer reflecting the {{htmlattrxref("height", "canvas")}} HTML attribute of the {{HTMLElement("canvas")}} element interpreted in CSS pixels. When the attribute is not specified, or if it is set to an invalid value, like a negative, the default value of 150 is used.
-
{{domxref("HTMLCanvasElement.mozOpaque")}} {{non-standard_inline}}
-
Is a {{jsxref("Boolean")}} reflecting the {{htmlattrxref("moz-opaque", "canvas")}} HTML attribute of the {{HTMLElement("canvas")}} element. It lets the canvas know whether or not translucency will be a factor. If the canvas knows there's no translucency, painting performance can be optimized.
-
{{domxref("HTMLCanvasElement.width")}}
-
Is a positive integer reflecting the {{htmlattrxref("width", "canvas")}} HTML attribute of the {{HTMLElement("canvas")}} element interpreted in CSS pixels. When the attribute is not specified, or if it is set to an invalid value, like a negative, the default value of 300 is used.
-
{{domxref("HTMLCanvasElement.mozPrintCallback")}}{{non-standard_inline}}
-
Is a function that is Initially null, Web content can set this to a JavaScript function that will be called if the page is printed. This function can then redraw the canvas at a higher resolution that is suitable for the printer being used. See this blog post.
-
- -

Methods

- -

Inherits methods from its parent, {{domxref("HTMLElement")}}.

- -
-
{{domxref("HTMLCanvasElement.captureStream()")}} {{experimental_inline}}
-
Returns a {{domxref("CanvasCaptureMediaStream")}} that is a real-time video capture of the surface of the canvas.
-
{{domxref("HTMLCanvasElement.getContext()")}}
-
Returns a drawing context on the canvas, or null if the context ID is not supported. A drawing context lets you draw on the canvas. Calling getContext with "2d" returns a {{domxref("CanvasRenderingContext2D")}} object, whereas calling it with "experimental-webgl" (or "webgl") returns a {{domxref("WebGLRenderingContext")}} object. This context is only available on browsers that implement WebGL.
-
{{domxref("HTMLCanvasElement.toDataURL()")}}
-
Returns a data-URL containing a representation of the image in the format specified by the type parameter (defaults to png). The returned image is in a resolution of 96dpi.
-
{{domxref("HTMLCanvasElement.toBlob()")}}
-
Creates a {{domxref("Blob")}} object representing the image contained in the canvas; this file may be cached on the disk or stored in memory at the discretion of the user agent.
-
{{domxref("HTMLCanvasElement.transferControlToOffscreen()")}} {{experimental_inline}}
-
Transfers control to an {{domxref("OffscreenCanvas")}} object, either on the main thread or on a worker.
-
{{domxref("HTMLCanvasElement.mozGetAsFile()")}} {{non-standard_inline}} {{deprecated_inline}}
-
Returns a {{domxref("File")}} object representing the image contained in the canvas; this file is a memory-based file, with the specified name. If type is not specified, the image type is image/png.
-
- -

Specifications

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
SpecificationStatusComment
{{SpecName('Media Capture DOM Elements', '#html-media-element-media-capture-extensions', 'HTMLCanvasElement')}}{{Spec2('Media Capture DOM Elements')}}Adds the method captureStream().
{{SpecName('HTML WHATWG', "#the-canvas-element", "HTMLCanvasElement")}}{{Spec2('HTML WHATWG')}}The method getContext() now returns a {{domxref("RenderingContext")}} rather than an opaque object.
- The methods probablySupportsContext(), setContext() and transferControlToProxy()have been added.
{{SpecName('HTML5.1', "scripting-1.html#the-canvas-element", "HTMLCanvasElement")}}{{Spec2('HTML5.1')}} 
{{SpecName('HTML5 W3C', "scripting-1.html#the-canvas-element", "HTMLCanvasElement")}}{{Spec2('HTML5 W3C')}}Initial definition.
- -

Browser compatibility

- -
{{CompatibilityTable}}
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FeatureChromeEdgeFirefox (Gecko)Internet ExplorerOperaSafari
Basic support (2D context)4.0{{CompatVersionUnknown}}{{CompatGeckoDesktop('1.9.2')}}9.09.0 [1]3.1
toBlob()50{{CompatNo}}{{CompatGeckoDesktop('19')}} [2]{{CompatUnknown}}{{CompatUnknown}}{{CompatNo}} (bug 71270)
probablySupportsContext(),
- setContext(),
- transferControlToProxy() {{experimental_inline}}
{{CompatNo}}{{CompatUnknown}}{{CompatNo}}{{CompatNo}}{{CompatNo}}{{CompatNo}}
mozGetAsFile() {{non-standard_inline}} {{deprecated_inline}}{{CompatNo}}{{CompatNo}}{{CompatGeckoDesktop('2')}}{{CompatNo}}{{CompatNo}}{{CompatNo}}
captureStream() {{experimental_inline}}{{CompatNo}}{{CompatNo}}{{CompatGeckoDesktop('41')}}{{CompatNo}}{{CompatNo}}{{CompatNo}}
transferControlToOffscreen() {{experimental_inline}}{{CompatNo}}{{CompatNo}}{{CompatGeckoDesktop(44)}} [3]{{CompatNo}}{{CompatNo}}{{CompatNo}}
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FeatureAndroidChrome for AndroidEdgeFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Basic support (2D context)2.1{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatUnknown}}10.0 [1]3.2
webgl context{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}{{CompatVersionUnknown}} as experimental-webgl{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}
toBlob(){{CompatNo}} (bug 67587)50{{CompatNo}}{{CompatGeckoMobile('18')}} [2]{{CompatUnknown}}{{CompatUnknown}}{{CompatNo}} (bug 71270)
probablySupportsContext(),
- setContext(),
- transferControlToProxy() {{experimental_inline}}
{{CompatNo}}{{CompatNo}}{{CompatUnknown}}{{CompatNo}}{{CompatNo}}{{CompatNo}}{{CompatNo}}
mozGetAsFile() {{non-standard_inline}} {{deprecated_inline}}{{CompatNo}}{{CompatNo}}{{CompatNo}}{{CompatGeckoMobile('2')}}{{CompatNo}}{{CompatNo}}{{CompatNo}}
captureStream() {{experimental_inline}}{{CompatNo}}{{CompatNo}}{{CompatNo}}{{CompatGeckoMobile('41')}}{{CompatNo}}{{CompatNo}}{{CompatNo}}
transferControlToOffscreen() {{experimental_inline}}{{CompatNo}}{{CompatNo}}{{CompatNo}}{{CompatGeckoMobile(44)}} [3]{{CompatNo}}{{CompatNo}}{{CompatNo}}
-
- -

[1] Opera Mini 5.0 and later has partial support.

- -

[2] Support for the third parameter, has been added in Gecko 25 only: when used with the "image/jpeg" type, this argument specifies the image quality.

- -

[3] This feature is behind a feature preference setting. In about:config, set gfx.offscreencanvas.enabled to true.

- -

See also

- - diff --git a/files/uk/web/api/htmlelement/index.html b/files/uk/web/api/htmlelement/index.html deleted file mode 100644 index 02de0c792e..0000000000 --- a/files/uk/web/api/htmlelement/index.html +++ /dev/null @@ -1,486 +0,0 @@ ---- -title: HTMLElement -slug: Web/API/HTMLElement -tags: - - API - - HTML DOM - - Interface - - NeedsMobileBrowserCompatibility - - NeedsNewLayout - - NeedsTranslation - - Reference - - TopicStub -translation_of: Web/API/HTMLElement ---- -
-
{{ APIRef("HTML DOM") }}
-
- -
 
- -

The HTMLElement interface represents any HTML element. Some elements directly implement this interface, others implement it via an interface that inherits it.

- -

{{InheritanceDiagram}}

- -

Properties

- -

Inherits properties from its parent, {{domxref("Element")}}, and implements those from {{domxref("GlobalEventHandlers")}} and {{domxref("TouchEventHandlers")}}.

- -
-
{{domxref("HTMLElement.accessKey")}}
-
Is a {{domxref("DOMString")}} representing the access key assigned to the element.
-
{{domxref("HTMLElement.accessKeyLabel")}} {{readonlyInline}}
-
Returns a {{domxref("DOMString")}} containing the element's assigned access key.
-
{{domxref("HTMLElement.contentEditable")}}
-
Is a {{domxref("DOMString")}}, where a value of "true" means the element is editable and a value of "false" means it isn't.
-
{{domxref("HTMLElement.isContentEditable")}} {{readonlyInline}}
-
Returns a {{domxref("Boolean")}} that indicates whether or not the content of the element can be edited.
-
{{domxref("HTMLElement.contextMenu")}}
-
Is a {{domxref("HTMLMenuElement")}} representing the contextual menu associated with the element. It may be null.
-
{{domxref("HTMLElement.dataset")}} {{readonlyInline}}
-
Returns a {{domxref("DOMStringMap")}} with which script can read and write the element's custom data attributes (data-*) .
-
{{domxref("HTMLElement.dir")}}
-
Is a {{domxref("DOMString")}}, reflecting the dir global attribute, representing the directionality of the element. Possible values are "ltr", "rtl", and "auto".
-
{{domxref("HTMLElement.draggable")}}
-
Is a {{jsxref("Boolean")}} indicating if the element can be dragged.
-
{{domxref("HTMLElement.dropzone")}} {{readonlyInline}}
-
Returns a {{domxref("DOMSettableTokenList")}} reflecting the dropzone global attribute and describing the behavior of the element regarding a drop operation.
-
{{domxref("HTMLElement.hidden")}}
-
Is a {{jsxref("Boolean")}} indicating if the element is hidden or not.
-
{{domxref("HTMLElement.itemScope")}} {{experimental_inline}}
-
Is a {{jsxref("Boolean")}} representing the item scope.
-
{{domxref("HTMLElement.itemType")}} {{readonlyInline}}{{experimental_inline}}
-
Returns a {{domxref("DOMSettableTokenList")}}…
-
{{domxref("HTMLElement.itemId")}} {{experimental_inline}}
-
Is a {{domxref("DOMString")}} representing the item ID.
-
{{domxref("HTMLElement.itemRef")}} {{readonlyInline}}{{experimental_inline}}
-
Returns a {{domxref("DOMSettableTokenList")}}…
-
{{domxref("HTMLElement.itemProp")}} {{readonlyInline}}{{experimental_inline}}
-
Returns a {{domxref("DOMSettableTokenList")}}…
-
{{domxref("HTMLElement.itemValue")}} {{experimental_inline}}
-
Returns a {{jsxref("Object")}} representing the item value.
-
{{domxref("HTMLElement.lang")}}
-
Is a {{domxref("DOMString")}} representing the language of an element's attributes, text, and element contents.
-
{{domxref("HTMLElement.noModule")}}
-
Is a {{jsxref("Boolean")}} indicating wether an import script can be executed in user agents that support module scripts.
-
{{domxref("HTMLElement.offsetHeight")}} {{readonlyInline}}{{experimental_inline}}
-
Returns a double containing the height of an element, relative to the layout.
-
{{domxref("HTMLElement.offsetLeft")}}{{readonlyInline}}{{experimental_inline}}
-
Returns a double, the distance from this element's left border to its offsetParent's left border.
-
{{domxref("HTMLElement.offsetParent")}}{{readonlyInline}}{{experimental_inline}}
-
Returns a {{domxref("Element")}} that is the element from which all offset calculations are currently computed.
-
{{domxref("HTMLElement.offsetTop")}}{{readonlyInline}}{{experimental_inline}}
-
Returns a double, the distance from this element's top border to its offsetParent's top border.
-
{{domxref("HTMLElement.offsetWidth")}}{{readonlyInline}}{{experimental_inline}}
-
Returns a double containing the width of an element, relative to the layout.
-
{{domxref("HTMLElement.properties")}} {{readonlyInline}}{{experimental_inline}}
-
Returns a {{domxref("HTMLPropertiesCollection")}}…
-
{{domxref("HTMLElement.spellcheck")}}{{ gecko_minversion_inline("1.9")}}
-
Is a {{jsxref("Boolean")}} that controls spell-checking. It is present on all HTML elements, though it doesn't have an effect on all of them.
-
{{domxref("HTMLElement.style")}}
-
Is a {{domxref("CSSStyleDeclaration")}}, an object representing the declarations of an element's style attributes.
-
{{domxref("HTMLElement.tabIndex")}}
-
Is a long representing the position of the element in the tabbing order.
-
{{domxref("HTMLElement.title")}}
-
Is a {{domxref("DOMString")}} containing the text that appears in a popup box when mouse is over the element.
-
{{domxref("HTMLElement.translate")}} {{experimental_inline}}
-
Is a {{jsxref("Boolean")}} representing the translation.
-
- -

Event handlers

- -

Most event handler properties, of the form onXYZ, are defined on the {{domxref("GlobalEventHandlers")}} or {{domxref("TouchEventHandlers")}} interfaces and implemented by HTMLElement. In addition, the following handlers are specific to HTMLElement.

- -
-
{{ domxref("HTMLElement.oncopy") }}  {{ non-standard_inline() }}
-
Returns the event handling code for the copy event ({{bug("280959")}}).
-
{{ domxref("HTMLElement.oncut") }}  {{ non-standard_inline() }}
-
Returns the event handling code for the cut event ({{bug("280959")}}).
-
{{ domxref("HTMLElement.onpaste") }} {{ non-standard_inline() }}
-
Returns the event handling code for the paste event ({{bug("280959")}}).
-
{{domxref("TouchEventHandlers.ontouchstart")}} {{non-standard_inline}}
-
Returns the event handling code for the {{event("touchstart")}} event.
-
{{domxref("TouchEventHandlers.ontouchend")}} {{non-standard_inline}}
-
Returns the event handling code for the {{event("touchend")}} event.
-
{{domxref("TouchEventHandlers.ontouchmove")}} {{non-standard_inline}}
-
Returns the event handling code for the {{event("touchmove")}} event.
-
{{domxref("TouchEventHandlers.ontouchenter")}} {{non-standard_inline}}
-
Returns the event handling code for the {{event("touchenter")}} event.
-
{{domxref("TouchEventHandlers.ontouchleave")}} {{non-standard_inline}}
-
Returns the event handling code for the {{event("touchleave")}} event.
-
{{domxref("TouchEventHandlers.ontouchcancel")}} {{non-standard_inline}}
-
Returns the event handling code for the {{event("touchcancel")}} event.
-
- -

Methods

- -

Inherits methods from its parent, {{domxref("Element")}}.

- -
-
{{domxref("HTMLElement.blur()")}}
-
Removes keyboard focus from the currently focused element.
-
{{domxref("HTMLElement.click()")}}
-
Sends a mouse click event to the element.
-
{{domxref("HTMLElement.focus()")}}
-
Makes the element the current keyboard focus.
-
{{domxref("HTMLElement.forceSpellCheck()")}} {{experimental_inline}}
-
Runs the spell checker on the element's contents.
-
- -

Specifications

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
SpecificationStatusComment
{{SpecName('CSSOM View', '#extensions-to-the-htmlelement-interface', 'HTMLElement')}}{{Spec2('CSSOM View')}}Added the following properties: offsetParent, offsetTop, offsetLeft, offsetWidth, and offsetHeight.
{{SpecName('HTML WHATWG', 'elements.html#htmlelement', 'HTMLElement')}}{{Spec2('HTML WHATWG')}}Added the following properties: translate, itemScope, itemType, itemId, itemRef, itemProp, properties, and itemValue.
- Added the following method: forceSpellcheck().
- Moved the onXYZ attributes to the {{domxref("GlobalEventHandlers")}} interface and added an inheritance from it.
{{SpecName('HTML5 W3C', 'dom.html#htmlelement', 'HTMLElement')}}{{Spec2('HTML5 W3C')}}Added the following properties: dataset, hidden, tabindex, accessKey, accessKeyLabel, draggable, dropzone, contentEditable, isContentEditable, contextMenu, spellcheck, commandType, commandLabel, commandIcon, commandHidden, commandDisabled, commandChecked, style, and all the onXYZ properties.
- Moved the id and className properties to the {{domxref("Element")}} interface.
{{SpecName('DOM2 HTML', 'html.html#ID-011100101', 'HTMLElement')}}{{Spec2('DOM2 HTML')}}No change from {{SpecName('DOM2 HTML')}}
{{SpecName('DOM1', 'level-one-html.html#ID-011100101', 'HTMLElement')}}{{Spec2('DOM1')}}Initial definition.
- -

Browser compatibility

- -

{{CompatibilityTable}}

- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FeatureFirefox (Gecko)ChromeEdgeInternet ExplorerOperaSafari
Basic support{{CompatGeckoDesktop("1.0")}}{{CompatUnknown}}{{CompatVersionUnknown}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}
{{domxref("HTMLElement.accessKey", "accessKey")}}{{CompatGeckoDesktop("5.0")}}{{CompatChrome(17)}}{{CompatVersionUnknown}}{{CompatUnknown}}{{CompatUnknown}}6.0
{{domxref("HTMLElement.accessKeyLabel", "accessKeyLabel")}}{{CompatGeckoDesktop("8.0")}}{{CompatUnknown}}{{CompatNo}}{{CompatUnknown}}{{CompatUnknown}}{{CompatNo}}{{WebkitBug(72715)}}
{{domxref("HTMLElement.blur()", "blur()")}}{{CompatGeckoDesktop("5.0")}}{{CompatUnknown}}{{CompatVersionUnknown}}9{{CompatUnknown}}{{CompatUnknown}}
{{domxref("HTMLElement.click()", "click()")}}{{CompatGeckoDesktop("5.0")}}{{CompatChrome(9)}}{{CompatVersionUnknown}}9{{CompatUnknown}}6.0
{{domxref("HTMLElement.dataset", "dataset")}}{{CompatGeckoDesktop("6.0")}}{{CompatChrome(8)}}{{CompatVersionUnknown}}1111.105.1
{{domxref("HTMLElement.focus()", "focus()")}}{{CompatGeckoDesktop("5.0")}}{{CompatUnknown}}{{CompatVersionUnknown}}9{{CompatUnknown}}{{CompatUnknown}}
{{domxref("HTMLElement.contentEditable", "contentEditable")}}{{CompatGeckoDesktop("1.9")}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}5.59{{CompatVersionUnknown}}
{{domxref("HTMLElement.spellcheck", "spellcheck")}}{{CompatGeckoDesktop("1.8.1")}}{{CompatUnknown}}{{CompatVersionUnknown}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}
{{domxref("HTMLElement.style", "style")}}{{CompatVersionUnknown}} (returns a {{domxref("CSS2Properties")}}, rather than a {{domxref("CSSStyleDeclaration")}}){{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
{{domxref("HTMLElement.forceSpellCheck", "forceSpellCheck()")}} {{experimental_inline}}{{CompatNo}}{{CompatNo}}{{CompatNo}}{{CompatNo}}{{CompatNo}}{{CompatNo}}
{{domxref("HTMLElement.draggable", "draggable")}}{{CompatVersionUnknown}}{{CompatUnknown}}{{CompatVersionUnknown}}{{CompatUnknown}}12.0{{CompatUnknown}}
{{domxref("HTMLElement.dropzone", "dropzone")}}{{CompatNo}}{{CompatNo}}{{CompatNo}}{{CompatNo}}12.0{{CompatNo}}
{{domxref("HTMLElement.offsetLeft", "offsetLeft")}}, {{domxref("HTMLElement.offsetTop", "offsetTop")}}, {{domxref("HTMLElement.offsetParent", "offsetParent")}}, {{domxref("HTMLElement.offsetHeight", "offsetHeight")}} and {{domxref("HTMLElement.offsetWidth", "offsetWidth")}} {{experimental_inline}}{{CompatVersionUnknown}}{{CompatUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatUnknown}}{{CompatUnknown}}
{{domxref("HTMLElement.onModule")}}{{CompatUnknown}}{{CompatChrome(60)}}{{CompatUnknown}}{{CompatUnknown}}{{CompatOpera(47)}}{{CompatUnknown}}
{{domxref("HTMLElement.translate", "translate")}} {{experimental_inline}}{{CompatNo}}{{CompatNo}}{{CompatNo}}{{CompatNo}}{{CompatNo}}{{CompatNo}}
{{domxref("HTMLElement.itemScope", "itemScope")}}, {{domxref("HTMLElement.itemType", "itemType")}}, {{domxref("HTMLElement.itemRef", "itemRef")}}, {{domxref("HTMLElement.itemId", "itemId")}}, {{domxref("HTMLElement.itemProp", "itemProp")}}, and {{domxref("HTMLElement.itemValue", "itemValue")}} {{experimental_inline}}{{CompatGeckoDesktop("6.0")}}{{CompatNo}}{{CompatNo}}{{CompatNo}}11.60
- (Removed in Opera 15)
{{CompatNo}}
{{domxref("HTMLElement.properties", "properties")}} {{experimental_inline}}{{CompatVersionUnknown}}{{CompatUnknown}}{{CompatNo}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}
{{domxref("HTMLElement.ontouchstart")}}, {{domxref("HTMLElement.ontouchend")}}, {{domxref("HTMLElement.ontouchmove")}}, {{domxref("HTMLElement.ontouchenter")}}, {{domxref("HTMLElement.ontouchleave")}}, and {{domxref("HTMLElement.ontouchcancel")}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatNo}}{{CompatNo}}{{CompatUnknown}}{{CompatVersionUnknown}}
{{domxref("HTMLElement.oncopy")}}, {{domxref("HTMLElement.oncut")}}, and {{domxref("HTMLElement.onpaste")}} {{Non-standard_inline}}{{CompatGeckoDesktop("1.9")}}{{CompatUnknown}}{{CompatVersionUnknown}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FeatureFirefox Mobile (Gecko)Android WebviewChrome for AndroidEdgeIE MobileOpera MobileSafari Mobile
Basic support -

{{CompatGeckoMobile("1.0")}}

-
{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}
{{domxref("HTMLElement.accessKey", "accessKey")}}{{CompatGeckoMobile("5.0")}}{{CompatUnknown}}{{CompatUnknown}}{{CompatVersionUnknown}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}
{{domxref("HTMLElement.accessKeyLabel", "accessKeyLabel")}}{{CompatGeckoMobile("8.0")}}{{CompatUnknown}}{{CompatUnknown}}{{CompatNo}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}
{{domxref("HTMLElement.blur()", "blur()")}}{{CompatGeckoMobile("5.0")}}{{CompatUnknown}}{{CompatUnknown}}{{CompatVersionUnknown}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}
{{domxref("HTMLElement.click()", "click()")}}{{CompatGeckoMobile("5.0")}}{{CompatUnknown}}{{CompatUnknown}}{{CompatVersionUnknown}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}
{{domxref("HTMLElement.dataset", "dataset")}}{{CompatGeckoMobile("6.0")}}{{CompatUnknown}}{{CompatUnknown}}{{CompatVersionUnknown}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}
{{domxref("HTMLElement.focus()", "focus()")}}{{CompatGeckoMobile("5.0")}}{{CompatUnknown}}{{CompatUnknown}}{{CompatVersionUnknown}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}
{{domxref("HTMLElement.onModule", "onModule()")}}{{CompatUnknown}}{{CompatChrome(60)}}{{CompatChrome(60)}}{{CompatUnknown}}{{CompatUnknown}}{{CompatOperaMobile(47)}}{{CompatUnknown}}
{{domxref("HTMLElement.oncopy")}}, {{domxref("HTMLElement.oncut")}}, and {{domxref("HTMLElement.onpaste")}} {{Non-standard_inline}}{{CompatGeckoMobile("1.9")}}{{CompatUnknown}}{{CompatUnknown}}{{CompatVersionUnknown}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}
-
- -

See also

- - diff --git a/files/uk/web/api/htmlelement/offsettop/index.html b/files/uk/web/api/htmlelement/offsettop/index.html deleted file mode 100644 index 9bafdc485c..0000000000 --- a/files/uk/web/api/htmlelement/offsettop/index.html +++ /dev/null @@ -1,60 +0,0 @@ ---- -title: HTMLElement.offsetTop -slug: Web/API/HTMLElement/offsetTop -translation_of: Web/API/HTMLElement/offsetTop ---- -
-
{{ APIRef("HTML DOM") }}
- -
Властивість лише для зчитування HTMLElement.offsetTop повертає відстань від поточного елемента відносно верху {{domxref("HTMLelement.offsetParent","offsetParent")}} .
-
- -

Синтакс

- -
topPos = element.offsetTop;
-
- -

Параметри

- - - -

Приклад

- -
var d = document.getElementById("div1");
-var topPos = d.offsetTop;
-
-if (topPos > 10) {
-  // object is offset more
-  // than 10 pixels from its parent
-}
- -

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

- - - - - - - - - - - - - - - - -
СпецифіуаціяСтатусКоментар
{{SpecName('CSSOM View', '#dom-htmlelement-offsettop', 'offsetTop')}}{{Spec2('CSSOM View')}} 
- -

Браузерна сумісність

- - - -

{{Compat("api.HTMLElement.offsetTop")}}

- -

In compliance with the specification, this property will return null on Webkit if the element is hidden (the style.display of this element or any ancestor is "none") or if the style.position of the element itself is set to "fixed".

- -

This property will return null on Internet Explorer (9) if the style.position of the element itself is set to "fixed". (Having display:none does not affect this browser.)

diff --git a/files/uk/web/api/htmlformelement/index.html b/files/uk/web/api/htmlformelement/index.html deleted file mode 100644 index 537c56b222..0000000000 --- a/files/uk/web/api/htmlformelement/index.html +++ /dev/null @@ -1,245 +0,0 @@ ---- -title: HTMLFormElement -slug: Web/API/HTMLFormElement -tags: - - API - - Form Element - - Forms - - HTML DOM - - HTML forms - - HTMLFormElement - - Interface - - NeedsTranslation - - Reference - - TopicStub -translation_of: Web/API/HTMLFormElement ---- -
{{APIRef("HTML DOM")}}
- -

The HTMLFormElement interface represents a {{HTMLElement("form")}} element in the DOM; it allows access to and in some cases modification of aspects of the form, as well as access to its component elements.

- -

{{InheritanceDiagram(600,120)}}

- -

Properties

- -

This interface also inherits properties from its parent, {{domxref("HTMLElement")}}.

- -
-
{{domxref("HTMLFormElement.elements")}} {{ReadOnlyInline}}
-
A {{domxref("HTMLFormControlsCollection")}} holding all form controls belonging to this form element.
-
{{domxref("HTMLFormElement.length")}}{{ReadOnlyInline}}
-
A long reflecting  the number of controls in the form.
-
{{domxref("HTMLFormElement.name")}}
-
A {{domxref("DOMString")}} reflecting the value of the form's {{ htmlattrxref("name", "form") }} HTML attribute, containing the name of the form.
-
{{domxref("HTMLFormElement.method")}}
-
A {{domxref("DOMString")}} reflecting the value of the form's {{ htmlattrxref("method", "form") }} HTML attribute, indicating the HTTP method used to submit the form. Only specified values can be set.
-
{{domxref("HTMLFormElement.target")}}
-
A {{domxref("DOMString")}} reflecting the value of the form's {{ htmlattrxref("target", "form") }} HTML attribute, indicating where to display the results received from submitting the form.
-
{{domxref("HTMLFormElement.action")}}
-
A {{domxref("DOMString")}} reflecting the value of the form's {{ htmlattrxref("action", "form") }} HTML attribute, containing the URI of a program that processes the information submitted by the form.
-
{{domxref("HTMLFormElement.encoding")}} or {{domxref("HTMLFormElement.enctype")}}
-
A {{domxref("DOMString")}} reflecting the value of the form's {{ htmlattrxref("enctype", "form") }} HTML attribute, indicating the type of content that is used to transmit the form to the server. Only specified values can be set. The two properties are synonyms.
-
{{domxref("HTMLFormElement.acceptCharset")}}
-
A {{domxref("DOMString")}} reflecting the value of the form's {{ htmlattrxref("accept-charset", "form") }} HTML attribute, representing the character encoding that the server accepts.
-
{{domxref("HTMLFormElement.autocomplete")}}
-
A {{domxref("DOMString")}} reflecting the value of the form's {{ htmlattrxref("autocomplete", "form") }} HTML attribute, indicating whether the controls in this form can have their values automatically populated by the browser.
-
{{domxref("HTMLFormElement.noValidate")}}
-
A {{jsxref("Boolean")}} reflecting the value of the form's  {{ htmlattrxref("novalidate", "form") }} HTML attribute, indicating whether the form should not be validated.
-
- -

Named inputs are added to their owner form instance as properties, and can overwrite native properties if they share the same name (eg a form with an input named action will have its action property return that input instead of the form's {{ htmlattrxref("action", "form") }} HTML attribute).

- -

Methods

- -

This interface also inherits methods from its parent, {{domxref("HTMLElement")}}.

- -
-
{{domxref("HTMLFormElement.checkValidity", "checkValidity()")}}
-
Returns true if the element's child controls are subject to constraint validation and satisfy those contraints; returns false if some controls do not satisfy their constraints. Fires an event named {{event("invalid")}} at any control that does not satisfy its constraints; such controls are considered invalid if the event is not canceled. It is up to the programmer to decide how to respond to false.
-
{{domxref("HTMLFormElement.reportValidity", "reportValidity()")}}
-
Returns true if the element's child controls satisfy their validation constraints. When false is returned, cancelable {{Event("invalid")}} events are fired for each invalid child and validation problems are reported to the user.
-
{{domxref("HTMLFormElement.requestSubmit", "requestSubmit()")}}
-
Requests that the form be submitted using the specified submit button and its corresponding configuration.
-
{{domxref("HTMLFormElement.reset", "reset()")}}
-
Resets the form to its initial state.
-
{{domxref("HTMLFormElement.submit", "submit()")}}
-
Submits the form to the server.
-
- -

Deprecated methods

- -
-
{{domxref("HTMLFormElement.requestAutocomplete()")}} {{deprecated_inline}}
-
Triggers a native browser interface to assist the user in completing the fields which have an autofill field name value that is not off or on. The form will receive an event once the user has finished with the interface, the event will either be {{event("autocomplete")}} when the fields have been filled or {{event("autocompleteerror")}} when there was a problem.
-
- -

Events

- -

Listen to these events using addEventListener() or by assigning an event listener to the oneventname property of this interface.

- -
-
formdata
-
The formdata event fires after the entry list representing the form's data is constructed.
- Also available via the onformdata property.
-
reset
-
The reset event fires when a form is reset.
- Also available via the onreset property.
-
submit
-
The submit event fires when a form is submitted.
- Also available via the onsubmit property.
-
- -

Usage notes

- -

Obtaining a form element object

- -

To obtain an HTMLFormElement object, you can use a CSS selector with {{domxref("ParentNode.querySelector", "querySelector()")}}, or you can get a list of all of the forms in the document using its {{domxref("Document.forms", "forms")}} property.

- -

{{domxref("Document.forms")}} returns an array of HTMLFormElement objects listing each of the forms on the page. You can then use any of the following syntaxes to get an individual form:

- -
-
document.forms[index]
-
Returns the form at the specified index into the array of forms.
-
document.forms[id]
-
Returns the form whose ID is id.
-
document.forms[name]
-
Returns the form whose {{domxref("Element.name", "name")}} attribute's value is name.
-
- -

Accessing the form's elements

- -

You can access the list of the form's data-containing elements by examining the form's {{domxref("HTMLFormElement.elements", "elements")}} property. This returns an {{domxref("HTMLFormControlsCollection")}} listing all of the form's user data entry elements, both those which are descendants of the <form> and those which are made members of the form using their form attributes.

- -

You can also get the form's element by using its name attribute as a key of the form, but using elements is a better approach — it contains only the form's elements, and it cannot be mixed with other attributes of the form.

- -

Elements that are considered form controls

- -

The elements which are included by HTMLFormElement.elements and HTMLFormElement.length are:

- - - -

No other elements are included in the list returned by elements, which makes it an excellent way to get at the elements most important when processing forms.

- -

Examples

- -

Creating a new form element, modifying its attributes, then submitting it:

- -
var f = document.createElement("form");// Create a form
-document.body.appendChild(f);          // Add it to the document body
-f.action = "/cgi-bin/some.cgi";        // Add action and method attributes
-f.method = "POST";
-f.submit();                            // Call the form's submit method
-
- -

Extract information from a form element and set some of its attributes:

- -
<form name="formA" action="/cgi-bin/test" method="post">
- <p>Press "Info" for form details, or "Set" to change those details.</p>
- <p>
-  <button type="button" onclick="getFormInfo();">Info</button>
-  <button type="button" onclick="setFormInfo(this.form);">Set</button>
-  <button type="reset">Reset</button>
- </p>
-
- <textarea id="form-info" rows="15" cols="20"></textarea>
-</form>
-
-<script>
-  function getFormInfo(){
-    // Get a reference to the form via its name
-    var f = document.forms["formA"];
-    // The form properties we're interested in
-    var properties = [ 'elements', 'length', 'name', 'charset', 'action', 'acceptCharset', 'action', 'enctype', 'method', 'target' ];
-    // Iterate over the properties, turning them into a string that we can display to the user
-    var info = properties.map(function(property) { return property + ": " + f[property] }).join("\n");
-
-    // Set the form's <textarea> to display the form's properties
-    document.forms["formA"].elements['form-info'].value = info; // document.forms["formA"]['form-info'].value would also work
-  }
-
-  function setFormInfo(f){ // Argument should be a form element reference.
-    f.action = "a-different-url.cgi";
-    f.name   = "a-different-name";
-  }
-</script>
-
- -

Submit a form into a new window:

- -
<!doctype html>
-<html>
-<head>
-<meta charset="utf-8">
-<title>Example new-window form submission</title>
-</head>
-<body>
-
-<form action="test.php" target="_blank">
-  <p><label>First name: <input type="text" name="firstname"></label></p>
-  <p><label>Last name: <input type="text" name="lastname"></label></p>
-  <p><label><input type="password" name="pwd"></label></p>
-
-  <fieldset>
-   <legend>Pet preference</legend>
-    <p><label><input type="radio" name="pet" value="cat"> Cat</label></p>
-    <p><label><input type="radio" name="pet" value="dog"> Dog</label></p>
-  </fieldset>
-
-  <fieldset>
-    <legend>Owned vehicles</legend>
-
-    <p><label><input type="checkbox" name="vehicle" value="Bike">I have a bike</label></p>
-    <p><label><input type="checkbox" name="vehicle" value="Car">I have a car</label></p>
-  </fieldset>
-
-  <p><button>Submit</button></p>
-</form>
-
-</body>
-</html>
- -

Submitting forms and uploading files using XMLHttpRequest

- -

If you want to know how to serialize and submit a form using the {{domxref("XMLHttpRequest")}} API, please read this paragraph.

- -

Specifications

- - - - - - - - - - - - - - - - - - - -
SpecificationStatusComment
{{SpecName('HTML WHATWG', "#htmlformelement", "HTMLFormElement")}}{{Spec2('HTML WHATWG')}}The following method has been added: requestAutocomplete().
{{SpecName('HTML5 W3C', "sec-forms.html#htmlformelement", "HTMLFormElement")}}{{Spec2('HTML5 W3C')}}The elements properties returns an {{domxref("HTMLFormControlsCollection")}} instead of a raw {{domxref("HTMLCollection")}}. This is mainly a technical change. The following method has been added: checkValidity(). The following properties have been added: autocomplete, noValidate, and encoding.
- -

Browser compatibility

- - - -

{{Compat("api.HTMLFormElement")}}

- -

See also

- - diff --git a/files/uk/web/api/htmlformelement/reset/index.html b/files/uk/web/api/htmlformelement/reset/index.html deleted file mode 100644 index 9917055250..0000000000 --- a/files/uk/web/api/htmlformelement/reset/index.html +++ /dev/null @@ -1,70 +0,0 @@ ---- -title: HTMLFormElement.reset() -slug: Web/API/HTMLFormElement/reset -tags: - - скидання форми -translation_of: Web/API/HTMLFormElement/reset ---- -
{{APIRef("HTML DOM")}}
- -

Метод HTMLFormElement.reset() відновлює значення елемента форми за замовчуванням.  Цей метод робить те ж саме, що і натискання кнопки скидання форми. 

- -

Якщо елемент управління форми (наприклад, кнопка скидання) має ім'я або ідентифікатор скидання, він маскує метод скидання форми. Він не скидає інші атрибути input елемента, наприклад, disabled.

- -

Синтаксис

- -
HTMLFormElement.reset()
-
- -

Приклад

- -
<form>
-    <input type="text" size="350" value="Приймеш синю пігулку - і казці кінець. Ти прокинешся у своєму ліжку і повіриш, що це був сон. Приймеш червону пігулку - увійдеш до країни чудес. Я покажу тобі, чи глибока кроляча нора."/>
-    <input type="reset" value="Reset">
-    <button type="reset">Red</button>
-    <div id="test">Blue</div>
-</form>
-
-<script>
-  // тут ми будем зберігати елемент, при нажатті на який ініціювало reset подію
-  let resetElement = undefined;
-
-  // додамо прослуховувач click події до елементів, які дозволяють скинути значення форми
-  document.querySelectorAll("*[type=reset], #test").forEach(element => element.addEventListener("click", e => {
-    resetElement = e.target;
-  }));
-
-  // при активації клік події виклечемо .reset() на FORM елементі
-  document.querySelector("#test").addEventListener("click", e => e.target.parentNode.reset());
-
- // переконаємося в тому, що .reset() ініціює подію
- window.addEventListener("reset", e => {
-    console.log(e.type, " has been initiated by: ", resetElement.tagName);
-    resetElement = undefined;
-  })
-</script>
- -

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

- - - - - - - - - - - - - - - - -
СпецифікаціяСтатусКоментар
{{SpecName('HTML WHATWG', '#dom-form-reset', 'HTMLFormElement: reset')}}{{Spec2('HTML WHATWG')}}
- -

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

- - - -

{{Compat("api.HTMLFormElement.reset")}}

diff --git a/files/uk/web/api/htmlimageelement/image/index.html b/files/uk/web/api/htmlimageelement/image/index.html deleted file mode 100644 index 1477430aae..0000000000 --- a/files/uk/web/api/htmlimageelement/image/index.html +++ /dev/null @@ -1,117 +0,0 @@ ---- -title: Image() -slug: Web/API/HTMLImageElement/Image -tags: - - Constructor - - DOM - - HTML DOM - - HTMLImageElement - - Довідка -translation_of: Web/API/HTMLImageElement/Image ---- -
{{ APIRef("HTML DOM") }}
- -
Конструктор Image() створює новий примірник {{domxref("HTMLImageElement")}}. Наслідком є те саме, що й для {{domxref("Document.createElement()", "document.createElement('img')")}}.
- -

Синтаксис

- -
new Image(width, height)
- -

Параметри

- -
-
width {{optional_inline}}
-
Ширина зображення (визначає значення атрибута {{htmlattrxref("width", "img")}}).
-
height {{optional_inline}}
-
Висота зображення (визначає значення атрибута {{htmlattrxref("height", "img")}}).
-
- -

Приклади

- -

У наведеному прикладі створюється елемент <img> завбільшки 100x200, до нього завантажується якесь зображення та додається до тіла документа:

- -
var image = new Image(100, 200);
-image.onload = function() {
-  // Додати у DOM
-  document.body.appendChild(image);
-};
-image.src = '/assets/зразок.png';
- -

Того ж можна досягти оголошенням такого HTML-елемента просто всередині {{htmlelement("body")}}:

- -
<img width="100" height="200" src="/assets/зразок.png">
- -

Але перевагою створення <img> за допомогою конструктора Image() є можливість додати зображення у DOM лише після його завантаження (завдяки обробникові події load).

- -

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

- - - - - - - - - - - - - - -
СпецифікаціяСтатусКоментар
{{SpecName("HTML WHATWG", "embedded-content.html#dom-image", "Image()")}}{{spec2("HTML WHATWG")}} 
- -

Підтримка веб-переглядачами

- -
{{CompatibilityTable}}
- -
- - - - - - - - - - - - - - - - - - - -
FeatureChromeFirefox (Gecko)Internet ExplorerOperaSafari (WebKit)
Basic support{{compatversionunknown}}{{compatversionunknown}}{{compatversionunknown}}{{compatversionunknown}}{{compatversionunknown}}
-
- -
- - - - - - - - - - - - - - - - - - - - - - - -
FeatureAndroidAndroid WebviewFirefox Mobile (Gecko)IE PhoneOpera MobileSafari MobileChrome for Android
Basic support{{compatversionunknown}}{{compatversionunknown}}{{compatversionunknown}}{{compatversionunknown}}{{compatversionunknown}}{{compatversionunknown}}{{compatversionunknown}}
-
- -

 

diff --git a/files/uk/web/api/htmlimageelement/index.html b/files/uk/web/api/htmlimageelement/index.html deleted file mode 100644 index 0f227e69f3..0000000000 --- a/files/uk/web/api/htmlimageelement/index.html +++ /dev/null @@ -1,401 +0,0 @@ ---- -title: HTMLImageElement -slug: Web/API/HTMLImageElement -tags: - - API - - HTML DOM - - HTMLImageElement - - Interface - - NeedsTranslation - - Reference - - TopicStub - - img -translation_of: Web/API/HTMLImageElement ---- -
{{APIRef("HTML DOM")}}
- -

The HTMLImageElement interface provides special properties and methods  for manipulating the layout and presentation of {{HTMLElement("img")}} elements.

- -

Properties

- -

Inherits properties from its parent, {{domxref("HTMLElement")}}.

- -
-
{{domxref("HTMLImageElement.align")}} {{obsolete_inline}}
-
Is a {{domxref("DOMString")}} indicating the alignment of the image with respect to the surrounding context.
-
{{domxref("HTMLImageElement.alt")}}
-
Is a {{domxref("DOMString")}} that reflects the {{htmlattrxref("alt", "img")}} HTML attribute,  thus indicating fallback context for the image.
-
{{domxref("HTMLImageElement.border")}} {{obsolete_inline}}
-
Is a {{domxref("DOMString")}} that is responsible for the width of the border surrounding the image. This is now deprecated and the CSS {{cssxref("border")}} property should be used instead.
-
{{domxref("HTMLImageElement.complete")}} {{readonlyInline}}
-
Returns a {{domxref("Boolean")}} that is true if the browser has finished fetching the image, whether successful or not. It also shows true, if the image has no {{domxref("HTMLImageElement.src", "src")}} value.
-
{{domxref("HTMLImageElement.crossOrigin")}}
-
Is a {{domxref("DOMString")}} representing the CORS setting for this image element. See CORS settings attributes for further details.
-
{{domxref("HTMLImageElement.currentSrc")}} {{readonlyInline}}{{experimental_inline}}
-
Returns a {{domxref("DOMString")}} representing the URL to the currently displayed image (which may change, for example in response to media queries).
-
{{domxref("HTMLImageElement.height")}}
-
Is a unsigned long that reflects the {{htmlattrxref("height", "img")}} HTML attribute, indicating the rendered height of the image in CSS pixels.
-
{{domxref("HTMLImageElement.hspace")}} {{obsolete_inline}}
-
Is a long representing the space on either side of the image.
-
{{domxref("HTMLImageElement.isMap")}}
-
Is a {{domxref("Boolean")}} that reflects the {{htmlattrxref("ismap", "img")}} HTML attribute, indicating that the image is part of a server-side image map.
-
{{domxref("HTMLImageElement.longDesc")}} {{obsolete_inline}}
-
Is a {{domxref("DOMString")}} representing the URI of a long description of the image.
-
{{domxref("HTMLImageElement.lowSrc")}} {{obsolete_inline}}
-
Is a {{domxref("DOMString")}} that refers to a low-quality (but faster to load) copy of the image.
-
{{domxref("HTMLImageElement.name")}} {{obsolete_inline}}
-
Is a {{domxref("DOMString")}} representing the name of the element.
-
{{domxref("HTMLImageElement.naturalHeight")}} {{readonlyInline}}
-
Returns a unsigned long representing the intrinsic height of the image in CSS pixels, if it is available; else, it shows 0.
-
{{domxref("HTMLImageElement.naturalWidth")}} {{readonlyInline}}
-
Returns a unsigned long representing the intrinsic width of the image in CSS pixels, if it is available; otherwise, it will show 0.
-
{{domxref("HTMLImageElement.referrerPolicy")}} {{experimental_inline}}
-
Is a {{domxref("DOMString")}} that reflects the {{htmlattrxref("referrerpolicy", "img")}} HTML attribute indicating which referrer to use in order to fetch the image.
-
{{domxref("HTMLImageElement.src")}}
-
Is a {{domxref("DOMString")}} that reflects the {{htmlattrxref("src", "img")}} HTML attribute, containing the full URL of the image including base URI.
-
{{domxref("HTMLImageElement.sizes")}} {{experimental_inline}}
-
Is a {{domxref("DOMString")}} reflecting the {{htmlattrxref("sizes", "img")}} HTML attribute.
-
{{domxref("HTMLImageElement.srcset")}} {{experimental_inline}}
-
Is a {{domxref("DOMString")}} reflecting the {{htmlattrxref("srcset", "img")}} HTML attribute, containing a list of candidate images, separated by a comma (',', U+002C COMMA). A candidate image is a URL followed by a 'w' with the width of the images, or an 'x' followed by the pixel density.
-
{{domxref("HTMLImageElement.useMap")}}
-
Is a {{domxref("DOMString")}} that reflects the {{htmlattrxref("usemap", "img")}} HTML attribute, containing a partial URL of a map element.
-
{{domxref("HTMLImageElement.vspace")}} {{obsolete_inline}}
-
Is a long representing the space above and below the image.
-
{{domxref("HTMLImageElement.width")}}
-
Is a unsigned long that reflects the {{htmlattrxref("width", "img")}} HTML attribute, indicating the rendered width of the image in CSS pixels.
-
{{domxref("HTMLImageElement.x")}} {{readonlyInline}}{{experimental_inline}}
-
Returns a long representing the horizontal offset from the nearest layer. This property mimics an old Netscape 4 behavior.
-
{{domxref("HTMLImageElement.y")}} {{readonlyInline}} {{experimental_inline}}
-
Returns a long representing the vertical offset from the nearest layer. This property is also similar to behavior of an old Netscape 4.
-
- -

Methods

- -

Inherits properties from its parent, {{domxref("HTMLElement")}}.

- -
-
{{domxref("HTMLImageElement.Image()", "Image()")}}
-
The Image() constructor, taking two optional unsigned long, which are the width and the height of the resource, creates an instance of HTMLImageElement , not inserted in a DOM tree.
-
- -

Errors

- -

If an error occurs while trying to load or render the image, and an {{htmlattrxref("onerror")}} event handler has been configured to handle the {{event("error")}} event, that event handler will get called. This can happen in a number of situations, including:

- - - -

Example

- -
var img1 = new Image(); // HTML5 Constructor
-img1.src = 'image1.png';
-img1.alt = 'alt';
-document.body.appendChild(img1);
-
-var img2 = document.createElement('img'); // use DOM HTMLImageElement
-img2.src = 'image2.jpg';
-img2.alt = 'alt text';
-document.body.appendChild(img2);
-
-// using first image in the document
-alert(document.images[0].src);
-
- -

Specifications

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
SpecificationStatusComment
{{SpecName('Referrer Policy', '#referrer-policy-delivery-referrer-attribute', 'referrer attribute')}}{{Spec2('Referrer Policy')}}Added the referrerPolicy property.
{{SpecName("CSSOM View", "#excensions-to-the-htmlimageelement-interface", "Extensions to HTMLImageElement")}}{{Spec2('CSSOM View')}}Added the x and y properties.
{{SpecName('HTML WHATWG', "embedded-content.html#the-img-element", "HTMLImageElement")}}{{Spec2('HTML WHATWG')}}The following properties have been added: srcset, currentSrc and sizes.
{{SpecName('HTML5 W3C', "embedded-content-0.html#the-img-element", "HTMLImageElement")}}{{Spec2('HTML5 W3C')}}A constructor (with 2 optional parameters) has been added.
- The following properties are now obsolete: name, border, align, hspace, vspace, and longdesc.
- The following properties are now unsigned long, instead of long: height, and width.
- The following properties have been added: crossorigin, naturalWidth, naturalHeight, and complete.
{{SpecName('DOM2 HTML', 'html.html#ID-17701901', 'HTMLImgElement')}}{{Spec2('DOM2 HTML')}}The lowSrc property has been removed.
- The following properties are now long, instead of DOMString: height, width, hspace, and vspace.
{{SpecName('DOM1', 'level-one-html.html#ID-17701901', 'HTMLImgElement')}}{{Spec2('DOM1')}}Initial definition.
- -

Browser compatibility

- -
{{CompatibilityTable}}
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FeatureChromeEdgeFirefox (Gecko)Internet ExplorerOperaSafari (WebKit)
Basic support{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatGeckoDesktop(1.0)}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
lowSrc{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
naturalWidth, naturalHeight{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}9{{CompatVersionUnknown}}{{CompatVersionUnknown}}
crossorigin{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}9{{CompatVersionUnknown}}{{CompatVersionUnknown}}
complete{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}5[4]{{CompatVersionUnknown}}{{CompatVersionUnknown}}
srcset {{experimental_inline}}{{CompatChrome(34)}}{{CompatVersionUnknown}}{{CompatGeckoDesktop(32)}}[2]{{CompatNo}}21{{CompatSafari(7.1)}}
currentSrc {{experimental_inline}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatGeckoDesktop(32)}}[2]{{CompatNo}}{{CompatVersionUnknown}}{{CompatNo}}
sizes {{experimental_inline}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatGeckoDesktop(33)}}[3]{{CompatNo}}{{CompatVersionUnknown}}{{CompatNo}}
x and y{{CompatVersionUnknown}}{{CompatVersionUnknown}}14[1]{{CompatNo}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
referrerPolicy {{experimental_inline}}{{CompatNo}}{{CompatNo}}{{CompatGeckoDesktop(50)}}{{CompatNo}}{{CompatNo}}{{CompatNo}}
onerror event handler{{CompatVersionUnknown}}{{CompatUnknown}}{{CompatGeckoDesktop(51)}}{{CompatNo}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FeatureAndroidEdgeFirefox Mobile (Gecko)IE PhoneOpera MobileSafari Mobile
Basic support{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatGeckoMobile(1.0)}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
lowSrc{{CompatUnknown}}{{CompatVersionUnknown}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}
naturalWidth, naturalHeight{{CompatUnknown}}{{CompatVersionUnknown}}{{CompatUnknown}}9{{CompatUnknown}}{{CompatVersionUnknown}}
crossorigin{{CompatUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatUnknown}}{{CompatUnknown}}{{CompatVersionUnknown}}
complete{{CompatUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatUnknown}}{{CompatUnknown}}{{CompatVersionUnknown}}
srcset {{experimental_inline}}{{CompatNo}}{{CompatVersionUnknown}}{{CompatGeckoMobile(32)}}[2]{{CompatNo}}{{CompatNo}}iOS 8
currentSrc {{experimental_inline}}{{CompatNo}}{{CompatVersionUnknown}}{{CompatGeckoMobile(32)}}[2]{{CompatNo}}{{CompatNo}}{{CompatNo}}
sizes {{experimental_inline}}{{CompatNo}}{{CompatVersionUnknown}}{{CompatGeckoMobile(33)}}[3]{{CompatNo}}{{CompatNo}}{{CompatNo}}
x and y{{CompatVersionUnknown}}{{CompatVersionUnknown}}14[1]{{CompatNo}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
referrerPolicy {{experimental_inline}}{{CompatNo}}{{CompatNo}}{{CompatGeckoMobile(50)}}{{CompatNo}}{{CompatNo}}{{CompatNo}}
onerror event handler{{CompatNo}}{{CompatUnknown}}{{CompatGeckoMobile(51)}}{{CompatNo}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
-
- -

[1] Though, these x and y properties were removed in Gecko 7.0 {{geckoRelease("7.0")}} but later, they were restored in Gecko 14.0 {{geckoRelease("14.0")}} for compatibility reasons.

- -

[2] This feature is behind the dom.image.srcset.enabled preference, defaulting to false.

- -

[3] This feature is behind the dom.image.picture.enabled preference, defaulting to false.

- -

[4] IE reports false for broken images.

- -

See also

- - diff --git a/files/uk/web/api/htmlmediaelement/abort_event/index.html b/files/uk/web/api/htmlmediaelement/abort_event/index.html deleted file mode 100644 index d6141f3ed7..0000000000 --- a/files/uk/web/api/htmlmediaelement/abort_event/index.html +++ /dev/null @@ -1,69 +0,0 @@ ---- -title: abort -slug: Web/API/HTMLMediaElement/abort_event -translation_of: Web/API/HTMLMediaElement/abort_event -translation_of_original: Web/Events/abort -original_slug: Web/Events/abort ---- -

Подія abort спрацьовує коли завантаження ресурсу було перервано.

- -

Загальна інформація

- -
-
Специфікація
-
DOM L3
-
Interface
-
UIEvent if generated from a user interface, Event otherwise.
-
Bubbles
-
No
-
Cancelable
-
No
-
Target
-
Element
-
Default Action
-
None
-
- -

Властивості

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PropertyTypeDescription
target {{readonlyInline}}EventTargetThe event target (the topmost target in the DOM tree).
type {{readonlyInline}}DOMStringThe type of event.
bubbles {{readonlyInline}}BooleanWhether the event normally bubbles or not.
cancelable {{readonlyInline}}BooleanWhether the event is cancellable or not.
view {{readonlyInline}}WindowProxydocument.defaultView (window of the document)
detail {{readonlyInline}}long (float)0.
diff --git a/files/uk/web/api/index.html b/files/uk/web/api/index.html deleted file mode 100644 index 60714ca304..0000000000 --- a/files/uk/web/api/index.html +++ /dev/null @@ -1,26 +0,0 @@ ---- -title: Список Web API -slug: Web/API -translation_of: Web/API ---- -

Під час написання коду розробнику доступна велика кількість Web API (Application Programming Interface, інтерфейс програмування застосунків). Нижче наведено перелік усіх API та інтерфейсів, які ви можете використовувати під час розробки веб-застосунку чи сайту.

- -

Web API зазвичай використовуються JavaScript, хоча і не обмежені саме цією мовою програмування.

- -

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

- -

Нижче наведено список усіх доступних API.

- -
{{ListGroups}}
- -

Інтерфейси

- -

Нижче наведено список усіх доступних інтерфейсів.

- -
{{APIListAlpha}}
- -

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

- - diff --git a/files/uk/web/api/intersection_observer_api/index.html b/files/uk/web/api/intersection_observer_api/index.html deleted file mode 100644 index 49a9ce1d06..0000000000 --- a/files/uk/web/api/intersection_observer_api/index.html +++ /dev/null @@ -1,610 +0,0 @@ ---- -title: Intersection Observer API -slug: Web/API/Intersection_Observer_API -tags: - - API - - Clipping - - Intersection - - Intersection Observer API - - IntersectionObserver - - Overview - - Performance - - Reference - - Web - - Швидкодія -translation_of: Web/API/Intersection_Observer_API ---- -
{{DefaultAPISidebar("Intersection Observer API")}}
- -

Intersection Observer API дозволяє веб-застосункам асинхронно стежити за зміною перетину елемента з його батьком чи областю видимості документа {{Glossary("viewport")}}.

- -

Історично склалося так, що виявлення видимості окремого елемента чи видимості двох елементів по відношенню один до одного було непростою задачею. Варіанти вирішення цієї задачі були ненадійними і сповільнювали роботу браузера. На жаль, з "дорослішанням" вебу, необхідність у вирішенні цієї проблеми тільки зростала, з різних причин, таких як:

- - - -

Раніше реалізація виявлення пересічення елементів означала використання обробників подій і циклів, викликаючих методи типу {{domxref("Element.getBoundingClientRect()")}}, щоб зібрати необхідну інформацію про кожен зачеплений елемент. Оскільки весь цей код працює в основному потоці, виникають проблеми з продуктивністю.

- -

Розглянемо веб-сторінку з безкінечним скролом. На сторінці використовується бібліотека для керування періодично розміщуваною по всій сторінці рекламою, всюди анімована графіка, а також бібліотека для відображення спливаючих вікон. І всі ці речі використовують свої власні правила для визначення перетинів, і всі вони запущені в основному потоці. Автор сайту може навіть не підозрювати про цю проблему, а також може не знати, як працюють сторонні бібліотеки зсередини. В той же час користувач по ходу прокрутки сторінки стикається з тим, що робота сайта сповільнюється постійним спрацьовуванням виявлення перетинів, що в підсумку призводить до того, що користувач не задоволений браузером, сайтом і своїм комп'ютером.

- -

Intersection Observer API дає можливість зареєструвати callback-функцію, яка виконається при перетині спостережуваним елементом кордонів іншого елемента (чи області видимості документа {{Glossary("viewport")}}), або при зміні величини перетину на визначене значення. Таким чином, більше немає необхідності вираховувати перетин елементів в основному потоці, і браузер може оптимізовувати ці процеси на свій погляд.

- -

Observer API не дозволить дізнатися точне число пікселів чи визначати конкретні пікселі в перетині; проте, його використання покриває найбільш поширені випадки, наприклад "Якщо елементи перетинаються на N%, зроби це і це".

- -

Основні поняття і використання Intersection Observer API 

- -

Intersection Observer API дозволяє вказати функцію, яка буде викликана щоразу для елемента (target) при перетині його з областю видимості документа (по-замовчуванню) чи заданим елементом (root).

- -

Зазвичай, використовується відстеження перетину елементу з областю видимості (необхідно вказати  null в якості кореневого елементу).

- -

Чи використовуємо ми область видимості чи інший елемент в якості кореневого, API працює однаково, викликаючи задану вами функцію зворотнього виклику, щоразу, коли видимість цільового елементу змінюється так, що вона перетинає в потрібному ступені кореневий елемент.

- -

Ступінь перетину цільового і кореневого елементу задається в діапазоні від 0.0 до 1.0, де 1.0 це повний перетин цільовим елементом кордонів кореневого.

- -

Створення intersection observer

- -

Для початку з допомогою конструктору потрібно створити об'єкт-спостерігач, вказати для нього функцію для виклику і налаштування відстеження:

- -
let options = {
-  root: document.querySelector('#scrollArea'),
-  rootMargin: '0px',
-  threshold: 1.0
-}
-
-let observer = new IntersectionObserver(callback, options);
-
- -

Параметр threshold зі значенням 1.0 означає що функція буде викликана при 100% перетину об'єкта (за яким ми стежимо) з об'єктом root.

- -

Налаштування Intersection observer

- -

The options object passed into the {{domxref("IntersectionObserver.IntersectionObserver", "IntersectionObserver()")}} constructor let you control the circumstances under which the observer's callback is invoked. It has the following fields:

- -
-
root
-
Елемент який використовується в якості області перегляду для перевірки видимості цільового елементу. Повинен бути батьком цільового елементу. По замовчуванню використовується область видимості браузера якщо не визначений або має значення  null.
-
rootMargin
-
-

Відступи навколо root. Можуть мати значення як властивість css margin: 10px 20px 30px 40px" (top, right, bottom, left). Значення можна задавати у відсотках. По замовчуванню всі параметри встановлені в нулі.

-
-
threshold
-
Число чи масив чисел, який вказує, при якому відсотку видимості цільового елементу повинен спрацювати callback. Наприклад, в цьому випадку callback функція буде викликатися при появі в зоні видимості кожні 25% цільового елементу: [0, 0.25, 0.5, 0.75, 1]. Дефолтне значення 0 (як тільки хоча б один піксель стане видимим, то буде викликаний колбек). Значення 1.0 означає, що увесь елемент повністю має стати видимим перед тим, як буде викликано колбек.
-
- -

Цільовий елемент, який буде спостерігатися

- -

Після того, як ви створили спостерігача, вам потрібно дати йому цільовий елемент для перегляду:

- -
let target = document.querySelector('#listItem');
-observer.observe(target);
-
-// the callback we setup for the observer will be executed now for the first time
-// it waits until we assign a target to our observer (even if the target is currently not visible)
-
- -

Щоразу, коли ціль досягає порогового значення, вказаного для IntersectionObserver, викликається функція зворотнього виклику callback. Де callback отримує список об'єктів IntersectionObserverEntry і спостерігача:

- -
let callback = (entries, observer) => {
-  entries.forEach(entry => {
-    // Each entry describes an intersection change for one observed
-    // target element:
-    //   entry.boundingClientRect
-    //   entry.intersectionRatio
-    //   entry.intersectionRect
-    //   entry.isIntersecting
-    //   entry.rootBounds
-    //   entry.target
-    //   entry.time
-  });
-};
-
- -

Зверніть увагу, що функція зворотнього виклику запускається в головному потоці і повинна виконуватися якнайшвидше, тому якщо щось забирає багато часу, то використовуйте {{domxref("Window.requestIdleCallback()")}}.

- -

Також зверніть увагу, що якщо ви вказали опцію root, цільовий елемент повинен бути потомком кореневого елементу. 

- -

How intersection is calculated

- -

All areas considered by the Intersection Observer API are rectangles; elements which are irregularly shaped are considered as occupying the smallest rectangle which encloses all of the element's parts. Similarly, if the visible portion of an element is not rectangular, the element's intersection rectangle is construed to be the smallest rectangle that contains all the visible portions of the element.

- -

It's useful to understand a bit about how the various properties provided by {{domxref("IntersectionObserverEntry")}} describe an intersection.

- -

The intersection root and root margin

- -

Before we can track the intersection of an element with a container, we need to know what that container is. That container is the intersection root, or root element. This can be either a specific element in the document which is an ancestor of the element to be observed, or null to use the document's viewport as the container.

- -

The root intersection rectangle is the rectangle used to check against the target or targets. This rectangle is determined like this:

- - - -

The root intersection rectangle can be adjusted further by setting the root margin, rootMargin, when creating the {{domxref("IntersectionObserver")}}. The values in rootMargin define offsets added to each side of the intersection root's bounding box to create the final intersection root bounds (which are disclosed in {{domxref("IntersectionObserverEntry.rootBounds")}} when the callback is executed).

- -

Thresholds

- -

Rather than reporting every infinitesimal change in how much a target element is visible, the Intersection Observer API uses thresholds. When you create an observer, you can provide one or more numeric values representing percentages of the target element which are visible. Then, the API only reports changes to visibility which cross these thresholds.

- -

For example, if you want to be informed every time a target's visibility passes backward or forward through each 25% mark, you would specify the array [0, 0.25, 0.5, 0.75, 1] as the list of thresholds when creating the observer. You can tell which direction the visibility changed in (that is, whether the element became more visible or less visible) by checking the value of the {{domxref("IntersectionObserverEntry.isIntersecting", "isIntersecting")}} property on the {{domxref("IntersectionObserverEntry")}} passed into the callback function at the time of the visibility change. If isIntersecting is true, the target element has become at least as visible as the threshold that was passed. If it's false, the target is no longer as visible as the given threshold.

- -

To get a feeling for how thresholds work, try scrolling the box below around. Each colored box within it displays the percentage of itself that's visible in all four of its corners, so you can see these ratios change over time as you scroll the container. Each box has a different set of thresholds:

- - - - - -

{{EmbedLiveSample("Threshold_example", 500, 500)}}

- -

Clipping and the intersection rectangle

- -

The browser computes the final intersection rectangle as follows; this is all done for you, but it can be helpful to understand these steps in order to better grasp exactly when intersections will occur.

- -
    -
  1. The target element's bounding rectangle (that is, the smallest rectangle that fully encloses the bounding boxes of every component that makes up the element) is obtained by calling {{domxref("Element.getBoundingClientRect", "getBoundingClientRect()")}} on the target. This is the largest the intersection rectangle may be. The remaining steps will remove any portions that don't intersect.
  2. -
  3. Starting at the target's immediate parent block and moving outward, each containing block's clipping (if any) is applied to the intersection rectangle. A block's clipping is determined based on the intersection of the two blocks and the clipping mode (if any) specified by the {{cssxref("overflow")}} property. Setting overflow to anything but visible causes clipping to occur.
  4. -
  5. If one of the containing elements is the root of a nested browsing context (such as the document contained in an {{HTMLElement("iframe")}}, the intersection rectangle is clipped to the containing context's viewport, and recursion upward through the containers continues with the container's containing block. So if the top level of an <iframe> is reached, the intersection rectangle is clipped to the frame's viewport, then the frame's parent element is the next block recursed through toward the intersection root.
  6. -
  7. When recursion upward reaches the intersection root, the resulting rectangle is mapped to the intersection root's coordinate space.
  8. -
  9. The resulting rectangle is then updated by intersecting it with the root intersection rectangle.
  10. -
  11. This rectangle is, finally, mapped to the coordinate space of the target's {{domxref("document")}}.
  12. -
- -

Intersection change callbacks

- -

When the amount of a target element which is visible within the root element crosses one of the visibility thresholds, the {{domxref("IntersectionObserver")}} object's callback is executed. The callback receives as input an array of all of IntersectionObserverEntry objects, one for each threshold which was crossed, and a reference to the IntersectionObserver object itself.

- -

Each entry in the list of thresholds is an {{domxref("IntersectionObserverEntry")}} object describing one threshold that was crossed; that is, each entry describes how much of a given element is intersecting with the root element, whether or not the element is considered to be intersecting or not, and the direction in which the transition occurred.

- -

The code snippet below shows a callback which keeps a counter of how many times elements transition from not intersecting the root to intersecting by at least 75%.

- -
intersectionCallback(entries) => {
-  entries.forEach(entry => {
-    if (entry.isIntersecting) {
-      let elem = entry.target;
-
-      if (entry.intersectionRatio >= 0.75) {
-        intersectionCounter++;
-      }
-    }
-  });
-}
-
- -

Інтерфейси

- -
-
{{domxref("IntersectionObserver")}}
-
Основний інтерфейс для API Intersection Observer. Надає методи для створення і керування observer, який може спостерігати будь-яку кількість цільових елементів для однієї і тієї ж конфігурації перетину. Кожен observer може асинхронно спостерігати зміни в перетині між одним чи кількома цільовими елементами і спільним елементом-батьком чи з їх верхнім рівнем Document's viewport. Батько чи область перегляду згадується як root.
-
{{domxref("IntersectionObserverEntry")}}
-
-

Описує перетин між цільовим елементом і його кореневим контейнером в певний момент переходу. Об'єкти цього типу можуть бути отримані тільки двома способами: в якості вхідних даних для вашого зворотнього виклику IntersectionObserver чи шляхом виклику {{domxref("IntersectionObserver.takeRecords()")}}.

-
-
- -

A simple example

- -

This simple example causes a target element to change its color and transparency as it becomes more or less visible. At Timing element visibility with the Intersection Observer API, you can find a more extensive example showing how to time how long a set of elements (such as ads) are visible to the user and to react to that information by recording statistics or by updating elements..

- -

HTML

- -

The HTML for this example is very short, with a primary element which is the box that we'll be targeting (with the creative ID "box") and some contents within the box.

- -
<div id="box">
-  <div class="vertical">
-    Welcome to <strong>The Box!</strong>
-  </div>
-</div>
- -

CSS

- -

The CSS isn't terribly important for the purposes of this example; it lays out the element and establishes that the {{cssxref("background-color")}} and {{cssxref("border")}} attributes can participate in CSS transitions, which we'll use to affect the changes to the element as it becomes more or less obscured.

- -
#box {
-  background-color: rgba(40, 40, 190, 255);
-  border: 4px solid rgb(20, 20, 120);
-  transition: background-color 1s, border 1s;
-  width: 350px;
-  height: 350px;
-  display: flex;
-  align-items: center;
-  justify-content: center;
-  padding: 20px;
-}
-
-.vertical {
-  color: white;
-  font: 32px "Arial";
-}
-
-.extra {
-  width: 350px;
-  height: 350px;
-  margin-top: 10px;
-  border: 4px solid rgb(20, 20, 120);
-  text-align: center;
-  padding: 20px;
-}
- -

JavaScript

- -

Finally, let's take a look at the JavaScript code that uses the Intersection Observer API to make things happen.

- -

Setting up

- -

First, we need to prepare some variables and install the observer.

- -
const numSteps = 20.0;
-
-let boxElement;
-let prevRatio = 0.0;
-let increasingColor = "rgba(40, 40, 190, ratio)";
-let decreasingColor = "rgba(190, 40, 40, ratio)";
-
-// Set things up
-window.addEventListener("load", (event) => {
-  boxElement = document.querySelector("#box");
-
-  createObserver();
-}, false);
- -

The constants and variables we set up here are:

- -
-
numSteps
-
A constant which indicates how many thresholds we want to have between a visibility ratio of 0.0 and 1.0.
-
prevRatio
-
This variable will be used to record what the visibility ratio was the last time a threshold was crossed; this will let us figure out whether the target element is becoming more or less visible.
-
increasingColor
-
A string defining a color we'll apply to the target element when the visibility ratio is increasing. The word "ratio" in this string will be replaced with the target's current visibility ratio, so that the element not only changes color but also becomes increasingly opaque as it becomes less obscured.
-
decreasingColor
-
Similarly, this is a string defining a color we'll apply when the visibility ratio is decreasing.
-
- -

We call {{domxref("EventTarget.addEventListener", "Window.addEventListener()")}} to start listening for the {{event("load")}} event; once the page has finished loading, we get a reference to the element with the ID "box" using {{domxref("Document.querySelector", "querySelector()")}}, then call the createObserver() method we'll create in a moment to handle building and installing the intersection observer.

- -

Creating the intersection observer

- -

The createObserver() method is called once page load is complete to handle actually creating the new {{domxref("IntersectionObserver")}} and starting the process of observing the target element.

- -
function createObserver() {
-  let observer;
-
-  let options = {
-    root: null,
-    rootMargin: "0px",
-    threshold: buildThresholdList()
-  };
-
-  observer = new IntersectionObserver(handleIntersect, options);
-  observer.observe(boxElement);
-}
- -

This begins by setting up an options object containing the settings for the observer. We want to watch for changes in visibility of the target element relative to the document's viewport, so root is null. We need no margin, so the margin offset, rootMargin, is specified as "0px". This causes the observer to watch for changes in the intersection between the target element's bounds and those of the viewport, without any added (or subtracted) space.

- -

The list of visibility ratio thresholds, threshold, is constructed by the function buildThresholdList(). The threshold list is built programmatically in this example since there are a number of them and the number is intended to be adjustable.

- -

Once options is ready, we create the new observer, calling the {{domxref("IntersectionObserver.IntersectionObserver", "IntersectionObserver()")}} constructor, specifying a function to be called when intersection crosses one of our thresholds, handleIntersect(), and our set of options. We then call {{domxref("IntersectionObserver.observe", "observe()")}} on the returned observer, passing into it the desired target element.

- -

We could opt to monitor multiple elements for visibility intersection changes with respect to the viewport by calling observer.observe() for each of those elements, if we wanted to do so.

- -

Building the array of threshold ratios

- -

The buildThresholdList() function, which builds the list of thresholds, looks like this:

- -
function buildThresholdList() {
-  let thresholds = [];
-  let numSteps = 20;
-
-  for (let i=1.0; i<=numSteps; i++) {
-    let ratio = i/numSteps;
-    thresholds.push(ratio);
-  }
-
-  thresholds.push(0);
-  return thresholds;
-}
- -

This builds the array of thresholds—each of which is a ratio between 0.0 and 1.0, by pushing the value i/numSteps onto the thresholds array for each integer i between 1 and numSteps. It also pushes 0 to include that value. The result, given the default value of numSteps (20), is the following list of thresholds:

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#Ratio#Ratio
10.05110.55
20.1120.6
30.15130.65
40.2140.7
50.25150.75
60.3160.8
70.35170.85
80.4180.9
90.45190.95
100.5201.0
- -

We could, of course, hard-code the array of thresholds into our code, and often that's what you'll end up doing. But this example leaves room for adding configuration controls to adjust the granularity, for example.

- -

Handling intersection changes

- -

When the browser detects that the target element (in our case, the one with the ID "box") has been unveiled or obscured such that its visibility ratio crosses one of the thresholds in our list, it calls our handler function, handleIntersect():

- -
function handleIntersect(entries, observer) {
-  entries.forEach((entry) => {
-    if (entry.intersectionRatio > prevRatio) {
-      entry.target.style.backgroundColor = increasingColor.replace("ratio", entry.intersectionRatio);
-    } else {
-      entry.target.style.backgroundColor = decreasingColor.replace("ratio", entry.intersectionRatio);
-    }
-
-    prevRatio = entry.intersectionRatio;
-  });
-}
- -

For each {{domxref("IntersectionObserverEntry")}} in the list entries, we look to see if the entry's {{domxref("IntersectionObserverEntry.intersectionRatio", "intersectionRatio")}} is going up; if it is, we set the target's {{cssxref("background-color")}} to the string in increasingColor (remember, it's "rgba(40, 40, 190, ratio)"), replaces the word "ratio" with the entry's intersectionRatio. The result: not only does the color get changed, but the transparency of the target element changes, too; as the intersection ratio goes down, the background color's alpha value goes down with it, resulting in an element that's more transparent.

- -

Similarly, if the intersectionRatio is going down, we use the string decreasingColor and replace the word "ratio" in that with the intersectionRatio before setting the target element's background-color.

- -

Finally, in order to track whether the intersection ratio is going up or down, we remember the current ratio in the variable prevRatio.

- -

Result

- -

Below is the resulting content. Scroll this page up and down and notice how the appearance of the box changes as you do so.

- -

{{EmbedLiveSample('A_simple_example', 400, 400)}}

- -

There's an even more extensive example at Timing element visibility with the Intersection Observer API.

- -

Specifications

- - - - - - - - - - - - - - - - -
SpecificationStatusComment
{{SpecName('IntersectionObserver')}}{{Spec2('IntersectionObserver')}}
- -

Browser compatibility

- - - -

{{Compat("api.IntersectionObserver")}}

- -

See also

- - - -
-
-
diff --git a/files/uk/web/api/mediaquerylist/addlistener/index.html b/files/uk/web/api/mediaquerylist/addlistener/index.html deleted file mode 100644 index f908e9cf49..0000000000 --- a/files/uk/web/api/mediaquerylist/addlistener/index.html +++ /dev/null @@ -1,82 +0,0 @@ ---- -title: MediaQueryList.addListener() -slug: Web/API/MediaQueryList/addListener -tags: - - API - - MediaQueryList - - Довідка - - Медіа-запити - - метод -translation_of: Web/API/MediaQueryList/addListener ---- -
{{APIRef("CSSOM View")}}
- -

Метод addListener() інтерфейсу {{domxref("MediaQueryList")}} додає слухача до MediaQueryListener, який викличе вказану функцію щойно стан медіа-запиту зміниться.

- -

Цей метод є простим скороченням для {{domxref("EventTarget.addEventListener()")}} задля зворотньої сумісності. В старших веб-переглядачах доводиться використовувати addListener замість addEventListener, тоді як в нових MediaQueryList просто успадковує EventTarget.

- -

Синтаксис

- -
MediaQueryList.addListener(func)
- -

Параметри

- -
-
func
-
Функція-слухач, яку буде викликано щораз, як зміниться стан медіа-запиту. В первинній реалізації слухачем був об'єкт {{domxref("MediaQueryListListener")}}, а в новій вже використано звичайний механізм подій, тож слухач — це звичайна функція, а об'єкт події {{domxref("MediaQueryListEvent")}} успадковано від {{domxref("Event")}}.
-
- -

Вертає

- -

Нічого.

- -

Приклади

- -
var mql = window.matchMedia('(max-width: 600px)');
-
-function screenTest(e) {
-  if (e.matches) {
-    // Вікно є вужчим за 600 пікселів (або ж точно 600)
-    para.textContent = 'Маємо вузький екран, щонайбільше 600px';
-    document.body.style.backgroundColor = 'red';
-  } else {
-    // Вікно є ширшим за 600 пікселів
-    para.textContent = 'Маємо широкий екран — понад 600px завширшки';
-    document.body.style.backgroundColor = 'blue';
-  }
-}
-
-mql.addListener(screenTest);
- -

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

- - - - - - - - - - - - - - -
СпецифікаціяСтатусПримітка
{{SpecName("CSSOM View", "#dom-mediaquerylist-addlistener", "addListener")}}{{Spec2("CSSOM View")}}Початкова виознака
- -

Підтримка веб-переглядачами

- - - -

{{Compat("api.MediaQueryList.addListener")}}

- -

Див. також

- - diff --git a/files/uk/web/api/mediaquerylist/index.html b/files/uk/web/api/mediaquerylist/index.html deleted file mode 100644 index 7e22ce652e..0000000000 --- a/files/uk/web/api/mediaquerylist/index.html +++ /dev/null @@ -1,109 +0,0 @@ ---- -title: MediaQueryList -slug: Web/API/MediaQueryList -tags: - - API - - CSSOM View - - Interface - - MediaQueryList - - NeedsTranslation - - Reference - - TopicStub -translation_of: Web/API/MediaQueryList ---- -
{{APIRef("CSSOM View")}} {{SeeCompatTable}}
- -

A MediaQueryList object stores information on a media query applied to a document, and handles sending notifications to listeners when the media query state change (i.e. when the media query test starts or stops evaluating to true).

- -

This makes it possible to observe a document to detect when its media queries change, instead of polling the values periodically, and allows you to programmatically make changes to a document based on media query status.

- -

Properties

- -

The new version of the MediaQueryList interface inherits properties from its parent interface, {{domxref("EventTarget")}}.

- -
-
{{domxref("MediaQueryList.matches")}} {{readonlyInline}}
-
A {{domxref("Boolean")}} that returns true if the {{domxref("document")}} currently matches the media query list, or false if not.
-
{{domxref("MediaQueryList.media")}} {{readonlyInline}}
-
A {{domxref("DOMString")}} representing a serialized media query.
-
- -

Event handlers

- -
-
{{domxref("MediaQueryList.onchange")}}
-
An event handler property representing a function that is invoked when the {{event("change")}} event fires, i.e when the status of media query support changes. The event object is a {{domxref("MediaQueryListEvent")}} instance, which is recognised as a MediaListQuery instance in older browsers, for backwards compatibility purposes.
-
- -

Methods

- -

The new version of the MediaQueryList interface inherits methods from its parent interface, {{domxref("EventTarget")}}.

- -
-
{{domxref("MediaQueryList.addListener()")}}
-
Adds a listener to the MediaQueryListener that will run a custom callback function in response to the media query status changing. This is basically an alias for {{domxref("EventTarget.addEventListener()")}}, for backwards compatibility purposes.
-
{{domxref("MediaQueryList.removeListener()")}}
-
Removes a listener from the MediaQueryListener. This is basically an alias for {{domxref("EventTarget.removeEventListener()")}}, for backwards compatibility purposes.
-
- -
-
- -

Examples

- -

This simple example creates a MediaQueryList and then sets up a listener to detect when the media query status changes, running a custom function when it does to change the appearence of the page.

- -
var para = document.querySelector('p');
-
-var mql = window.matchMedia('(max-width: 600px)');
-
-function screenTest(e) {
-  if (e.matches) {
-    /* the viewport is 600 pixels wide or less */
-    para.textContent = 'This is a narrow screen — less than 600px wide.';
-    document.body.style.backgroundColor = 'red';
-  } else {
-    /* the viewport is more than than 600 pixels wide */
-    para.textContent = 'This is a wide screen — more than 600px wide.';
-    document.body.style.backgroundColor = 'blue';
-  }
-}
-
-mql.addListener(screenTest);
- -
-

Note: You can find this example on GitHub (see the source code, and also see it running live).

-
- -

Specifications

- - - - - - - - - - - - - - -
SpecificationStatusComment
{{SpecName("CSSOM View", "#the-mediaquerylist-interface", "MediaQueryList")}}{{Spec2("CSSOM View")}}Initial definition
- -

Browser compatibility

- - - -

{{Compat("api.MediaQueryList")}}

- -

See also

- - diff --git a/files/uk/web/api/network_information_api/index.html b/files/uk/web/api/network_information_api/index.html deleted file mode 100644 index 0afabb53ad..0000000000 --- a/files/uk/web/api/network_information_api/index.html +++ /dev/null @@ -1,87 +0,0 @@ ---- -title: Network Information API -slug: Web/API/Network_Information_API -translation_of: Web/API/Network_Information_API ---- -

{{DefaultAPISidebar("Network Information API")}}{{SeeCompatTable}}

- -

Network Information API надає інформацію про мережеве підключення в загальних термінах ('wifi', 'cellular' тощо). Ця інформація може бути використана для вибору якості і розміру вмісту на основі підключення користувача. Весь API складається з інтерфейсу {{domxref ("NetworkInformation")}} та однієї властивості до інтерфейсу {{domxref ("Navigator")}}: {{domxref ("Navigator.connection")}} .

- -

{{AvailableInWorkers}}

- -

Приклади

- -

Виявлення зміни підключення

- -

В цьому прикладі ми стежимо за змінами підключення користувача.

- -
var connection = navigator.connection || navigator.mozConnection || navigator.webkitConnection;
-var type = connection.effectiveType;
-
-function updateConnectionStatus() {
-  console.log("Тип підключення було змінено з " + type + " на " + connection.effectiveType);
-  type = connection.effectiveType;
-}
-
-connection.addEventListener('change', updateConnectionStatus);
-
- -

Попереднє завантаження великих ресурсів

- -

Об'єкт підключення {{domxref ("Navigator.connection")}} корисний для визначення необхідності попереднього завантажування ресурсів, що мають великий розмір. Перевірка типу підключення буде викликана незабаром після завантаження сторінки. Якщо з'єднання визначено як стільниковий зв’язок, то прапорець preloadVideo буде встановлено у значення false. Для простоти та наочності цей приклад перевіряє лише один тип підключення. На практиці використовується оператор switch або інший метод для перевірки всіх можливих значень {{domxref ("NetworkInformation.type")}}. Незалежно від значення type ви можете оцінити швидкість з'єднання через властивість {{domxref ("NetworkInformation.effectiveType")}}.

- -
let preloadVideo = true;
-var connection = navigator.connection || navigator.mozConnection || navigator.webkitConnection;
-if (connection) {
-  if (connection.effectiveType === 'slow-2g') {
-    preloadVideo = false;
-  }
-}
- -

Інтерфейси

- -
-
{{domxref("NetworkInformation")}}
-
Надає інформацію про з’єднання, яке пристрій використовує для зв’язку з мережею, та забезпечує сповіщення, якщо тип з’єднання змінюється. Інтерфейс NetworkInformation  не може бути створено як екземпляр. Натомість доступ до нього здійснюється через інтерфейс {{domxref ("Navigator")}}.
-
- -

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

- - - - - - - - - - - - - - - - -
СпецифікаціяСтатусКоментар
{{SpecName('Network Information', '', 'Network Information API')}}{{Spec2('Network Information')}}Initial specification
- -

Сумісність

- -

NetworkInformation

- - - -

{{Compat("api.NetworkInformation")}}

- - - - - -

{{Compat("api.Navigator.connection")}}

- -

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

- - diff --git a/files/uk/web/api/networkinformation/index.html b/files/uk/web/api/networkinformation/index.html deleted file mode 100644 index f1bff837d6..0000000000 --- a/files/uk/web/api/networkinformation/index.html +++ /dev/null @@ -1,88 +0,0 @@ ---- -title: NetworkInformation -slug: Web/API/NetworkInformation -translation_of: Web/API/NetworkInformation ---- -
{{APIRef("Network Information API")}}{{SeeCompatTable}}
- -

Інтерфейс NetworkInformation надає інформацію про з’єднання, яке пристрій використовує для зв’язку з мережею, та забезпечує засоби для сповіщень, якщо тип підключення змінюється. Інтерфейс NetworkInformation не може бути створено як екземпляр. Натомість доступ до нього здійснюється через властивість з'єднання інтерфейсу {{domxref("Navigator")}}.

- -

{{AvailableInWorkers}}

- -

Властивості

- -

Цей інтерфейс також успадковує властивості свого батьківського елементу, {{domxref("EventTarget")}}.

- -
-
-
    -
-
-
{{domxref("NetworkInformation.downlink")}} {{readonlyinline}}
-
Повертає приблизне значення ефективної пропускної здатності в мегабітах в секунду. Значення округлено до найближчого кратного до 25 кілобіт на секунду.
-
{{domxref("NetworkInformation.downlinkMax")}} {{readonlyinline}}
-
Повертає максимальну швидкість, в мегабітах в секунду (Mbps), для поточного з'єднання.
-
{{domxref("NetworkInformation.effectiveType")}} {{readonlyinline}}
-
Повертає діючий тип з'єднання в значенні 'slow-2g', '2g', '3g', або '4g'.
-
{{domxref("NetworkInformation.rtt")}} {{readonlyinline}}
-
Повертає оцінку часу зворотного зв'язку (RTT) поточного з'єднання, округлену до найближчого кратного до 25 мілісекунд.
-
{{domxref("NetworkInformation.saveData")}} {{readonlyinline}}
-
Повертає true, якщо користувач встановив параметр зменшеного використання даних.
-
{{domxref("NetworkInformation.type")}} {{readonlyinline}}
-
Повертає тип підключення, яке використовує пристрій для зв’язку з мережею. Існуючі значення: -
    -
  • bluetooth
  • -
  • cellular
  • -
  • ethernet
  • -
  • none
  • -
  • wifi
  • -
  • wimax
  • -
  • other
  • -
  • unknown
  • -
-
-
- -

Обробники подій

- -
-
{{domxref("NetworkInformation.onchange")}}
-
Подія, яка запускається, коли змінюється інформація про з’єднання, і {{event("change")}} запускається на цьому об’єкті.
-
- -

Методи

- -

Цей інтерфейс також успадковує властивості свого батьківського елементу, {{domxref("EventTarget")}}.

- -

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

- - - - - - - - - - - - - - - - -
СпецифікаціяСтатусКоментар
{{SpecName('Network Information', '#networkinformation-interface', 'NetworkInformation')}}{{Spec2('Network Information')}}Initial definition
- -

Сумісність

- - - -

{{Compat("api.NetworkInformation")}}

- -

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

- - diff --git a/files/uk/web/api/node/contains/index.html b/files/uk/web/api/node/contains/index.html deleted file mode 100644 index db187f1462..0000000000 --- a/files/uk/web/api/node/contains/index.html +++ /dev/null @@ -1,112 +0,0 @@ ---- -title: Node.contains() -slug: Web/API/Node/contains -tags: - - API - - DOM - - Method - - Node - - Вузол - - метод -translation_of: Web/API/Node/contains ---- -
{{APIRef("DOM")}}
- -

Метод Node.contains() повертає значення {{jsxref("Boolean")}}, яке вказує, чи переданий вузол є нащадком заданого вузла чи ні.

- -

Синтаксис

- -
node.contains( otherNode )
-
- -

Приклад

- -

Ця функція перевіряє, чи елемент знаходиться в тілі сторінки. А також визначає чи тіло сторінки включає само себе. Якщо включає само себе, то відповідно метод isInPage буде повертати false. В іншому випадку буде повертатися true або false в залежності від того, чи елемент існує всередині тіла сторінки.

- -
function isInPage(node) {
-  return (node === document.body) ? false : document.body.contains(node);
-}
- -

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

- - - - - - - - - - - - - - - - -
СпецифікаціяСтатусКоментар
{{SpecName("DOM WHATWG", "#dom-node-contains", "Node.contains()")}}{{Spec2("DOM WHATWG")}}Початкове визначення
- -

Сумісність із браузерами

- -

{{CompatibilityTable}}

- -
- - - - - - - - - - - - - - - - - - - - - -
ОсобливістьChromeEdgeFirefox (Gecko)Internet ExplorerOperaSafari
Базова підтримка{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatGeckoDesktop("9.0")}}5.0[1]{{CompatVersionUnknown}}3.0[2]
-
- -
- - - - - - - - - - - - - - - - - - - - - -
ОсобливістьAndroidEdgeFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Базова підтримка{{CompatUnknown}}{{CompatVersionUnknown}}{{CompatGeckoMobile("9.0")}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}
-
- -

[1] Internet Explorer лише підтримує метод contains() для елементів.

- -

[2] Safari 2.x реалізувала метод contains() неправильно.

- -

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

- - diff --git a/files/uk/web/api/node/index.html b/files/uk/web/api/node/index.html deleted file mode 100644 index 961f62fd56..0000000000 --- a/files/uk/web/api/node/index.html +++ /dev/null @@ -1,508 +0,0 @@ ---- -title: Node -slug: Web/API/Node -tags: - - API - - DOM - - DOM Reference - - Interface - - NeedsTranslation - - Node - - Reference - - TopicStub -translation_of: Web/API/Node ---- -
{{APIRef("DOM")}}
- -

A Node is an interface from which a number of DOM types inherit, and allows these various types to be treated (or tested) similarly.

- -

The following interfaces all inherit from Node its methods and properties: {{domxref("Document")}}, {{domxref("Element")}}, {{domxref("CharacterData")}} (which {{domxref("Text")}}, {{domxref("Comment")}}, and {{domxref("CDATASection")}} inherit), {{domxref("ProcessingInstruction")}}, {{domxref("DocumentFragment")}}, {{domxref("DocumentType")}}, {{domxref("Notation")}}, {{domxref("Entity")}}, {{domxref("EntityReference")}}

- -

These interfaces may return null in particular cases where the methods and properties are not relevant. They may throw an exception - for example when adding children to a node type for which no children can exist.

- -

Properties

- -

Inherits properties from its parents {{domxref("EventTarget")}}.[1]

- -
-
{{domxref("Node.baseURI")}} {{readonlyInline}}
-
Returns a {{domxref("DOMString")}} representing the base URL. The concept of base URL changes from one language to another; in HTML, it corresponds to the protocol, the domain name and the directory structure, that is all until the last '/'.
-
{{domxref("Node.baseURIObject")}} {{Non-standard_inline()}}
-
(Not available to web content.) The read-only {{ Interface("nsIURI") }} object representing the base URI for the element.
-
{{domxref("Node.childNodes")}} {{readonlyInline}}
-
Returns a live {{domxref("NodeList")}} containing all the children of this node. {{domxref("NodeList")}} being live means that if the children of the Node change, the {{domxref("NodeList")}} object is automatically updated.
-
{{domxref("Node.firstChild")}} {{readonlyInline}}
-
Returns a {{domxref("Node")}} representing the first direct child node of the node, or null if the node has no child.
-
{{domxref("Node.lastChild")}} {{readonlyInline}}
-
Returns a {{domxref("Node")}} representing the last direct child node of the node, or null if the node has no child.
-
{{domxref("Node.localName")}} {{obsolete_inline}}{{readonlyInline}}
-
Returns a {{domxref("DOMString")}} representing the local part of the qualified name of an element. -
-

Note: In Firefox 3.5 and earlier, the property upper-cases the local name for HTML elements (but not XHTML elements). In later versions, this does not happen, so the property is in lower case for both HTML and XHTML. {{gecko_minversion_inline("1.9.2")}}

-
-
-
{{domxref("Node.namespaceURI")}} {{obsolete_inline}}{{readonlyInline}}
-
The namespace URI of this node, or null if it is no namespace. -
-

Note: In Firefox 3.5 and earlier, HTML elements are in no namespace. In later versions, HTML elements are in the https://www.w3.org/1999/xhtml/ namespace in both HTML and XML trees. {{gecko_minversion_inline("1.9.2")}}

-
-
-
{{domxref("Node.nextSibling")}} {{readonlyInline}}
-
Returns a {{domxref("Node")}} representing the next node in the tree, or null if there isn't such node.
-
{{domxref("Node.nodeName")}} {{readonlyInline}}
-
Returns a {{domxref("DOMString")}} containing the name of the Node. The structure of the name will differ with the name type. E.g. An {{domxref("HTMLElement")}} will contain the name of the corresponding tag, like 'audio' for an {{domxref("HTMLAudioElement")}}, a {{domxref("Text")}} node will have the '#text' string, or a {{domxref("Document")}} node will have the '#document' string.
-
{{domxref("Node.nodePrincipal")}} {{Non-standard_inline()}}
-
A {{ Interface("nsIPrincipal") }} representing the node principal.
-
{{domxref("Node.nodeType")}}{{readonlyInline}}
-
Returns an unsigned short representing the type of the node. Possible values are: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameValue
ELEMENT_NODE1
ATTRIBUTE_NODE {{deprecated_inline()}}2
TEXT_NODE3
CDATA_SECTION_NODE {{deprecated_inline()}}4
ENTITY_REFERENCE_NODE {{deprecated_inline()}}5
ENTITY_NODE {{deprecated_inline()}}6
PROCESSING_INSTRUCTION_NODE7
COMMENT_NODE8
DOCUMENT_NODE9
DOCUMENT_TYPE_NODE10
DOCUMENT_FRAGMENT_NODE11
NOTATION_NODE {{deprecated_inline()}}12
-
-
{{domxref("Node.nodeValue")}}
-
Returns / Sets the value of the current node
-
{{domxref("Node.ownerDocument")}} {{readonlyInline}}
-
Returns the {{domxref("Document")}} that this node belongs to. If no document is associated with it, returns null.
-
{{domxref("Node.parentNode")}} {{readonlyInline}}
-
Returns a {{domxref("Node")}} that is the parent of this node. If there is no such node, like if this node is the top of the tree or if doesn't participate in a tree, this property returns null.
-
{{domxref("Node.parentElement")}} {{readonlyInline}}
-
Returns an {{domxref("Element")}} that is the parent of this node. If the node has no parent, or if that parent is not an {{domxref("Element")}}, this property returns null.
-
{{domxref("Node.prefix")}} {{obsolete_inline}}{{readonlyInline}}
-
Is a {{domxref("DOMString")}} representing the namespace prefix of the node, or null if no prefix is specified.
-
{{domxref("Node.previousSibling")}} {{readonlyInline}}
-
Returns a {{domxref("Node")}} representing the previous node in the tree, or null if there isn't such node.
-
{{domxref("Node.rootNode")}} {{readOnlyInline}}
-
Returns a {{domxref("Node")}} object representing the topmost node in the tree, or the current node if it's the topmost node in the tree. This is found by walking backward along {{domxref("Node.parentNode")}} until the top is reached.
-
{{domxref("Node.textContent")}}
-
Returns / Sets the textual content of an element and all its descendants.
-
- -

Methods

- -

Inherits methods from its parent, {{domxref("EventTarget")}}.[1]

- -
-
{{domxref("Node.appendChild()")}}
-
Adds the specified childNode argument as the last child to the current node.
- If the argument referenced an existing node on the DOM tree, the node will be detached from its current position and attached at the new position.
-
{{domxref("Node.cloneNode()")}}
-
Clone a {{domxref("Node")}}, and optionally, all of its contents. By default, it clones the content of the node.
-
{{domxref("Node.compareDocumentPosition()")}}
-
{{domxref("Node.contains()")}}
-
{{domxref("Node.getFeature()")}} {{obsolete_inline}}
-
{{domxref("Node.getRootNode()")}}
-
Returns the context objects root which optionally includes the shadow root if it is available. 
-
{{domxref("Node.getUserData()")}} {{obsolete_inline}}
-
Allows a user to get some {{domxref("DOMUserData")}} from the node.
-
{{domxref("Node.hasAttributes()")}} {{obsolete_inline}}
-
Returns a {{jsxref("Boolean")}} indicating if the element has any attributes, or not.
-
{{domxref("Node.hasChildNodes()")}}
-
Returns a {{jsxref("Boolean")}} indicating if the element has any child nodes, or not.
-
{{domxref("Node.insertBefore()")}}
-
Inserts the first {{domxref("Node")}} given in a parameter immediately before the second, child of this element, {{domxref("Node")}}.
-
{{domxref("Node.isDefaultNamespace()")}}
-
{{domxref("Node.isEqualNode()")}}
-
Returns a {{jsxref("Boolean")}} which indicates whether or not two nodes are of the same type and all their defining data points match.
-
{{domxref("Node.isSameNode()")}}
-
Returns a {{jsxref("Boolean")}} value indicating whether or not the two nodes are the same (that is, they reference the same object).
-
{{domxref("Node.isSupported()")}} {{obsolete_inline}}
-
Returns a {{jsxref("Boolean")}} flag containing the result of a test whether the DOM implementation implements a specific feature and this feature is supported by the specific node.
-
{{domxref("Node.lookupPrefix()")}}
-
{{domxref("Node.lookupNamespaceURI()")}}
-
{{domxref("Node.normalize()")}}
-
Clean up all the text nodes under this element (merge adjacent, remove empty).
-
{{domxref("Node.removeChild()")}}
-
Removes a child node from the current element, which must be a child of the current node.
-
{{domxref("Node.replaceChild()")}}
-
Replaces one child {{domxref("Node")}} of the current one with the second one given in parameter.
-
{{domxref("Node.setUserData()")}} {{obsolete_inline}}
-
Allows a user to attach, or remove, {{domxref("DOMUserData")}} to the node.
-
- -

Examples

- -

Browse all child nodes

- -

The following function recursively cycles all child nodes of a node and executes a callback function upon them (and upon the parent node itself).

- -
function DOMComb (oParent, oCallback) {
-  if (oParent.hasChildNodes()) {
-    for (var oNode = oParent.firstChild; oNode; oNode = oNode.nextSibling) {
-      DOMComb(oNode, oCallback);
-    }
-  }
-  oCallback.call(oParent);
-}
- -

Syntax

- -
DOMComb(parentNode, callbackFunction);
- -

Description

- -

Recursively cycle all child nodes of parentNode and parentNode itself and execute the callbackFunction upon them as this objects.

- -

Parameters

- -
-
parentNode
-
The parent node (Node Object).
-
callbackFunction
-
The callback function (Function).
-
- -

Sample usage

- -

The following example send to the console.log the text content of the body:

- -
function printContent () {
-  if (this.nodeValue) { console.log(this.nodeValue); }
-}
-
-onload = function () {
-  DOMComb(document.body, printContent);
-};
- -

Remove all children nested within a node

- -
Element.prototype.removeAll = function () {
-  while (this.firstChild) { this.removeChild(this.firstChild); }
-  return this;
-};
- -

Sample usage

- -
/* ... an alternative to document.body.innerHTML = "" ... */
-document.body.removeAll();
- -

Specifications

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
SpecificationStatusComment
{{SpecName('DOM WHATWG', '#interface-node', 'Node')}}{{Spec2('DOM WHATWG')}}Removed the following properties: attributes, namespaceURI, prefix, and localName.
- Removed the following methods: isSupported(), hasAttributes(), getFeature(), setUserData(), and getUserData().
{{SpecName('DOM3 Core', 'core.html#ID-1950641247', 'Node')}}{{Spec2('DOM3 Core')}}The methods insertBefore(), replaceChild(), removeChild(), and appendChild() returns one more kind of error (NOT_SUPPORTED_ERR) if called on a {{domxref("Document")}}.
- The normalize() method has been modified so that {{domxref("Text")}} node can also be normalized if the proper {{domxref("DOMConfiguration")}} flag is set.
- Added the following methods: compareDocumentPosition(), isSameNode(), lookupPrefix(), isDefaultNamespace(), lookupNamespaceURI(), isEqualNode(), getFeature(), setUserData(), and getUserData().
- Added the following properties: baseURI and textContent.
{{SpecName('DOM2 Core', 'core.html#ID-1950641247', 'Node')}}{{Spec2('DOM2 Core')}}The ownerDocument property was slightly modified so that {{domxref("DocumentFragment")}} also returns null.
- Added the following properties: namespaceURI, prefix, and localName.
- Added the following methods: normalize(), isSupported() and hasAttributes().
{{SpecName('DOM1', 'level-one-core.html#ID-1950641247', 'Node')}}{{Spec2('DOM1')}}Initial definition
- -

Browser compatibility

- -

{{CompatibilityTable}}

- -
- - {{CompatNo}}{{CompatGeckoDesktop("22.0")}} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FeatureChromeEdgeFirefox (Gecko)Internet ExplorerOperaSafari
Basic support{{CompatVersionUnknown}}[1]{{CompatVersionUnknown}}{{CompatGeckoDesktop("1.0")}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}[1]{{CompatVersionUnknown}}[1]
getFeature(){{obsolete_inline}}{{CompatNo}}{{CompatUnknown}}{{CompatGeckoDesktop("1.0")}}
- {{CompatNo}}{{CompatGeckoDesktop("7.0")}}
{{CompatUnknown}}{{CompatNo}}{{CompatNo}}
getUserData(), setUserData() and hasAttributes() {{deprecated_inline}}{{CompatNo}}{{CompatUnknown}}{{CompatGeckoDesktop("1.0")}}
- {{CompatNo}}{{CompatGeckoDesktop("22.0")}}
{{CompatUnknown}}{{CompatNo}}{{CompatNo}}
isSameNode(){{CompatVersionUnknown}}{{CompatUnknown}}{{CompatGeckoDesktop("1.0")}}
- Removed in {{CompatGeckoDesktop("10")}}
- Returned in {{CompatGeckoDesktop("48")}}
{{CompatUnknown}}{{CompatNo}}{{CompatNo}}
isSupported() {{obsolete_inline}}{{CompatNo}}{{CompatUnknown}}{{CompatGeckoDesktop("1.0")}}
-
{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}
attributes{{CompatNo}}{{CompatUnknown}}{{CompatGeckoDesktop("1.0")}}
- {{CompatNo}}{{CompatGeckoDesktop("22.0")}}[2]
{{CompatNo}}{{CompatNo}}{{CompatNo}}
rootNode(){{CompatUnknown}}{{CompatUnknown}}CompatGeckoDesktop(48)}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}
namespaceURI, localName, prefix {{obsolete_inline}}{{CompatVersionUnknown}}
- {{CompatNo}}46.0[3]
{{CompatUnknown}}{{CompatVersionUnknown}}
- {{CompatNo}}48.0[3]
{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}
getRootNode{{CompatChrome(54.0)}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}{{CompatOpera(41)}}{{CompatUnknown}}
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FeatureAndroidAndroid WebviewEdgeFirefox Mobile (Gecko)IE MobileOpera MobileSafari MobileChrome for Android
Basic support{{CompatUnknown}}{{CompatVersionUnknown}}[1]{{CompatVersionUnknown}}{{CompatGeckoMobile("1.0")}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}[1]{{CompatVersionUnknown}}[1]{{CompatVersionUnknown}}[1]
getFeature(){{obsolete_inline}}{{CompatNo}}{{CompatNo}}{{CompatUnknown}}{{CompatGeckoMobile("1.0")}}
- {{CompatNo}}{{CompatGeckoDesktop("7.0")}}
{{CompatUnknown}}{{CompatNo}}{{CompatNo}}{{CompatNo}}
getUserData(), setUserData() and hasAttributes() {{deprecated_inline}}{{CompatNo}}{{CompatNo}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}{{CompatNo}}
isSameNode(){{CompatUnknown}}{{CompatVersionUnknown}}{{CompatUnknown}} -

{{CompatGeckoDesktop("1.0")}}
- Removed in {{CompatGeckoDesktop("10")}}
- Returned in {{CompatGeckoDesktop("48")}}

-
{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}{{CompatVersionUnknown}}
isSupported() {{obsolete_inline}}{{CompatUnknown}}{{CompatNo}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}{{CompatNo}}
attributes{{CompatUnknown}}{{CompatNo}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}{{CompatNo}}
rootNode(){{CompatUnknown}}{{CompatNo}}{{CompatUnknown}}{{CompatGeckoMobile(48)}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}{{CompatNo}}
namespaceURI, localName, prefix {{obsolete_inline}}{{CompatUnknown}}{{CompatNo}}{{CompatUnknown}}{{CompatVersionUnknown}}
- {{CompatNo}}48.0[3]
{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}{{CompatNo}}
getRootNode(){{CompatNo}}{{CompatChrome(54.0)}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}{{CompatOperaMobile(41)}}{{CompatUnknown}}{{CompatChrome(54.0)}}
-
- -

[1] WebKit and old versions of Blink incorrectly do not make Node inherit from {{domxref("EventTarget")}}.

- -

[2] In Gecko 22.0 {{geckoRelease("22.0")}} the attributes property was moved to {{domxref("Element")}}.

- -

[3] The properties were moved to the {{domxref("Element")}} and {{domxref("Attr")}} APIs according to the DOM4 standard.

diff --git a/files/uk/web/api/page_visibility_api/index.html b/files/uk/web/api/page_visibility_api/index.html deleted file mode 100644 index 2cf8077bd9..0000000000 --- a/files/uk/web/api/page_visibility_api/index.html +++ /dev/null @@ -1,202 +0,0 @@ ---- -title: API відображення сторінки -slug: Web/API/Page_Visibility_API -tags: - - API - - API відображення сторінки - - visibilityState - - visibilitychange - - відображення сторінки - - процеси скритої закладки - - фоновий режим -translation_of: Web/API/Page_Visibility_API -original_slug: Web/API/API_відображення_сторінки ---- -
{{DefaultAPISidebar("Page Visibility API")}}
- -
- -

При перегляді сайту за допомогою вкладок існує ймовірність того, що будь-яка з веб-сторінок знаходиться в фоновому режимі і тому користувач її не бачить. API відображення сторінки надає події, які ви можете відстежити, щоб дізнатися, коли документ стає видимим або прихованим, а також дозволяє отримати поточний стан прихованості/видимості сторінки.

- -
-

Примітка: API відображення сторінки є особливо корисним для економії ресурсів та підвищення продуктивності, дозволяючи сторінці уникнути виконання непотрібних завдань, коли документ не є видимим.

-
- -

Коли користувач згортає вікно або перемикається на іншу вкладку, API посилає подію {{event("visibilitychange")}}, щоб передати слухачам інформацію про зміну стану сторінки. Ви можете виявити подію і виконати деякі дії або нічого не виконувати. Наприклад, якщо ваш веб-додаток програє відео, він може поставити відео на паузу, коли користувач переміщує вкладку у фоновий режим, і відновити відтворення, коли користувач повернеться до цієї вкладки. Користувач не втрачає миті у відео, звук відео не заважає аудіо в новій вкладці на передньому плані, і користувач не пропустить жодного моменту в них.

- -

Стан видимості {{HTMLElement ("iframe")}} збігаються зі станом батьківського документа. Приховування <iframe> за допомогою властивостей CSS (таких як {{cssxref ("display", "display: none;")}}) не викликає подій видимості і не змінює стан документа, що міститься в кадрі.

- -

Випадки використання

- -

Розглянемо декілька прикладів використання API видимості сторінки.

- - - -

Розробники у минулому використовували недосконалі проксі для виявлення цього. Наприклад, перегляд {{event("blur")}} і {{event("focus")}} подій на вікні допомагає зрозуміти, коли ваша сторінка не є активною, але не говорить про те, що ваша сторінка насправді прихована для користувача. API Видимість сторінки вирішує цю проблему.

- -
-

Примітка: У той час як {{domxref ("GlobalEventHandlers.onblur", "onblur")}} та {{domxref ("GlobalEventHandlers.onfocus", "onfocus")}} скажуть вам, коли користувач перемикає вікно, але це не обов'язково означає, що воно приховано. Сторінки стають прихованими тільки тоді, коли користувач перемикає вкладки або згортає вікно браузера, що містить вкладку.

-
- -

Політика позиціонування, як сприяння продуктивності фонової сторінки

- -

Окремо від API відображення сторінки агенти  користувача зазвичай мають ряд власних політик для зниження впливу продуктивності фонових або прихованих вкладок. Вони можуть включати в себе:

- - - -

Деякі процеси виключені з цього гасящего режиму. У цих випадках ви також можете використовувати API видимості сторінки, щоб зменшити вплив на продуктивність.

- - - -

Приклад

- -

Подивіться живий приклад (відео зі звуком).

- -

Приклад, який призупиняє перегляд відео під час перемиканні на іншу вкладку і відтворює його знову при поверненні на цю вкладку, був створений за таким кодом:

- -
   // Встановіть ім'я властивості hidden і події зміни для видимості.
-
-var hidden, visibilityChange;
-if (typeof document.hidden !== "undefined") { // Opera 12.10 і Firefox 18 і більше пізніша підтримка
-  hidden = "hidden";
-  visibilityChange = "visibilitychange";
-} else if (typeof document.msHidden !== "undefined") {
-  hidden = "msHidden";
-  visibilityChange = "msvisibilitychange";
-} else if (typeof document.webkitHidden !== "undefined") {
-  hidden = "webkitHidden";
-  visibilityChange = "webkitvisibilitychange";
-}
-
-var videoElement = document.getElementById("videoElement");
-
-// Якщо сторінка прихована, зупиніть відео;
-// Якщо сторінка відображається, відтворіть відеозображення;
-
-function handleVisibilityChange() {
-  if (document[hidden]) {
-    videoElement.pause();
-  } else {
-    videoElement.play();
-  }
-}
-
-      // Попереджаємо, якщо браузер не підтримує addEventListener або Page Visibility API
-if (typeof document.addEventListener === "undefined" || hidden === undefined) {
-  console.log("Для цього демонстрування потрібен браузер, наприклад, Google Chrome або Firefox, який підтримує API для перегляду сторінок.");
-} else {
-      // Зміна видимості сторінки
-  document.addEventListener(visibilityChange, handleVisibilityChange, false);
-
-     // Коли відео призупиняється, встановлюємо назву.
-     // Це свідчитеме про паузу.
-  videoElement.addEventListener("pause", function(){
-      document.title = 'Paused';
-  }, false);
-
-  // Коли відео відтворюється, встановлюємо назву.
-  videoElement.addEventListener("play", function(){
-      document.title = 'Playing';
-  }, false);
-
-}
-
- -

Властивості, використані в інтерфейсі документа

- -

API Видимість сторінки додає наступні властивості до інтерфейсу {{domxref("Document")}} :

- -
-
{{domxref("Document.hidden")}} {{ReadOnlyInline}}
-
Повертає true , якщо сторінка знаходиться в стані, яке вважається прихованим для користувача, і false якщо навпаки.
-
{{domxref("Document.visibilityState")}} {{ReadOnlyInline}}
-
 {{domxref ("DOMString")}} вказує на поточний стан видимості документа. Можливі значення: -
-
visible
-
Зміст сторінки може бути, принаймні, частково видимим. На практиці це означає, що сторінка є закладкою на передньому плані немінімізірованного вікна.
-
hidden
-
Вміст сторінки не видно користувачеві або через те, що вкладка документа знаходиться в фоновому режимі, або через те, що частина вікна прихована, або через те, що екран пристрою вимкнений.
-
prerender
-
Вміст сторінки є попередніми і невидимим для користувача. Документ може буті в стані попереднього завантаження. -
Примітка: Не всі браузери підтримують попереднє завантаження.
-
-
unloaded
-
Сторінка перебуває в процесі вивантаження з пам'яті. -
Примітка: Не всі браузери підтримують це значення.
-
-
-
-
{{domxref("Document.onvisibilitychange")}}
-
 {{domxref("EventListener")}} задає код, який буде викликатися при виникненні події {{event("visibilitychange")}} .
-
- -
//startSimulation та pauseSimulation визначені в іншому місці
-function handleVisibilityChange() {
-  if (document.hidden) {
-    pauseSimulation();
-  } else  {
-    startSimulation();
-  }
-}
-
-document.addEventListener("visibilitychange", handleVisibilityChange, false);
-
- -

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

- - - - - - - - - - - - - - - - -
SpecificationStatusComment
{{SpecName('Page Visibility API')}}{{Spec2('Page Visibility API')}}Початкове значення.
- -

Працює з браузерами

- -
-

Document.visibilityState

- -
- - -

{{Compat("api.Document.visibilityState")}}

-
-
- -

Дивись також

- - diff --git a/files/uk/web/api/promiserejectionevent/index.html b/files/uk/web/api/promiserejectionevent/index.html deleted file mode 100644 index 897a97a97a..0000000000 --- a/files/uk/web/api/promiserejectionevent/index.html +++ /dev/null @@ -1,95 +0,0 @@ ---- -title: PromiseRejectionEvent -slug: Web/API/PromiseRejectionEvent -tags: - - API - - HTML DOM - - Interface - - JavaScript - - PromiseRejectionEvent - - Promises - - Reference - - events - - події - - проміси -translation_of: Web/API/PromiseRejectionEvent ---- -
{{APIRef("HTML DOM")}}
- -

Інтерфейс PromiseRejectionEvent відображає події, які надсилаються у глобальний контекст скрипта, коли об'єкти JavaScript {{jsxref("Promise")}} відхиляються. Ці події особливо корисні для цілей телеметрії та налагоджування.

- -

Щоб дізнатись більше про події відхилення промісів, дивіться {{SectionOnPage("/uk/docs/Web/JavaScript/Guide/Using_promises", "Події відхилення промісів")}}.

- -

Конструктор

- -
-
{{domxref("PromiseRejectionEvent.PromiseRejectionEvent", "PromiseRejectionEvent()")}}
-
Створює подію PromiseRejectionEvent, отримуючи тип події (unhandledrejection або rejectionhandled) та інші деталі.
-
- -

Властивості

- -

Також успадковує властивості від батьківського інтерфейсу {{domxref("Event")}}.

- -
-
{{domxref("PromiseRejectionEvent.promise")}} {{readonlyInline}}
-
Об'єкт JavaScript {{jsxref("Promise")}}, який був відхилений.
-
{{domxref("PromiseRejectionEvent.reason")}} {{readOnlyInline}}
-
Значення чи {{jsxref("Object","об'єкт")}}, що вказує причину відхилення проміса, як вона передається у {{jsxref("Promise.відхилено","Promise.reject()")}}.
-
- -

Методи

- -

Цей інтерфейс не має унікальних методів; він успадковує методи від батьківського інтерфейсу {{domxref("Event")}}.

- -

Події

- -
-
rejectionhandled
-
Запускається, коли об'єкт JavaScript {{jsxref("Promise")}} відхиляється, і після того, як відхилення було оброблене кодом для обробки відхилення проміса.
-
unhandledrejection
-
Запускається, коли об'єкт JavaScript {{jsxref("Promise")}} відхиляється, але немає обробника, який зреагував би на відхилення.
-
- -

Приклади

- -

Цей простий приклад перехоплює необроблені відхилення промісів та логує їх з метою відлагодження.

- -
window.onunhandledrejection = function(e) {
-  console.log(e.reason);
-}
- -

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

- - - - - - - - - - - - - - - - -
СпецифікаціяСтатусКоментар
{{SpecName('HTML WHATWG', 'webappapis.html#promiserejectionevent', 'PromiseRejectionEvent')}}{{ Spec2('HTML WHATWG') }}Початкове визначення.
- -

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

- - - -

{{Compat("api.PromiseRejectionEvent")}}

- -

Див. також

- - diff --git a/files/uk/web/api/promiserejectionevent/promise/index.html b/files/uk/web/api/promiserejectionevent/promise/index.html deleted file mode 100644 index a9874092ad..0000000000 --- a/files/uk/web/api/promiserejectionevent/promise/index.html +++ /dev/null @@ -1,76 +0,0 @@ ---- -title: PromiseRejectionEvent.promise -slug: Web/API/PromiseRejectionEvent/promise -tags: - - API - - HTML DOM - - JavaScript - - Promise - - PromiseRejectionEvent - - Властивість - - Проміс - - події -translation_of: Web/API/PromiseRejectionEvent/promise ---- -
{{APIRef("HTML DOM") }}
- -

Властивість promise інтерфейсу {{domxref("PromiseRejectionEvent")}}, доступна лише для читання, вказує об'єкт JavaScript {{jsxref("Promise")}}, який був відхилений. Ви можете дослідити властивість події {{domxref("PromiseRejectionEvent.reason")}}, щоб дізнатись, чому проміс був відхилений.

- -

Синтаксис

- -
promise = PromiseRejectionEvent.promise
- -

Значення

- -

Об'єкт JavaScript {{jsxref("Promise")}}, який був відхилений, і чиє відхилення пройшло необробленим.

- -

Приклади

- -

Цей приклад прослуховує необроблені проміси, і, якщо властивість {{domxref("PromiseRejectionEvent.reason", "reason")}} є об'єктом з полем code, що містить текст "Модуль не готовий", він встановлює функцію зворотного виклику, що виконується під час неактивності переглядача, яка буде повторно запускати невиконану задачу, щоб виконати її правильно.

- -

Метод {{domxref("event.preventDefault()")}} викликається, щоб зазначити, що проміс тепер був оброблений.

- -
window.onunhandledrejection = function(event) {
-  if (event.reason.code && event.reason.code == "Модуль не готовий") {
-    window.requestIdleCallback(function(deadline) {
-      loadModule(event.reason.moduleName)
-        .then(performStartup);
-    });
-    event.preventDefault();
-  }
-}
- -

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

- - - - - - - - - - - - - - - - -
СпецифікаціяСтатусКоментар
{{SpecName('HTML WHATWG', 'webappapis.html#dom-promiserejectionevent-promise', 'PromiseRejectionEvent.promise')}}{{ Spec2('HTML WHATWG') }}Початкове визначення.
- -

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

- - - -

{{Compat("api.PromiseRejectionEvent.promise")}}

- -

Див. також

- - diff --git a/files/uk/web/api/promiserejectionevent/promiserejectionevent/index.html b/files/uk/web/api/promiserejectionevent/promiserejectionevent/index.html deleted file mode 100644 index a7ae3616a8..0000000000 --- a/files/uk/web/api/promiserejectionevent/promiserejectionevent/index.html +++ /dev/null @@ -1,89 +0,0 @@ ---- -title: PromiseRejectionEvent() -slug: Web/API/PromiseRejectionEvent/PromiseRejectionEvent -tags: - - API - - HTML DOM - - JavaScript - - Promise - - PromiseRejectionEvent - - Конструктор - - Проміс - - події -translation_of: Web/API/PromiseRejectionEvent/PromiseRejectionEvent ---- -
{{APIRef("HTML DOM")}}
- -

Конструктор PromiseRejectionEvent() створює та вертає {{domxref("PromiseRejectionEvent")}}, що відображає події, запущені, коли об'єкт JavaScript {{jsxref("Promise")}} був відхилений. З подіями відхилення промісів стає можливим виявляти та повідомляти про проміси, чиє неуспішне завершення пройшло непоміченим. Також стає легше писати глобальні обробники для помилок.

- -

Існують два типи подій PromiseRejectionEvent: unhandledrejection надсилається середовищем виконання JavaScript, коли проміс був відхилений, але відхилення не було оброблене. Подія rejectionhandled видається, якщо проміс був відхилений, але відхилення було перехоплене обробником відхилень.

- -

Синтаксис

- -
promiseRejectionEvent = PromiseRejectionEvent(type, options);
-
- -

Параметри

- -

Конструктор PromiseRejectionEvent() також успадковує параметри від {{domxref("Event.Event", "Event()")}}.

- -
-
type
-
Рядок, що відображає ім'я типу події PromiseRejectionEvent. Він чутливий до регістру, і повинен мати значення "rejectionhandled" або "unhandledrejection", щоб відповідати іменам можливих (не штучно створених) подій {{domxref("PromiseRejectionEvent")}}, які можуть запустити програмні агенти).
-
options
-
{{jsxref("Object","Об'єкт")}}, що визначає деталі відхилення: -
-
promise
-
{{jsxref("Promise","Проміс")}}, що був відхилений.
-
reason
-
Будь-яке значення чи {{jsxref("Object","об'єкт")}}, що відображає причину відхилення проміса. Це може бути що завгодно, від числового коду помилки, до помилки {{domxref("DOMString")}} та об'єкта, який містить детальну інформацію, що описує ситуацію, яка призвела до відхилення проміса.
-
-
-
- -

Значення, що повертається

- -

Нова подія PromiseRejectionEvent, що має конфігурацію, визначену параметрами.

- -

Приклади

- -

Цей приклад створює нову подію unhandledrejection для проміса myPromise з причиною-рядком "Мій будинок горить". Параметр reason (причина) міг так само легко бути числом, чи навіть об'єктом з детальною інформацією, що містить адрес будинку, чи опис того, наскільки сильний вогонь, і номер телефону людини, яку потрібно повідомити.

- -
let myRejectionEvent = new PromiseRejectionEvent("unhandledrejection", {
-  promise : myPromise,
-  reason : "Мій будинок горить"
-});
- -

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

- - - - - - - - - - - - - - - - -
СпецифікаціяСтатусКоментар
{{SpecName('HTML WHATWG', '#the-promiserejectionevent-interface', 'the PromiseRejectionEvent interface')}}{{Spec2('HTML WHATWG')}}Початкове визначення.
- -

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

- - - -

{{Compat("api.PromiseRejectionEvent.PromiseRejectionEvent")}}

- -

Див. також

- - diff --git a/files/uk/web/api/promiserejectionevent/reason/index.html b/files/uk/web/api/promiserejectionevent/reason/index.html deleted file mode 100644 index b12a2480c1..0000000000 --- a/files/uk/web/api/promiserejectionevent/reason/index.html +++ /dev/null @@ -1,66 +0,0 @@ ---- -title: PromiseRejectionEvent.reason -slug: Web/API/PromiseRejectionEvent/reason -tags: - - API - - HTML DOM - - JavaScript - - Promise - - PromiseRejectionEvent - - reason - - Властивість - - Проміс - - події -translation_of: Web/API/PromiseRejectionEvent/reason ---- -

{{APIRef("HTML DOM")}}

- -

Властивість reason інтерфейсу {{domxref("PromiseRejectionEvent")}}, доступна лише для читання, є будь-яким значенням JavaScript чи {{jsxref("Object","об'єктом")}}, що надає причину, яка передається у {{jsxref("Promise.відхилено","Promise.reject()")}}. Це, в теорії, надає інформацію щодо причини відхилення проміса.

- -

Синтаксис

- -
reason = PromiseRejectionEvent.reason
- -

Значення

- -

Значення або об'єкт, що надає інформацію, якою ви можете скористатись, щоб зрозуміти, чому був відхилений проміс. Це може бути що завгодно, від коду помилки до об'єкта з текстом, посиланнями та всім, що ви захочете в нього додати.

- -

Приклади

- -
window.onunhandledrejection = function(e) {
-  console.log(e.reason);
-}
- -

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

- - - - - - - - - - - - - - - - -
СпецифікаціяСтатусКоментар
{{SpecName('HTML WHATWG', 'webappapis.html#dom-promiserejectionevent-reason', 'PromiseRejectionEvent.reason')}}{{ Spec2('HTML WHATWG') }}Початкове визначення.
- -

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

- - - -

{{Compat("api.PromiseRejectionEvent.reason")}}

- -

Див. також

- - diff --git a/files/uk/web/api/svganimatedstring/animval/index.html b/files/uk/web/api/svganimatedstring/animval/index.html deleted file mode 100644 index 46f2c2a3d2..0000000000 --- a/files/uk/web/api/svganimatedstring/animval/index.html +++ /dev/null @@ -1,44 +0,0 @@ ---- -title: SVGAnimatedString.animVal -slug: Web/API/SVGAnimatedString/animVal -translation_of: Web/API/SVGAnimatedString/animVal ---- -

{{APIRef("SVG")}}

- -

Атрибут AnimVal або властивість animVal містить те саме значення, що і властивість baseVal. Якщо атрибут або властивість анімований, він буде містити поточне анімоване значення атрибута або властивості. Якщо даний атрибут або властивість в даний час не анімовані, то він містить те саме значення, що і baseVal

- -
-

Властивість animVal доступна лише для зчитування значення. Internet Explorer 9 підтримує анімацію SVG, але не підтримує анімацію SVG на основі декларативних баз даних. В результаті, властивість animVal містить те саме значення, що і властивість baseVal.

-
- -

Синтакс

- -
var = object.animVal
- -

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

- - - - - - - - - - - - - - - - - - - -
СпецифікаціяСтатусКоментарі
{{SpecName('SVG1.1', 'types.html#__svg__SVGAnimatedString__animVal')}}{{Spec2('SVG1.1')}} 
{{SpecName('SVG2', 'types.html#__svg__SVGAnimatedString__animVal')}}{{Spec2('SVG2')}} 
- -

Сумісність браузерів

- - - -

{{Compat("api.SVGAnimatedString.animVal")}}

diff --git a/files/uk/web/api/svganimatedstring/index.html b/files/uk/web/api/svganimatedstring/index.html deleted file mode 100644 index bca995b90e..0000000000 --- a/files/uk/web/api/svganimatedstring/index.html +++ /dev/null @@ -1,60 +0,0 @@ ---- -title: SVGAnimatedString -slug: Web/API/SVGAnimatedString -tags: - - API - - NeedsExample - - NeedsTranslation - - Reference - - Référence(2) - - SVG - - SVG DOM - - TopicStub -translation_of: Web/API/SVGAnimatedString ---- -
{{APIRef("SVG")}}
- -
 
- -

The SVGAnimatedString interface represents string attributes which can be animated from each SVG declaration. You need to create SVG attribute before doing anything else, everything should be declared inside this.

- -

Properties

- -
-
{{domxref("SVGAnimatedString.animVal")}} {{readonlyInline}}
-
This is a {{domxref("DOMString")}} representing the animation value. If the given attribute or property is being animated it contains the current animated value of the attribute or property. If the given attribute or property is not currently being animated, it contains the same value as baseVal.
-
{{domxref("SVGAnimatedString.baseVal")}}
-
This is a {{domxref("DOMString")}} representing the base value. The base value of the given attribute before applying any animations. Setter throws DOMException.
-
- -

Methods

- -

The SVGAnimatedString interface do not provide any specific methods.

- -

Specifications

- - - - - - - - - - - - - - - - - - - -
SpecificationStatusComment
{{SpecName('SVG1.1', '#InterfaceSVGAnimatedString')}}{{Spec2('SVG1.1')}} 
{{SpecName('SVG2', 'types.html#InterfaceSVGAnimatedString')}}{{Spec2('SVG2')}} 
- -

Browser compatibility

- - - -

{{Compat("api.SVGAnimatedString")}}

diff --git a/files/uk/web/api/urlsearchparams/index.html b/files/uk/web/api/urlsearchparams/index.html deleted file mode 100644 index 78ab36b8e8..0000000000 --- a/files/uk/web/api/urlsearchparams/index.html +++ /dev/null @@ -1,171 +0,0 @@ ---- -title: URLSearchParams -slug: Web/API/URLSearchParams -translation_of: Web/API/URLSearchParams ---- -

{{ApiRef("URL API")}}

- -

URLSearchParams інтерфейс визначає корисні методи для роботи з довгими текстовими URL.

- -

Об'єктна реалізація URLSearchParams може використовуватись напряму в {{jsxref("Statements/for...of", "for...of")}} структурі, замість {{domxref('URLSearchParams.entries()', 'entries()')}}: for (var p of mySearchParams) що еквівалентно до for (var p of mySearchParams.entries()).

- -

Конструктор

- -
-
{{domxref("URLSearchParams.URLSearchParams", 'URLSearchParams()')}}
-
Конструктор вертає URLSearchParams об'єкт.
-
- -

Properties

- -

This interface doesn't inherit any property.

- -

Методи

- -

Інтерфейс на наслідує ніяких методів

- -
-
{{domxref("URLSearchParams.append()")}}
-
Appends a specified key/value pair as a new search parameter.
-
{{domxref("URLSearchParams.delete()")}}
-
Deletes the given search parameter, and its associated value, from the list of all search parameters.
-
{{domxref("URLSearchParams.entries()")}}
-
Returns an {{jsxref("Iteration_protocols","iterator")}} allowing to go through all key/value pairs contained in this object.
-
{{domxref("URLSearchParams.get()")}}
-
Returns the first value associated to the given search parameter.
-
{{domxref("URLSearchParams.getAll()")}}
-
Returns all the values association with a given search parameter.
-
{{domxref("URLSearchParams.has()")}}
-
Returns a {{jsxref("Boolean")}} indicating if such a search parameter exists.
-
{{domxref("URLSearchParams.keys()")}}
-
Returns an {{jsxref("Iteration_protocols", "iterator")}} allowing to go through all keys of the key/value pairs contained in this object.
-
{{domxref("URLSearchParams.set()")}}
-
Sets the value associated to a given search parameter to the given value. If there were several values, delete the others.
-
{{domxref("URLSearchParams.toString()")}}
-
Returns a string containg a query string suitable for use in a URL.
-
{{domxref("URLSearchParams.values()")}}
-
Returns an {{jsxref("Iteration_protocols", "iterator")}} allowing to go through all values of the key/value pairs contained in this object.
-
- -

Example

- -
var paramsString = "q=URLUtils.searchParams&topic=api"
-var searchParams = new URLSearchParams(paramsString);
-
-//Iterate the search parameters.
-for (let p of searchParams) {
-  console.log(p);
-}
-
-searchParams.has("topic") === true; // true
-searchParams.get("topic") === "api"; // true
-searchParams.getAll("topic"); // ["api"]
-searchParams.get("foo") === null; // true
-searchParams.append("topic", "webdev");
-searchParams.toString(); // "q=URLUtils.searchParams&topic=api&topic=webdev"
-searchParams.set("topic", "More webdev");
-searchParams.toString(); // "q=URLUtils.searchParams&topic=More+webdev"
-searchParams.delete("topic");
-searchParams.toString(); // "q=URLUtils.searchParams"
-
- -

Specifications

- - - - - - - - - - - - - - - - -
SpecificationStatusComment
{{SpecName('URL', '#urlsearchparams', "URLSearchParams")}}{{Spec2('URL')}}Initial definition.
- -

Browser compatibility

- -

{{ CompatibilityTable() }}

- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
FeatureChromeFirefox (Gecko)Internet ExplorerOperaSafari
Basic support{{CompatChrome(49)}}{{CompatGeckoDesktop("29.0")}}{{CompatNo}}36{{CompatNo}}
entries(), keys(), values(), and support of for...of{{CompatChrome(49)}}{{CompatGeckoDesktop("44.0")}}{{CompatNo}}36{{CompatNo}}
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FeatureAndroidAndroid WebviewFirefox Mobile (Gecko)IE MobileOpera MobileSafari MobileChrome for Android
Basic support{{CompatNo}}{{CompatChrome(49)}}{{CompatGeckoMobile("29.0")}}{{CompatNo}}{{CompatUnknown}}{{CompatNo}}{{CompatChrome(49)}}
entries(), keys(), values(), and support of for...of{{CompatNo}}{{CompatChrome(49)}}{{CompatGeckoMobile("44.0")}}{{CompatNo}}{{CompatUnknown}}{{CompatNo}}{{CompatChrome(49)}}
-
- -

See also

- - - -
-
diff --git a/files/uk/web/api/web_workers_api/index.html b/files/uk/web/api/web_workers_api/index.html deleted file mode 100644 index a22a63cd93..0000000000 --- a/files/uk/web/api/web_workers_api/index.html +++ /dev/null @@ -1,215 +0,0 @@ ---- -title: Web Workers API -slug: Web/API/Web_Workers_API -translation_of: Web/API/Web_Workers_API ---- -

{{DefaultAPISidebar("Web Workers API")}}

- -

Web Workers це механізм, який дозволяє запускати скрипові операції  у фоновому потоці, окремо від основного діючого потоку web-додатку. Перевага цього методу в тому, що трудоміські процеси можуть виконуватися в окромому потоці, дозволяючи основному (зазвичай UI) потоку працювати без блокування/сповільнення.

- -

Концепція та використання Web Workers

- -

Worker це об'єкт, який створюється з використанням конструктору (e.g. {{domxref("Worker.Worker", "Worker()")}}), який запускає вказаний JavaScript-файл — файл, який містить код, що буде запущений у робочому потоці; workers запускаються у іншому глобальному контексті, який не є поточним {{domxref("window")}}. Цей контекст представляюється об'єктом  {{domxref("DedicatedWorkerGlobalScope")}} у разі виділеного workers (стандартний workers, які використовуються одним сценарієм; загальні workers використовують {{domxref("SharedWorkerGlobalScope")}}).

- -

У потоці workers можна запускати будь-який код з невеликкими винятками. Наприклад, не можна напряму маніпулювати DOM з worker або використовувати деякі стандартні методи та властивості об'єкту {{domxref("window")}}, але можна використовувати велику кількість речей, доступних з window, включаючи WebSockets, та механізми зберігання даних, як IndexedDB та Firefox OS-only Data Store API.  Дивіться Функції та класи, доступні для workers для більшої детальності.

- -

Дані передаються між workers та основним потоком за допомогою системи сповіщення — обидві сторони пересилають свої сповіщення, використовуючи методи postMessage(), та відповідаюсь через обробник подій onmessage (повідомлення містится всепредині атрибутів даних {{event("Message")}} ). Дані копіюються, а не поширюються.

- -

Workers можуть в свою чергу породжувати нові workers, за умови, що ці workers будуть розміщуватися в межах однієї й тієї ж самої сорінки, що й батьківський worker.  На додаток, workers можуть використовувати XMLHttpRequest для мережевого В/В, за винятком того, що responseXML та channel атрибути XMLHttpRequest завжди повертають null.

- -

Окрім виділених workers, є й інши типи:

- - - -
-

Примітка: Згіздно з Web workers Spec, події помилок worker не повинні вспливати (дивіться {{bug(1188141)}}. Це було реалізовано у Firefox 42.

-
- -

Інтерфейси Web Worker

- -
-
{{domxref("AbstractWorker")}}
-
Абстрактні властивості та методи, загальні для всіх видів workers ({{domxref("Worker")}} або {{domxref("SharedWorker")}}).
-
{{domxref("Worker")}}
-
Представляє собою діючий поток worker, дозволяючи передавати сповіщення запущеному коду worker.
-
{{domxref("SharedWorker")}}
-
Представляє собою специфічний вид worker, який може бути доступний з декількох контекстів браузерів, будучи декількома вікнами, iframes або іншими workers.
-
{{domxref("WorkerGlobalScope")}}
-
Представляє собою загальний scope будь-якого worker (виконуючи ту ж роботу, що й {{domxref("Window")}} для звичайного контенту web). Різні види worker мають об'єкт scope, який наслідується з цього інерфейсу та додає більше специфічних особливостей.
-
{{domxref("DedicatedWorkerGlobalScope")}}
-
Представляє собою scope виділеного worker, наслудуючись з {{domxref("WorkerGlobalScope")}} та додаючи деякі  особливості.
-
{{domxref("SharedWorkerGlobalScope")}}
-
Представляє собою scope загального worker, наслідуючись з {{domxref("WorkerGlobalScope")}} та додаючи деякі особливості.
-
{{domxref("WorkerNavigator")}}
-
Представляє собою ідентифікатор та стан користувача (клієнта):
-
- -

Приклади

- -

Ми створили декілька простих прикладів, щоб показати основне вікористання:

- - - -

Ви можете знайти більше інформації як працюють ці демо у Використання web workers.

- -

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

- - - - - - - - - - - - - - - - - - - -
SpecificationStatusComment
{{SpecName('HTML WHATWG', '#toc-workers')}}{{Spec2('HTML WHATWG')}}No change from {{SpecName("Web Workers")}}.
{{SpecName('Web Workers')}}{{Spec2('Web Workers')}}Initial definition.
- -

Сумісність з браузерами

- -
{{CompatibilityTable}}
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FeatureChromeFirefox (Gecko)Internet ExplorerOperaSafari (WebKit)
Basic support4{{CompatGeckoDesktop(1.9.1)}}10.010.64
Shared workers4{{CompatGeckoDesktop(29)}}{{CompatNo}}10.64
Passing data using structured cloning13{{CompatGeckoDesktop(8)}}10.011.56
Passing data using  transferable objects17 {{property_prefix("webkit")}}
- 21
{{CompatGeckoDesktop(18)}}{{CompatNo}}156
Global {{domxref("window.URL", "URL")}}10[1]
- 23
{{CompatGeckoDesktop(21)}}11156[1]
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FeatureAndroidChrome for AndroidFirefox Mobile (Gecko)Firefox OS (Gecko)IE PhoneOpera MobileSafari Mobile
Basic support4.44{{CompatGeckoMobile(1.9.1)}}1.0.110.011.55.1
Shared workers{{CompatNo}}4291.4{{CompatNo}}{{CompatNo}}{{CompatNo}}
Passing data using structured cloning{{CompatNo}}481.0.1{{CompatNo}}{{CompatNo}}{{CompatNo}}
Passing data using  transferable objects{{CompatNo}}{{CompatNo}}181.0.1{{CompatNo}}{{CompatNo}}{{CompatNo}}
-
- -

[1] As webkitURL.

- -

See also

- - diff --git a/files/uk/web/api/webgl_api/index.html b/files/uk/web/api/webgl_api/index.html deleted file mode 100644 index 078414deeb..0000000000 --- a/files/uk/web/api/webgl_api/index.html +++ /dev/null @@ -1,238 +0,0 @@ ---- -title: WebGL -slug: Web/API/WebGL_API -tags: - - WebGL - - Графіка - - Детально - - Медіа -translation_of: Web/API/WebGL_API ---- -
{{WebGLSidebar}}
- -
-

WebGL (Web Graphics Library) - це JavaScript API для відображення інтерактивної 3D та 2D графіки в будь-якому сумісному веб-переглядачі без використання плагінів. WebGL робиць це вводячи API, яке точно відповідає OpenGL ES 2.0 та може бути використане в HTML5 {{HTMLElement("canvas")}} елементах.

-
- -

Підтримка WebGL присутня в Firefox 4+, Google Chrome 9+, Opera 12+, Safari 5.1+ and Internet Explorer 11+; проте, користувацький пристрій має також мати апаратне забезпечення, яке підтримує ці функції.

- -

Елемент {{HTMLElement("canvas")}} також використовується Canvas 2D для побудови 2D графіки на веб-сторінках.

- -

Посилання

- -

Стандартні інтерфейси

- -
- -
- -

Розширення

- -
- -
- -

Події

- - - -

Константи і типи

- - - -

Керівництва і навчальні сторінки

- - - -

Детальні керівництва

- - - -

Ресурси

- - - -

Бібліотеки

- - - -

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

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
СпецифікаціяСтатусКоментар
{{SpecName('WebGL')}}{{Spec2('WebGL')}}Початкове визначення. Базується на OpenGL ES 2.0
{{SpecName('WebGL2')}}{{Spec2('WebGL2')}}Будується поверх WebGL1. На основі OpenGL ES 3.0.
{{SpecName('OpenGL ES 2.0')}}{{Spec2('OpenGL ES 2.0')}} 
{{SpecName('OpenGL ES 3.0')}}{{Spec2('OpenGL ES 3.0')}} 
- -

Сумісність

- -
{{CompatibilityTable}}
- -
- - - - - - - - - - - - - - - - - - - -
ФункціяFirefox (Gecko)ChromeInternet ExplorerOperaSafari
Базова підтримка{{CompatGeckoDesktop("2.0")}}91112[1]5.1[1]
-
- -
- - - - - - - - - - - - - - - - - - - -
ФункціяFirefox Mobile (Gecko)Chrome for AndroidIE MobileOpera MobileSafari Mobile
Базова підтримка425[1]{{CompatNo}}12[1]8.1
-
- -

[1] Реалізація цієї функції є експериментальною.

- -

Зауваження по сумісності

- -

На додаток до веб-переглядача, сам графічний процесор також має підтримувати цю функцію. Так, наприклад, стиснення текстур S3 (S3TC) доступне тільки для планшетів на основі Tegra . Більшість браузерів роблять контекст WebGL доступним через контекстне ім'я webgl, але старішим також потрібно experimental-webgl. Крім того, майбутній WebGL 2 повністю сумісний і матиме ім'я контексту webgl2.

- -

Зауваження Gecko

- -

Налагодження і тестування WebGL

- -

Починаючи з Gecko 10.0 {{geckoRelease("10.0")}}, є дві доступні опції, які дозволяють контролювати можливості WebGL з метою тестування:

- -
-
webgl.min_capability_mode
-
Властивість типу Boolean яка, коли true, вмикає режим мінімальної сумісності. Коли WebGL знаходиться в даному режимі, він налаштований підтримувати тільки мінімальний набір функцій і можливостей, необхідних специфікації WebGL. Це дозволяє вам бути впевненими, що важ WebGL код буде працювати на будь-якому пристрої або веб-переглядачі, незалежно від інших можливостей. Має значення false за замовчування.
-
webgl.disable_extensions
-
Властивість типу Boolean яка, коли true, вимикає всі розширення WebGL. Має значення false за замовчуванням.
-
- -

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

- - diff --git a/files/uk/web/api/websocket/index.html b/files/uk/web/api/websocket/index.html deleted file mode 100644 index e2dac93e8c..0000000000 --- a/files/uk/web/api/websocket/index.html +++ /dev/null @@ -1,330 +0,0 @@ ---- -title: WebSocket -slug: Web/API/WebSocket -translation_of: Web/API/WebSocket ---- -
{{APIRef("Web Sockets API")}}{{SeeCompatTable}}
- -

Об'єкт WebSocket надає API (інтерфейс) для створення і керування  WebSocket-з'єднаннями з сервером connection to a server, а також для надсилання і отримання повідомлень з даними.

- -

Конструктор WebSocket приймає один обов'язковий і один опціональний параметр:

- -
new WebSocket(
-  in DOMString url,
-  in optional DOMString protocols
-);
-
- -
-
url
-
Це адреса URL, до якої треба підключитись. Тобто адреса, з якої буде відповідати WebSocket на сервері.
-
protocols {{optional_inline}}
-
Це один протокол або масив протоколів. Протокол - це текст. Ці протоколи потрібні, щоб вказати під-протоколи, щоб один сервер міг виконувати декілька під-протоколів WebSocket (на приклад, вам потрібен сервер, який здатний працювати з різними типами взаємодій залежно від протоколу). Якщо ви не вкажете протокол, то WebSocket буде вважати, що отримав пустий рядок.
-
- -

Конструктор може повертати помилки. На прикладі нижче помилка про "порт, до якого була спроба підключитися, був заблокований":

- -
-
SECURITY_ERR
-
The port to which the connection is being attempted is being blocked.
-
- -

Method overview

- - - - - - - - - - -
void close(in optional unsigned long code, in optional DOMString reason);
void send(in DOMString data);
- -

Attributes

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
AttributeTypeDescription
binaryType{{DOMXref("DOMString")}}A string indicating the type of binary data being transmitted by the connection. This should be either "blob" if DOM {{domxref("Blob")}} objects are being used or "arraybuffer" if {{jsxref("ArrayBuffer")}} objects are being used.
bufferedAmountunsigned longThe number of bytes of data that have been queued using calls to {{manch("send")}} but not yet transmitted to the network. This value resets to zero once all queued data has been sent. This value does not reset to zero when the connection is closed; if you keep calling {{manch("send")}}, this will continue to climb. Read only
extensions{{DOMXref("DOMString")}}The extensions selected by the server. This is currently only the empty string or a list of extensions as negotiated by the connection.
onclose{{domxref("EventListener")}}An event listener to be called when the WebSocket connection's readyState changes to CLOSED. The listener receives a CloseEvent named "close".
onerror{{domxref("EventListener")}}An event listener to be called when an error occurs. This is a simple event named "error".
onmessage{{domxref("EventListener")}}An event listener to be called when a message is received from the server. The listener receives a MessageEvent named "message".
onopen{{domxref("EventListener")}}An event listener to be called when the WebSocket connection's readyState changes to OPEN; this indicates that the connection is ready to send and receive data. The event is a simple one with the name "open".
protocol{{DOMXref("DOMString")}}A string indicating the name of the sub-protocol the server selected; this will be one of the strings specified in the protocols parameter when creating the WebSocket object.
readyStateunsigned shortThe current state of the connection; this is one of the {{anch("Ready state constants")}}. Read only.
url{{DOMXref("DOMString")}}The URL as resolved by the constructor. This is always an absolute URL. Read only.
- -

Constants

- -

Ready state constants

- -

These constants are used by the readyState attribute to describe the state of the WebSocket connection.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ConstantValueDescription
CONNECTING0The connection is not yet open.
OPEN1The connection is open and ready to communicate.
CLOSING2The connection is in the process of closing.
CLOSED3The connection is closed or couldn't be opened.
- -

Methods

- -

close()

- -

Closes the WebSocket connection or connection attempt, if any. If the connection is already CLOSED, this method does nothing.

- -
void close(
-  in optional unsigned short code,
-  in optional DOMString reason
-);
-
- -

Parameters

- -
-
code {{optional_inline}}
-
A numeric value indicating the status code explaining why the connection is being closed. If this parameter is not specified, a default value of 1000 (indicating a normal "transaction complete" closure) is assumed. See the list of status codes on the CloseEvent page for permitted values.
-
reason {{optional_inline}}
-
A human-readable string explaining why the connection is closing. This string must be no longer than 123 bytes of UTF-8 text (not characters).
-
- -

Exceptions thrown

- -
-
INVALID_ACCESS_ERR
-
An invalid code was specified.
-
SYNTAX_ERR
-
The reason string is too long or contains unpaired surrogates.
-
- -
-

Note: In Gecko, this method didn't support any parameters prior to Gecko 8.0 {{geckoRelease("8.0")}}.

-
- -

send()

- -

Transmits data to the server over the WebSocket connection.

- -
void send(
-  in DOMString data
-);
-
-void send(
-  in ArrayBuffer data
-);
-
-void send(
-  in Blob data
-);
-
- -

Parameters

- -
-
data
-
A text string to send to the server.
-
- -

Exceptions thrown

- -
-
INVALID_STATE_ERR
-
The connection is not currently OPEN.
-
SYNTAX_ERR
-
The data is a string that has unpaired surrogates.
-
- -
-

Note: Gecko's implementation of the send() method differs somewhat from the specification in {{Gecko("6.0")}}; Gecko returns a boolean indicating whether or not the connection is still open (and, by extension, that the data was successfully queued or transmitted); this is corrected in {{Gecko("8.0")}}.

- -

As of {{Gecko("11.0")}}, support for {{jsxref("ArrayBuffer")}} is implemented but not {{domxref("Blob")}} data types.

-
- -

Example

- -
// Create WebSocket connection.
-const socket = new WebSocket('ws://localhost:8080');
-
-// Connection opened
-socket.addEventListener('open', function (event) {
-    socket.send('Hello Server!');
-});
-
-// Listen for messages
-socket.addEventListener('message', function (event) {
-    console.log('Message from server', event.data);
-});
- -

Specifications

- - - - - - - - - - - - - - -
SpecificationStatusComment
{{SpecName("Websockets", "#the-websocket-interface", "WebSocket")}}{{Spec2("Websockets")}}Initial definition
- -

Browser compatibility

- -
{{CompatibilityTable}}
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FeatureChromeEdgeFirefox (Gecko)Internet ExplorerOperaSafari
Basic support{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatGeckoDesktop("2.0")}}[1]{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
Sub-protocol support{{CompatUnknown}}{{CompatUnknown}}{{CompatGeckoDesktop("6.0")}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FeatureAndroidEdgeFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Basic support{{CompatUnknown}}{{CompatVersionUnknown}}{{CompatGeckoMobile("7.0")}}[1]{{CompatUnknown}}{{CompatUnknown}}{{CompatVersionUnknown}}
Sub-protocol support{{CompatUnknown}}{{CompatUnknown}}{{CompatGeckoMobile("7.0")}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}
-
- -

[1] Starting in Gecko 6.0 {{geckoRelease("6.0")}}, the constructor is prefixed; you will need to use MozWebSocket(): var mySocket = new MozWebSocket("http://www.example.com/socketserver");

- -

The extensions attribute was not supported in Gecko until Gecko 8.0.

- -

Prior to Gecko 11.0 {{geckoRelease("11.0")}}, outbound messages sent using the send() method were limited to 16 MB. They can now be up to 2 GB in size.

- -

See also

- - diff --git a/files/uk/web/api/window/confirm/index.html b/files/uk/web/api/window/confirm/index.html deleted file mode 100644 index 61da2b0042..0000000000 --- a/files/uk/web/api/window/confirm/index.html +++ /dev/null @@ -1,69 +0,0 @@ ---- -title: Window.confirm() -slug: Web/API/Window/confirm -tags: - - API - - DOM - - Window - - confirm - - Посилання - - метод -translation_of: Web/API/Window/confirm ---- -
{{ApiRef("Window")}}
- -

Метод Window.confirm() показує модальний діалог з необов’язковим текстом та двома кнопками, Так та Відміна.

- -

Синтакс

- -
result = window.confirm(message);
-
- - - -

Приклад

- -
if (window.confirm("Do you really want to leave?")) {
-  window.open("exit.html", "Thanks for Visiting!");
-}
-
- -

Результат:

- -

firefox confirm
-  

- -

Нотатки

- -

The following text is shared between this article, DOM:window.prompt and DOM:window.alertДіалоги є модальними вікнами - вони запобігають доступу користувача до іншої частини програмного інтерфейсу аж до моменту закриття діалогу. Саме тому ви не маєте занадто часто використовувати жодну функцію, яка створює діалоги (чи модальні вікна). В будь якому разі, є хороші підстави не використовувати діалоги для підтверджень.

- -

Починаючи з Chrome {{CompatChrome(46.0)}} цей етод заблокований в межах {{htmlelement("iframe")}} доти, доки атрибут sandbox айфрейму не має значення allow-modal.

- -

{{gecko_minversion_inline("23.0")}} Цей аргумент є необов’язковим і не вимагається специфікацією.

- -

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

- - - - - - - - - - - - - - -
СпецифікаціяСтатусКоментар
{{SpecName('HTML WHATWG', 'timers-and-user-prompts.html#dom-confirm', 'confirm()')}}{{Spec2('HTML WHATWG')}} 
- -

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

- - diff --git a/files/uk/web/api/window/console/index.html b/files/uk/web/api/window/console/index.html deleted file mode 100644 index bb1cc673b9..0000000000 --- a/files/uk/web/api/window/console/index.html +++ /dev/null @@ -1,56 +0,0 @@ ---- -title: Window.console -slug: Web/API/Window/console -tags: - - API - - Property - - Read-only - - Window - - console - - Посилання -translation_of: Web/API/Window/console ---- -

{{ APIRef }}

- -

Window.console — це незмінювана (read-only) властивість, що повертає посилання на об’єкт {{domxref("Console")}}, який надає методи для логування інформацію до консолі браузера. Ці методи призначені для відлагоджування і не мають використовуватися для передачі інформації кінцевому користувачу.

- -

Синтакс

- -
var consoleObj = window.console;
-
- -

Приклад

- -

Логування до консолі

- -

Перший приклад відправляє текст до консолі браузера.

- -
console.log("An error occurred while loading the content");
-
- -

Наступний приклад відправляє текст до консолі браузера, разом з полями об’єкта, які можуть розкриватися:

- -
console.dir(someObject);
- -

Дивіться {{SectionOnPage("/en-US/docs/Web/API/Console", "Usage")}} для перегляду інших прикладів.

- -

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

- - - - - - - - - - - - - - -
СпецифікаціяСтатусКоментар
{{SpecName('Console API')}}{{Spec2('Console API')}}Initial definition.
- -
-

Наразі існує багато імплементацій, що відрізняються залежно від браузера, однак триває робота щодо уніфікації і міжбраузерної  консистентності.

-
diff --git a/files/uk/web/api/window/domcontentloaded_event/index.html b/files/uk/web/api/window/domcontentloaded_event/index.html deleted file mode 100644 index c6e14d17a4..0000000000 --- a/files/uk/web/api/window/domcontentloaded_event/index.html +++ /dev/null @@ -1,153 +0,0 @@ ---- -title: DOMContentLoaded -slug: Web/API/Window/DOMContentLoaded_event -translation_of: Web/API/Window/DOMContentLoaded_event -original_slug: Web/Events/DOMContentLoaded ---- -

Подія DOMContentLoaded викликається, коли вихідний HTML документ повністю завантажився та був розібраний (parse), без очікування повного завантаження стилів, зображень, сабфреймів (subframes). Зовсім інша подія - load - має використовуватися лише для того, щоб визначити повне завантаження сторінки. Використання load там, де застосування DOMContentLoaded є більш доречним, є дуже поширеною помилкою, тому будьте уважними.

- -

{{Note("Синхронний Javascript затримує парсинг DOM.")}}

- -

{{Note("Існує безліч універсальних та автономних бібліотек, які  попонують кроссбраузерні методи для визначення готовності DOM.")}}

- -

Прискорення

- -

Якщо ви хочете, щоб DOM був розібраним (got parsed) якомога швидше після того, як користувач зробив запит сторінки, ви можете зробити ваш JavaScript асинхронним та оптимізувати завантаження стилів. Якщо цього не зробити, це сповільнить завантаження сторінки через те, що воно буде відбуватися паралельно і марнувати трафік у головного html документа.

- -

Основна інформація

- -
-
Специфікація
-
HTML5
-
Інтерфейс
-
Подія
-
Спливання
-
Так
-
Можливість скасування
-
Так (однак скасування як простої події скасувати не можна)
-
 
-
 
-
 
-
 
-
Ціль
-
Документ
-
Типова дія
-
Немає.
-
- -

Властивості

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ВластивістьТипОпис
target {{readonlyInline}}{{domxref("EventTarget")}}The event target (the topmost target in the DOM tree).
type {{readonlyInline}}{{domxref("DOMString")}}The type of event.
bubbles {{readonlyInline}}{{jsxref("Boolean")}}Whether the event normally bubbles or not.
cancelable {{readonlyInline}}{{jsxref("Boolean")}}Whether the event is cancellable or not.
- -

Приклад

- -
<script>
-  document.addEventListener("DOMContentLoaded", function(event) {
-    console.log("DOM fully loaded and parsed");
-  });
-</script>
-
- -
<script>
-  document.addEventListener("DOMContentLoaded", function(event) {
-    console.log("DOM fully loaded and parsed");
-  });
-
-for(var i=0; i<1000000000; i++)
-{} // this synchronous script is going to delay parsing of the DOM. So the DOMContentLoaded event is going to launch later.
-</script>
-
- -

Сумісність з браузерами

- -

{{CompatibilityTable}}

- -
- - - - - - - - - - - - - - - - - - - -
FeatureChromeFirefox (Gecko)Internet ExplorerOperaSafari
Basic support1.0[1]{{CompatGeckoDesktop("1")}}[1]9.0[2]9.03.1[1]
-
- -
- - - - - - - - - - - - - - - - - - - -
FeatureAndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Basic support{{CompatVersionUnknown}}[1]{{CompatGeckoMobile("1")}}[1]{{CompatUnknown}}[2]{{CompatVersionUnknown}}{{CompatVersionUnknown}}[1]
-
- -

[1] Bubbling для цієї події підтримується принаймні Gecko 1.9.2, Chrome 6, and Safari 4.

- -

[2] Internet Explorer 8 підтримує подію readystatechange , яка може використовуватися для того, щоб визначити чи готовий DOM. У більш ранніх версіях Internet Explorer цей стан може бути визначений повторними спробами виконання document.documentElement.doScroll("left");,  так як цей фрагмент коду буде генерувати помилку, поки DOM не буде готовий.

- -

Подібні події

- - diff --git a/files/uk/web/api/window/history/index.html b/files/uk/web/api/window/history/index.html deleted file mode 100644 index 208b453c09..0000000000 --- a/files/uk/web/api/window/history/index.html +++ /dev/null @@ -1,63 +0,0 @@ ---- -title: Window.history -slug: Web/API/Window/history -tags: - - API - - History API - - Property - - Reference - - Window -translation_of: Web/API/Window/history ---- -

{{ APIRef }}

- -

Window.history - це незмінювана (read-only) властивість, що повертає посилання на об'єкт {{domxref("History")}}, який надає інтерфейс для керування історією сеансу браузера (сторінки, відвіданій на вкладці або фреймі, в якому завантажена поточна сторінка ).

- -

Дивіться Manipulating the browser history для прикладів і деталей. Зокрема, у цій статті пояснюються особливості безпеки методів pushState() та replaceState(), з якими вам варто ознайомитися, перш ніж їх використовувати.

- -

Синтакс

- -
var historyObj = window.history;
-
- -

Приклад

- -
history.back();     // еквівалентно настиканню кнопки назад
-history.go(-1);     // еквівалентно history.back();
-
- -

Примітки

- -

Для сторінок верхнього рівня ви можете побачити список сторінок в історії сеансу, доступних через об'єкт History, у випадаючих списках браузера поруч із кнопками вперед і назад.

- -

З міркуваннь безпеки, об'єкт History не дає доступу непривілейованого коду до URL-адрес інших сторінок в історії сеансів, але дозволяє переміщатися по історії сеансу

- -

Неможливо очистити історію сеансу або вимкнути навігацію кнопок вперед/назад з непривілейованого коду. Найближчим доступним рішенням є метод location.replace(), який замінює поточний елемент історії сеансу наданим URL.

- -

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

- - - - - - - - - - - - - - - - - - - -
СпецифікаціяСтатусКоментар
{{SpecName('HTML WHATWG', 'browsers.html#the-history-interface', 'The History interface')}}{{Spec2('HTML WHATWG')}} 
{{SpecName('HTML5 W3C', 'browsers.html#the-history-interface', 'The History interface')}}{{Spec2('HTML5 W3C')}} 
- -

Підтримка веб-переглядачами

- - - -

{{Compat("api.Window.history")}}

diff --git a/files/uk/web/api/window/index.html b/files/uk/web/api/window/index.html deleted file mode 100644 index 1c07ee4aa4..0000000000 --- a/files/uk/web/api/window/index.html +++ /dev/null @@ -1,460 +0,0 @@ ---- -title: Window -slug: Web/API/Window -tags: - - API - - DOM - - Interface - - JavaScript - - NeedsTranslation - - Reference - - TopicStub - - Window -translation_of: Web/API/Window ---- -

{{APIRef}}

- -

The window object represents a window containing a DOM document; the document property points to the DOM document loaded in that window. A window for a given document can be obtained using the {{Domxref("document.defaultView")}} property.

- -

This section provides a brief reference for all of the methods, properties, and events available through the DOM window object. The window object implements the Window interface, which in turn inherits from the AbstractView interface. Some additional global functions, namespaces, objects, interfaces, and constructors, not typically associated with the window, but available on it, are listed in the JavaScript Reference and DOM Reference.

- -

In a tabbed browser, such as Firefox, each tab contains its own window object (and if you're writing an extension, the browser window itself is a separate window too - see Working with windows in chrome code for more information). That is, the window object is not shared between tabs in the same window. Some methods, namely {{Domxref("window.resizeTo")}} and {{Domxref("window.resizeBy")}} apply to the whole window and not to the specific tab the window object belongs to. Generally, anything that can't reasonably pertain to a tab pertains to the window instead.

- -

Properties

- -

This interface inherits properties from the {{domxref("EventTarget")}} interface and implements properties from the {{domxref("WindowOrWorkerGlobalScope")}} and {{domxref("WindowEventHandlers")}} mixins.

- -

Note that properties which are objects (e.g.,. for overriding the prototype of built-in elements) are listed in a separate section below.

- -
-
{{domxref("Window.applicationCache")}}  {{readOnlyInline}} {{gecko_minversion_inline("1.9")}}
-
An {{domxref("OfflineResourceList")}} object providing access to the offline resources for the window.
-
{{domxref("Window.closed")}} {{Non-standard_inline}}{{readOnlyInline}}
-
This property indicates whether the current window is closed or not.
-
{{domxref("Window.Components")}} {{Non-standard_inline}}
-
The entry point to many XPCOM features. Some properties, e.g. classes, are only available to sufficiently privileged code. Web code should not use this property.
-
{{domxref("Window.console")}} {{ReadOnlyInline}}
-
Returns a reference to the console object which provides access to the browser's debugging console.
-
{{domxref("Window.content")}} and Window._content {{Non-standard_inline}} {{obsolete_inline}}{{ReadOnlyInline}}
-
Returns a reference to the content element in the current window. The obsolete variant with underscore is no longer available from Web content.
-
{{domxref("Window.controllers")}}{{non-standard_inline}}{{ReadOnlyInline}}
-
Returns the XUL controller objects for the current chrome window.
-
{{domxref("Window.crypto")}} {{readOnlyInline}}
-
Returns the browser crypto object.
-
{{domxref("Window.defaultStatus")}} {{Obsolete_inline("gecko23")}}
-
Gets/sets the status bar text for the given window.
-
{{domxref("Window.devicePixelRatio")}} {{non-standard_inline}}{{ReadOnlyInline}}
-
Returns the ratio between physical pixels and device independent pixels in the current display.
-
{{domxref("Window.dialogArguments")}} {{ReadOnlyInline}}
-
Gets the arguments passed to the window (if it's a dialog box) at the time {{domxref("window.showModalDialog()")}} was called. This is an {{Interface("nsIArray")}}.
-
{{domxref("Window.directories")}} {{obsolete_inline}}
-
Synonym of {{domxref("window.personalbar")}}
-
{{domxref("Window.document")}} {{ReadOnlyInline}}
-
Returns a reference to the document that the window contains.
-
{{domxref("Window.frameElement")}} {{readOnlyInline}}
-
Returns the element in which the window is embedded, or null if the window is not embedded.
-
{{domxref("Window.frames")}} {{readOnlyInline}}
-
Returns an array of the subframes in the current window.
-
{{domxref("Window.fullScreen")}} {{gecko_minversion_inline("1.9")}}
-
This property indicates whether the window is displayed in full screen or not.
-
{{domxref("Window.globalStorage")}} {{gecko_minversion_inline("1.8.1")}} {{Non-standard_inline}} {{Obsolete_inline("gecko13")}}
-
Unsupported since Gecko 13 (Firefox 13). Use {{domxref("Window.localStorage")}} instead.
- Was: Multiple storage objects that are used for storing data across multiple pages.
-
{{domxref("Window.history")}} {{ReadOnlyInline}}
-
Returns a reference to the history object.
-
{{domxref("Window.innerHeight")}}
-
Gets the height of the content area of the browser window including, if rendered, the horizontal scrollbar.
-
{{domxref("Window.innerWidth")}}
-
Gets the width of the content area of the browser window including, if rendered, the vertical scrollbar.
-
{{domxref("Window.isSecureContext")}} {{readOnlyInline}}
-
Indicates whether a context is capable of using features that require secure contexts.
-
{{domxref("Window.length")}} {{readOnlyInline}}
-
Returns the number of frames in the window. See also {{domxref("window.frames")}}.
-
{{domxref("Window.location")}} {{ReadOnlyInline}}
-
Gets/sets the location, or current URL, of the window object.
-
{{domxref("Window.locationbar")}} {{ReadOnlyInline}}
-
Returns the locationbar object, whose visibility can be toggled in the window.
-
{{domxref("Window.localStorage")}} {{readOnlyInline}}{{gecko_minversion_inline("1.9.1")}}
-
Returns a reference to the local storage object used to store data that may only be accessed by the origin that created it.
-
{{domxref("Window.menubar")}} {{ReadOnlyInline}}
-
Returns the menubar object, whose visibility can be toggled in the window.
-
{{domxref("Window.messageManager")}} {{gecko_minversion_inline("2.0")}}
-
Returns the message manager object for this window.
-
{{domxref("Window.mozAnimationStartTime")}} {{ReadOnlyInline}}{{gecko_minversion_inline("2.0")}}
-
The time in milliseconds since epoch at which the current animation cycle began.
-
{{domxref("Window.mozInnerScreenX")}} {{ReadOnlyInline}}{{non-standard_inline}}{{gecko_minversion_inline("1.9.2")}}
-
Returns the horizontal (X) coordinate of the top-left corner of the window's viewport, in screen coordinates. This value is reported in CSS pixels. See mozScreenPixelsPerCSSPixel in {{interface("nsIDOMWindowUtils")}} for a conversion factor to adapt to screen pixels if needed.
-
{{domxref("Window.mozInnerScreenY")}} {{ReadOnlyInline}} {{non-standard_inline}}{{gecko_minversion_inline("1.9.2")}}
-
Returns the vertical (Y) coordinate of the top-left corner of the window's viewport, in screen coordinates. This value is reported in CSS pixels. See mozScreenPixelsPerCSSPixel for a conversion factor to adapt to screen pixels if needed.
-
{{domxref("Window.mozPaintCount")}} {{non-standard_inline}}{{ReadOnlyInline}} {{gecko_minversion_inline("2.0")}}
-
Returns the number of times the current document has been rendered to the screen in this window. This can be used to compute rendering performance.
-
{{domxref("Window.name")}}
-
Gets/sets the name of the window.
-
{{domxref("Window.navigator")}} {{readOnlyInline}}
-
Returns a reference to the navigator object.
-
{{domxref("Window.opener")}}
-
Returns a reference to the window that opened this current window.
-
{{domxref("Window.orientation")}}{{non-standard_inline}}{{deprecated_inline}}{{readOnlyInline}}
-
Returns the orientation in degrees (in 90 degree increments) of the viewport relative to the device's natural orientation.
-
{{domxref("Window.outerHeight")}} {{readOnlyInline}}
-
Gets the height of the outside of the browser window.
-
{{domxref("Window.outerWidth")}} {{readOnlyInline}}
-
Gets the width of the outside of the browser window.
-
{{domxref("Window.scrollX","Window.pageXOffset")}} {{readOnlyInline}}
-
An alias for {{domxref("window.scrollX")}}.
-
{{domxref("Window.scrollY","Window.pageYOffset")}}{{readOnlyInline}}
-
An alias for {{domxref("window.scrollY")}}
-
{{domxref("Window.sessionStorage")}} {{readOnlyInline}}
-
Returns a reference to the session storage object used to store data that may only be accessed by the origin that created it.
-
{{domxref("Window.parent")}} {{readOnlyInline}}
-
Returns a reference to the parent of the current window or subframe.
-
{{domxref("Window.performance")}} {{readOnlyInline}}
-
Provides a hosting area for performance related attributes.
-
{{domxref("Window.personalbar")}} {{readOnlyInline}}
-
Returns the personalbar object, whose visibility can be toggled in the window.
-
{{domxref("Window.pkcs11")}} {{obsolete_inline(29)}}
-
Formerly provided access to install and remove PKCS11 modules.
-
{{domxref("Window.returnValue")}}
-
The return value to be returned to the function that called {{domxref("window.showModalDialog()")}} to display the window as a modal dialog.
-
{{domxref("Window.screen")}} {{readOnlyInline}}
-
Returns a reference to the screen object associated with the window.
- -
{{domxref("Window.screenX")}} {{readOnlyInline}}
-
Returns the horizontal distance of the left border of the user's browser from the left side of the screen.
-
{{domxref("Window.screenY")}} {{readOnlyInline}}
-
Returns the vertical distance of the top border of the user's browser from the top side of the screen.
-
{{domxref("Window.scrollbars")}} {{readOnlyInline}}
-
Returns the scrollbars object, whose visibility can be toggled in the window.
-
{{domxref("Window.scrollMaxX")}}{{non-standard_inline}}{{ReadOnlyInline}}
-
The maximum offset that the window can be scrolled to horizontally, that is the document width minus the viewport width.
-
{{domxref("Window.scrollMaxY")}}{{non-standard_inline}}{{ReadOnlyInline}}
-
The maximum offset that the window can be scrolled to vertically (i.e., the document height minus the viewport height).
-
{{domxref("Window.scrollX")}} {{readOnlyInline}}
-
Returns the number of pixels that the document has already been scrolled horizontally.
-
{{domxref("Window.scrollY")}} {{readOnlyInline}}
-
Returns the number of pixels that the document has already been scrolled vertically.
-
{{domxref("Window.self")}} {{ReadOnlyInline}}
-
Returns an object reference to the window object itself.
-
{{domxref("Window.sessionStorage")}}
-
Returns a storage object for storing data within a single page session.
-
{{domxref("Window.sidebar")}} {{non-standard_inline}}{{ReadOnlyInline}}
-
Returns a reference to the window object of the sidebar.
-
{{domxref("Window.speechSynthesis")}} {{ReadOnlyInline}}
-
Returns a {{domxref("SpeechSynthesis")}} object, which is the entry point into using Web Speech API speech synthesis functionality.
-
{{domxref("Window.status")}}
-
Gets/sets the text in the statusbar at the bottom of the browser.
-
{{domxref("Window.statusbar")}} {{readOnlyInline}}
-
Returns the statusbar object, whose visibility can be toggled in the window.
-
{{domxref("Window.toolbar")}} {{readOnlyInline}}
-
Returns the toolbar object, whose visibility can be toggled in the window.
-
{{domxref("Window.top")}} {{readOnlyInline}}
-
Returns a reference to the topmost window in the window hierarchy. This property is read only.
-
{{domxref("Window.window")}} {{ReadOnlyInline}}
-
Returns a reference to the current window.
-
window[0], window[1], etc.
-
Returns a reference to the window object in the frames. See {{domxref("Window.frames")}} for more details.
-
- -

Properties implemented from elsewhere

- -
-
{{domxref("WindowOrWorkerGlobalScope.caches")}} {{readOnlyinline}}
-
Returns the {{domxref("CacheStorage")}} object associated with the current context. This object enables functionality such as storing assets for offline use, and generating custom responses to requests.
-
{{domxref("WindowOrWorkerGlobalScope.indexedDB")}} {{readonlyInline}}
-
Provides a mechanism for applications to asynchronously access capabilities of indexed databases; returns an {{domxref("IDBFactory")}} object.
-
{{domxref("WindowOrWorkerGlobalScope.isSecureContext")}} {{readOnlyinline}}
-
Returns a boolean indicating whether the current context is secure (true) or not (false).
-
{{domxref("WindowOrWorkerGlobalScope.origin")}} {{readOnlyinline}}
-
Returns the global object's origin, serialized as a string. (This does not yet appear to be implemented in any browser.)
-
- -

Methods

- -

This interface inherits methods from the {{domxref("EventTarget")}} interface and implements methods from {{domxref("WindowOrWorkerGlobalScope")}} and {{domxref("EventTarget")}}.

- -
-
{{domxref("Window.alert()")}}
-
Displays an alert dialog.
- -
{{domxref("Window.back()")}} {{Non-standard_inline}} {{obsolete_inline}}
-
Moves back one in the window history.
-
{{domxref("Window.blur()")}}
-
Sets focus away from the window.
-
{{domxref("Window.cancelIdleCallback()")}} {{experimental_inline}}
-
Enables you to cancel a callback previously scheduled with {{domxref("Window.requestIdleCallback")}}.
-
{{domxref("Window.captureEvents()")}} {{Deprecated_inline}}
-
Registers the window to capture all events of the specified type.
-
{{domxref("Window.clearImmediate()")}}
-
Cancels the repeated execution set using setImmediate.
-
{{domxref("Window.close()")}}
-
Closes the current window.
-
{{domxref("Window.confirm()")}}
-
Displays a dialog with a message that the user needs to respond to.
-
{{domxref("Window.disableExternalCapture()")}} {{obsolete_inline(24)}}
-
{{todo("NeedsContents")}}
-
{{domxref("Window.dispatchEvent()")}}
-
Used to trigger an event.
-
{{domxref("Window.dump()")}}
-
Writes a message to the console.
-
{{domxref("Window.enableExternalCapture()")}} {{obsolete_inline(24)}}
-
{{todo("NeedsContents")}}
-
{{domxref("Window.find()")}}
-
Searches for a given string in a window.
-
{{domxref("Window.focus()")}}
-
Sets focus on the current window.
-
{{domxref("Window.forward()")}} {{Non-standard_inline}} {{obsolete_inline}}
-
Moves the window one document forward in the history.
-
{{domxref("Window.getAttention()")}}
-
Flashes the application icon.
-
{{domxref("Window.getAttentionWithCycleCount()")}}
-
{{todo("NeedsContents")}}
-
{{domxref("Window.getComputedStyle()")}}
-
Gets computed style for the specified element. Computed style indicates the computed values of all CSS properties of the element.
-
{{domxref("Window.getDefaultComputedStyle()")}} {{Non-standard_inline}}
-
Gets default computed style for the specified element, ignoring author stylesheets.
-
{{domxref("Window.getSelection()")}}
-
Returns the selection object representing the selected item(s).
-
{{domxref("Window.home()")}} {{Non-standard_inline}} {{obsolete_inline}}
-
Returns the browser to the home page.
-
{{domxref("Window.matchMedia()")}} {{gecko_minversion_inline("6.0")}}
-
Returns a {{domxref("MediaQueryList")}} object representing the specified media query string.
-
{{domxref("Window.maximize()")}}
-
{{todo("NeedsContents")}}
-
{{domxref("Window.minimize()")}} (top-level XUL windows only)
-
Minimizes the window.
-
{{domxref("Window.moveBy()")}}
-
Moves the current window by a specified amount.
-
{{domxref("Window.moveTo()")}}
-
Moves the window to the specified coordinates.
-
{{domxref("Window.mozRequestAnimationFrame()")}} {{gecko_minversion_inline("2.0")}}
-
Tells the browser that an animation is in progress, requesting that the browser schedule a repaint of the window for the next animation frame. This will cause a MozBeforePaint event to fire before that repaint occurs.
-
{{domxref("Window.open()")}}
-
Opens a new window.
-
{{domxref("Window.openDialog()")}}
-
Opens a new dialog window.
-
{{domxref("Window.postMessage()")}}
-
Provides a secure means for one window to send a string of data to another window, which need not be within the same domain as the first.
-
{{domxref("Window.print()")}}
-
Opens the Print Dialog to print the current document.
-
{{domxref("Window.prompt()")}}
-
Returns the text entered by the user in a prompt dialog.
-
{{domxref("Window.releaseEvents()")}} {{Deprecated_inline}}
-
Releases the window from trapping events of a specific type.
-
{{domxref("Window.requestIdleCallback()")}}  {{experimental_inline}}
-
Enables the scheduling of tasks during a browser's idle periods.
-
{{domxref("Window.resizeBy()")}}
-
Resizes the current window by a certain amount.
-
{{domxref("Window.resizeTo()")}}
-
Dynamically resizes window.
-
{{domxref("Window.restore()")}}
-
{{todo("NeedsContents")}}
-
{{domxref("Window.routeEvent()")}} {{obsolete_inline(24)}}
-
{{todo("NeedsContents")}}
-
{{domxref("Window.scroll()")}}
-
Scrolls the window to a particular place in the document.
-
{{domxref("Window.scrollBy()")}}
-
Scrolls the document in the window by the given amount.
-
{{domxref("Window.scrollByLines()")}}
-
Scrolls the document by the given number of lines.
-
{{domxref("Window.scrollByPages()")}}
-
Scrolls the current document by the specified number of pages.
-
{{domxref("Window.scrollTo()")}}
-
Scrolls to a particular set of coordinates in the document.
-
{{domxref("Window.setCursor()")}}
-
Changes the cursor for the current window
-
{{domxref("Window.setImmediate()")}}
-
Executes a function after the browser has finished other heavy tasks
-
{{domxref("Window.setResizable()")}}
-
Toggles a user's ability to resize a window.
-
{{domxref("Window.showModalDialog()")}}
-
Displays a modal dialog.
-
{{domxref("Window.sizeToContent()")}}
-
Sizes the window according to its content.
-
{{domxref("Window.stop()")}}
-
This method stops window loading.
-
{{domxref("Window.updateCommands()")}}
-
Updates the state of commands of the current chrome window (UI).
-
- -

Methods implemented from elsewhere

- -
-
{{domxref("EventTarget.addEventListener()")}}
-
Register an event handler to a specific event type on the window.
-
{{domxref("WindowOrWorkerGlobalScope.atob()")}}
-
Decodes a string of data which has been encoded using base-64 encoding.
-
{{domxref("WindowOrWorkerGlobalScope.btoa()")}}
-
Creates a base-64 encoded ASCII string from a string of binary data.
-
{{domxref("WindowOrWorkerGlobalScope.clearInterval()")}}
-
Cancels the repeated execution set using {{domxref("WindowOrWorkerGlobalScope.setInterval()")}}.
-
{{domxref("WindowOrWorkerGlobalScope.clearTimeout()")}}
-
Cancels the delayed execution set using {{domxref("WindowOrWorkerGlobalScope.setTimeout()")}}.
-
{{domxref("WindowOrWorkerGlobalScope.createImageBitmap()")}}
-
Accepts a variety of different image sources, and returns a {{domxref("Promise")}} which resolves to an {{domxref("ImageBitmap")}}. Optionally the source is cropped to the rectangle of pixels originating at (sx, sy) with width sw, and height sh.
-
{{domxref("WindowOrWorkerGlobalScope.fetch()")}}
-
Starts the process of fetching a resource from the network.
-
{{domxref("EventTarget.removeEventListener")}}
-
Removes an event listener from the window.
-
{{domxref("WindowOrWorkerGlobalScope.setInterval()")}}
-
Schedules a function to execute every time a given number of milliseconds elapses.
-
{{domxref("WindowOrWorkerGlobalScope.setTimeout()")}}
-
Schedules a function to execute in a given amount of time.
-
- -

Event handlers

- -

These are properties of the window object that can be set to establish event handlers for the various things that can happen in the window that might be of interest.

- -

This interface inherits event handlers from the {{domxref("EventTarget")}} interface and implements event handlers from {{domxref("WindowEventHandlers")}}.

- -
-

Note: Starting in {{Gecko("9.0")}}, you can now use the syntax if ("onabort" in window) to determine whether or not a given event handler property exists. This is because event handler interfaces have been updated to be proper web IDL interfaces. See DOM event handlers for details.

-
- -
-
{{domxref("GlobalEventHandlers.onabort")}}
-
Called when the loading of a resource has been aborted, such as by a user canceling the load while it is still in progress
-
{{domxref("WindowEventHandlers.onafterprint")}}
-
Called when the print dialog box is closed. See {{event("afterprint")}} event.
-
{{domxref("WindowEventHandlers.onbeforeprint")}}
-
Called when the print dialog box is opened. See {{event("beforeprint")}} event.
-
{{domxref("Window.onbeforeinstallprompt")}}
-
An event handler property dispatched before a user is prompted to save a web site to a home screen on mobile.
-
{{domxref("WindowEventHandlers.onbeforeunload")}}
-
An event handler property for before-unload events on the window.
-
{{domxref("GlobalEventHandlers.onblur")}}
-
Called after the window loses focus, such as due to a popup.
-
{{domxref("GlobalEventHandlers.onchange")}}
-
An event handler property for change events on the window.
-
{{domxref("GlobalEventHandlers.onclick")}}
-
Called after the ANY mouse button is pressed & released
-
{{domxref("GlobalEventHandlers.ondblclick")}}
-
Called when a double click is made with ANY mouse button.
-
{{domxref("GlobalEventHandlers.onclose")}}
-
Called after the window is closed
-
{{domxref("GlobalEventHandlers.oncontextmenu")}}
-
Called when the RIGHT mouse button is pressed
-
{{domxref("Window.ondevicelight")}}
-
An event handler property for any ambient light levels changes
-
{{domxref("Window.ondevicemotion")}} {{gecko_minversion_inline("6.0")}}
-
Called if accelerometer detects a change (For mobile devices)
-
{{domxref("Window.ondeviceorientation")}} {{gecko_minversion_inline("6.0")}}
-
Called when the orientation is changed (For mobile devices)
-
{{domxref("Window.ondeviceorientationabsolute")}} {{non-standard_inline}} Chrome only
-
An event handler property for any device orientation changes.
-
{{domxref("Window.ondeviceproximity")}}
-
An event handler property for device proximity event
-
{{domxref("GlobalEventHandlers.onerror")}}
-
Called when a resource fails to load OR when an error occurs at runtime. See {{event("error")}} event.
-
{{domxref("GlobalEventHandlers.onfocus")}}
-
Called after the window receives or regains focus. See {{event("focus")}} events.
-
{{domxref("WindowEventHandlers.onhashchange")}} {{gecko_minversion_inline("1.9.2")}}
-
An event handler property for {{event('hashchange')}} events on the window; called when the part of the URL after the hash mark ("#") changes.
-
{{domxref("Window.onappinstalled")}}
-
Called when the page is installed as a webapp. See {{event('appinstalled')}} event.
-
{{domxref("Window.oninput")}}
-
Called when the value of an <input> element changes
-
{{domxref("GlobalEventHandlers.onkeydown")}}
-
Called when you begin pressing ANY key. See {{event("keydown")}} event.
-
{{domxref("GlobalEventHandlers.onkeypress")}}
-
Called when a key (except Shift, Fn, and CapsLock) is in pressed position. See {{event("keypress")}} event.
-
{{domxref("GlobalEventHandlers.onkeyup")}}
-
Called when you finish releasing ANY key. See {{event("keyup")}} event.
-
{{domxref("WindowEventHandlers.onlanguagechange")}}
-
An event handler property for {{event("languagechange")}} events on the window.
-
{{domxref("GlobalEventHandlers.onload")}}
-
Called after all resources and the DOM are fully loaded. WILL NOT get called when the page is loaded from cache, such as with back button.
-
{{domxref("WindowEventHandlers.onmessage")}}
-
Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("message")}} event is raised.
-
{{domxref("GlobalEventHandlers.onmousedown")}}
-
Called when ANY mouse button is pressed.
-
{{domxref("GlobalEventHandlers.onmousemove")}}
-
Called continously when the mouse is moved inside the window.
-
{{domxref("GlobalEventHandlers.onmouseout")}}
-
Called when the pointer leaves the window.
-
{{domxref("GlobalEventHandlers.onmouseover")}}
-
Called when the pointer enters the window
-
{{domxref("GlobalEventHandlers.onmouseup")}}
-
Called when ANY mouse button is released
-
{{domxref("Window.onmozbeforepaint")}} {{gecko_minversion_inline("2.0")}}
-
An event handler property for the MozBeforePaint event, which is sent before repainting the window if the event has been requested by a call to the {{domxref("Window.mozRequestAnimationFrame()")}} method.
-
{{domxref("WindowEventHandlers.onoffline")}}
-
Called when network connection is lost. See {{event("offline")}} event.
-
{{domxref("WindowEventHandlers.ononline")}}
-
Called when network connection is established. See {{event("online")}} event.
-
{{domxref("WindowEventHandlers.onpagehide")}}
-
Called when the user navigates away from the page, before the onunload event. See {{event("pagehide")}} event.
-
{{domxref("WindowEventHandlers.onpageshow")}}
-
Called after all resources and the DOM are fully loaded. See {{event("pageshow")}} event.
-
{{domxref("Window.onpaint")}}
-
An event handler property for paint events on the window.
-
{{domxref("WindowEventHandlers.onpopstate")}} {{gecko_minversion_inline("2.0")}}
-
Called when a back putton is pressed.
-
{{domxref("Window.onrejectionhandled")}} {{experimental_inline}}
-
An event handler for handled {{jsxref("Promise")}} rejection events.
-
{{domxref("GlobalEventHandlers.onreset")}}
-
Called when a form is reset
-
{{domxref("GlobalEventHandlers.onresize")}}
-
Called continuously as you are resizing the window.
-
{{domxref("GlobalEventHandlers.onscroll")}}
-
Called when the scroll bar is moved via ANY means. If the resource fully fits in the window, then this event cannot be invoked
-
{{domxref("GlobalEventHandlers.onwheel")}}
-
Called when the mouse wheel is rotated around any axis
-
{{domxref("GlobalEventHandlers.onselect")}}
-
Called after text in an input field is selected
-
{{domxref("GlobalEventHandlers.onselectionchange")}}
-
Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("selectionchange")}} event is raised.
-
{{domxref("WindowEventHandlers.onstorage")}}
-
Called when there is a change in session storage or local storage. See {{event("storage")}} event
-
{{domxref("GlobalEventHandlers.onsubmit")}}
-
Called when a form is submitted
-
{{domxref("WindowEventHandlers.onunhandledrejection")}} {{experimental_inline}}
-
An event handler for unhandled {{jsxref("Promise")}} rejection events.
-
{{domxref("WindowEventHandlers.onunload")}}
-
Called when the user navigates away from the page.
-
{{domxref("Window.onuserproximity")}}
-
An event handler property for user proximity events.
-
{{domxref("Window.onvrdisplayconnected")}} {{experimental_inline}}
-
Represents an event handler that will run when a compatible VR device has been connected to the computer (when the {{event("vrdisplayconnected")}} event fires).
-
{{domxref("Window.onvrdisplaydisconnected")}} {{experimental_inline}}
-
Represents an event handler that will run when a compatible VR device has been disconnected from the computer (when the {{event("vrdisplaydisconnected")}} event fires).
-
{{domxref("Window.onvrdisplaypresentchange")}} {{experimental_inline}}
-
represents an event handler that will run when the presenting state of a VR device changes — i.e. goes from presenting to not presenting, or vice versa (when the {{event("onvrdisplaypresentchange")}} event fires).
-
- -

Constructors

- -

See also the DOM Interfaces.

- -
-
{{domxref("Window.ConstantSourceNode")}}
-
Creates an instance of {{domxref("ConstantSourceNode")}}
-
{{domxref("Window.DOMParser")}}
-
{{todo("NeedsContents")}}
-
{{domxref("Window.GeckoActiveXObject")}}
-
{{todo("NeedsContents")}}
-
{{domxref("Image")}}
-
Used for creating an {{domxref("HTMLImageElement")}}.
-
{{domxref("Option")}}
-
Used for creating an {{domxref("HTMLOptionElement")}}
-
{{domxref("Window.QueryInterface")}}
-
{{todo("NeedsContents")}}
-
{{domxref("Window.XMLSerializer")}}
-
{{todo("NeedsContents")}}
-
{{domxref("Worker")}}
-
Used for creating a Web worker
-
{{domxref("Window.XPCNativeWrapper")}}
-
{{todo("NeedsContents")}}
-
{{domxref("Window.XPCSafeJSObjectWrapper")}}
-
{{todo("NeedsContents")}}
-
- -

Interfaces

- -

See DOM Reference

- -

See also

- - diff --git a/files/uk/web/api/window/localstorage/index.html b/files/uk/web/api/window/localstorage/index.html deleted file mode 100644 index 84401af92f..0000000000 --- a/files/uk/web/api/window/localstorage/index.html +++ /dev/null @@ -1,147 +0,0 @@ ---- -title: Window.localStorage -slug: Web/API/Window/localStorage -tags: - - API - - Property - - Web Storage - - Window - - Довідка -translation_of: Web/API/Window/localStorage ---- -

{{APIRef()}}

- -

Властивість localStorage надає доступ до об’єкта {{domxref("Storage")}}, пов'язаного з джерелом поточного {{domxref("Document", "документа")}}. Сховище localStorage є схожим на sessionStorage, але не має обмежень тривалості зберігання даних, тоді як дані sessionStorage видаляються по закритті сторінки (насправді, лише після закриття всіх сторінок з цього джерела, якщо їх кілька відкрито в переглядачі).

- -

Варто також зазначити, що сторінки, завантажені з різних джерел (важить все: ім'я хоста, порт, та навіть протокол — http/https), з міркувань безпеки мають незалежні окремі сховища, тож до даних одне одного доступу не мають.

- -

Синтакс

- -
myStorage = window.localStorage;
- -

Значення

- -

Об’єкт типу {{domxref("Storage")}}, який можна використовувати для доступу до чинного для поточної сторінки сховища.

- -

Винятки

- -
-
SecurityError
-
Виникає в разі порушення встановлених правил або коли джерелом сторінки є неприйнятний протокол/хост/порт (наприклад, коли протоколом джерела є file: чи data:). Зокрема, користувач може заборонити збереження даних з окремих джерел в налаштуваннях переглядача.
-
- -

Приклад

- -

Розгляньмо основні дії зі сховищем: запис, читання, видалення окремого ключа та повне очищення всього сховища.

- -

Цей приклад створює (чи змінює, якщо такий ключ вже існує) запис в чинному для поточної сторінки сховищі (через об'єкт типу {{domxref("Storage")}}) за допомогою метода {{domxref("Storage.setItem()", "setItem()")}}:

- -
localStorage.setItem('Кіт', 'Барсик');
- -

Дістати значення за ключем дозволяє метод {{domxref("Storage.getItem()", "getItem()")}}:

- -
var cat = localStorage.getItem('Кіт');
- -

Для видалення раніше створеного запису за його ключем існує метод {{domxref("Storage.removeItem()", "removeItem()")}}:

- -
localStorage.removeItem('Кіт');
- -

А для очищення сховища (видалення всіх створених записів) призначено метод {{domxref("Storage.clear()", "clear()")}}:

- -
localStorage.clear();
- -
-

Заувага: повний приклад див. у статті Використання Web Storage API.

-
- -

А тепер розгляньмо дещо змістовніший приклад:

- -
function clearCart() {
-  var count = parseInt(localStorage.getItem('cart-size')) || 0;
-  for (var i = 1; i <= count; i++) {
-    localStorage.removeItem('cart-item-' + i)
-  }
-  localStorage.removeItem('cart-size');
-}
-
-
-function addCartItem(itemId) {
-  var count = parseInt(localStorage.getItem('cart-size')) || 0;
-  localStorage.setItem('cart-item-' + (count + 1), itemId);
-  localStorage.setItem('cart-size', count + 1);
-}
-
-function getCartItems() {
-  var items = [];
-  var count = parseInt(localStorage.getItem('cart-size')) || 0;
-
-  for (var i = 1; i <= count; i++) {
-    var itemId = localStorage.getItem('cart-item-' + i);
-    items.push(parseInt(itemId));
-  }
-
-  return items;
-}
-
-
-addCartItem(111);
-addCartItem(222);
-
-console.log(getCartItems());  // виводить [111, 222]
-clearCart();
-console.log(getCartItems());  // виводить []
-
- -

Варто зауважити, що сховище працює лише з рядками (як ключ, так і значення мусить бути рядком, або його буде перетворено на рядок неявним викликом {{jsxref("Object.prototype.toString()", "toString()")}}). Тому для зберігання структурованих даних доведеться спершу подбати про їх перетворення в текстовий рядок — наприклад, JSON:

- -
function setLocalStorageObjectItem(key, value) {
-  if (value === undefined) {
-    localStorage.removeItem(key);
-  } else {
-    localStorage.setItem(key, JSON.stringify(value));
-  }
-}
-
-function getLocalStorageObjectItem(key) {
-  var json = localStorage.getItem(key);
-  if (json === undefined) {
-    return undefined;
-  }
-  return JSON.parse(json);
-}
-
-setLocalStorageObjectItem('foo', {a: {x: 123}});
-console.log(getLocalStorageObjectItem('foo'));  // виводить {a: {x: 123}}
-
- -

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

- - - - - - - - - - - - - - -
СпецифікаціяСтатусКоментар
{{SpecName('HTML WHATWG', 'webstorage.html#dom-localstorage', 'localStorage')}}{{Spec2('HTML WHATWG')}} 
- -

Підтримка веб-переглядачами

- - - -

{{Compat("api.Window.localStorage")}}

- -

Див. також

- - diff --git a/files/uk/web/api/window/rejectionhandled_event/index.html b/files/uk/web/api/window/rejectionhandled_event/index.html deleted file mode 100644 index f725917a75..0000000000 --- a/files/uk/web/api/window/rejectionhandled_event/index.html +++ /dev/null @@ -1,85 +0,0 @@ ---- -title: 'Window: подія rejectionhandled' -slug: Web/API/Window/rejectionhandled_event -tags: - - API - - Event - - HTML DOM - - JavaScript - - Promise - - Window - - Worker - - global - - onrejectionhandled - - rejectionhandled - - Проміс - - подія -translation_of: Web/API/Window/rejectionhandled_event ---- -
{{APIRef("HTML DOM")}}
- -

Подія rejectionhandled посилається у глобальну область видимості скрипта (зазвичай, {{domxref("window")}}, але також {{domxref("Worker")}}), коли відхиляється об'єкт JavaScript {{jsxref("Promise")}}, але після того, як відбулась обробка відхилення. Це можна використовувати для відлагодження та для загальної стійкості застосунка, в тандемі з подією {{domxref("Window.unhandledrejection_event", "unhandledrejection")}}, яка посилається, коли проміс був відхилений, але не існує обробника відхилення.

- - - - - - - - - - - - - - - - - - - - -
СпливаєНі
СкасовуєтьсяНі
Інтерфейс{{domxref("PromiseRejectionEvent")}}
Обробник події{{domxref("WindowEventHandlers.onrejectionhandled", "onrejectionhandled")}}
- -

Приклад

- -

Ви можете використовувати подію rejectionhandled, щоб залогувати проміси, які було відхилено, у консоль, разом з причинами відхилення:

- -
window.addEventListener("rejectionhandled", event => {
-  console.log("Проміс відхилено; причина: " + event.reason);
-}, false);
-
- -

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

- - - - - - - - - - - - - - - - -
СпецифікаціяСтатусКоментар
{{SpecName('HTML WHATWG', 'webappapis.html#unhandled-promise-rejections', 'rejectionhandled')}}{{Spec2('HTML WHATWG')}}Початкове визначення.
- -

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

- - - -

{{Compat("api.Window.rejectionhandled_event")}}

- -

Див. також

- - diff --git a/files/uk/web/api/window/self/index.html b/files/uk/web/api/window/self/index.html deleted file mode 100644 index 70c58d6faf..0000000000 --- a/files/uk/web/api/window/self/index.html +++ /dev/null @@ -1,70 +0,0 @@ ---- -title: Window.self -slug: Web/API/Window/self -tags: - - API - - HTML DOM - - Window - - Властивість -translation_of: Web/API/Window/self ---- -
{{APIRef}}
- -

Властивість Window.self, доступна лише для читання, повертає window як {{domxref("WindowProxy")}}. Її можна використовувати через крапку на об'єкті window (а саме, window.self) або автономно (self). Перевага автономного запису в тому, що схожий запис існує для не window контексту, наприклад у {{domxref("Worker", "Web Workers", "", 1)}}. Використовуючи self, ви можете звертатись до глобальної області видимості таким чином, що звернення працюватиме не лише в контексті window (self дорівнюватиме window.self), але також у контексті worker (тоді self дорівнюватиме {{domxref("WorkerGlobalScope.self")}}).

- -

Приклад

- -

Наступне використання window.self можна також замінити на window.

- -
if (window.parent.frames[0] != window.self) {
-    // це вікно не є першим фреймом у списку
-}
-
- -

Більше того, при використанні у активному документі контексту перегляду window - це посилання на поточний глобальний об'єкт, і таким чином, усе перечислене є еквівалентним:

- -
var w1 = window;
-var w2 = self;
-var w3 = window.window;
-var w4 = window.self;
-// w1, w2, w3, w4 є строго рівними, та лише w2 функціонуватиме у workers
-
- -

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

- - - - - - - - - - - - - - - - - - - - - - - - -
СпецифікаціяСтатусКоментар
{{SpecName('HTML WHATWG', '#dom-self', 'Window.self')}}{{Spec2('HTML WHATWG')}}Немає змін від останнього знімку {{SpecName("HTML5.1")}}
{{SpecName('HTML5.1', 'browsers.html#dom-self', 'Window.self')}}{{Spec2('HTML5.1')}}Немає змін від {{SpecName("HTML5 W3C")}}
{{SpecName('HTML5 W3C', 'browsers.html#dom-self', 'Window.self')}}{{Spec2('HTML5 W3C')}}Перший знімок, що містить визначення Window.self.
- -

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

- - - -

{{Compat("api.Window.self")}}

- -

Див. також

- - diff --git a/files/uk/web/api/window/unhandledrejection_event/index.html b/files/uk/web/api/window/unhandledrejection_event/index.html deleted file mode 100644 index 8f621c5ea9..0000000000 --- a/files/uk/web/api/window/unhandledrejection_event/index.html +++ /dev/null @@ -1,120 +0,0 @@ ---- -title: 'Window: подія unhandledrejection' -slug: Web/API/Window/unhandledrejection_event -tags: - - API - - Event - - HTML DOM - - JavaScript - - Promise - - Window - - Worker - - unhandledrejection - - Проміс - - відхилення - - подія -translation_of: Web/API/Window/unhandledrejection_event ---- -
{{APIRef("HTML DOM")}}
- -

Подія unhandledrejection посилається у глобальну область видимості скрипта, коли об'єкт JavaScript {{jsxref("Promise")}}, що не має обробника відхилення, відхиляється; зазвичай, це {{domxref("window")}}, але також може бути {{domxref("Worker")}}. Це корисно для відлагодження та для надання резервної обробки помилок у неочікуваних ситуаціях.

- - - - - - - - - - - - - - - - - - - - -
СпливаєНі
СкасовуєтьсяТак
Інтерфейс{{domxref("PromiseRejectionEvent")}}
Обробник подій{{domxref("WindowEventHandlers.onunhandledrejection", "onunhandledrejection")}}
- -

Примітки щодо використання

- -

Дозвіл події unhandledrejection спливати зрештою призведе до виводу повідомлення помилки у консолі. Ви можете запобігти цьому, викликавши {{domxref("Event.preventDefault", "preventDefault()")}} на інтерфейсі {{domxref("PromiseRejectionEvent")}}; дивіться приклад {{anch("Запобігання обробці за замовчуванням")}} нижче.

- -

Приклади

- -

Тут ми маємо кілька прикладів, які демонструють, як ви можете скористатись подією unhandledrejection. Подія містить деяку корисну інформацію:

- -
-
promise
-
Власне, {{jsxref("Promise","проміс")}}, який був відхилений, не маючи обробника, який зреагував би на відхилення.
-
reason
-
Причина, яка була б передана у обробник відхилення, якби він існував. Дивіться більше інформації у {{jsxref("Promise.catch", "catch()")}}.
-
- -

Базове логування помилки

- -

Цей приклад просто логує інформацію щодо необробленого відхилення проміса у консоль.

- -
window.addEventListener("unhandledrejection", event => {
-  console.warn(`НЕОБРОБЛЕНЕ ВІДХИЛЕННЯ ПРОМІСА: ${event.reason}`);
-});
-
- -

Ви також можете скористатись обробником подій {{domxref("WindowEventHandlers.onunhandledrejection", "onunhandledrejection")}}, щоб налаштувати прослуховувач подій:

- -
window.onunhandledrejection = event => {
-  console.warn(`НЕОБРОБЛЕНЕ ВІДХИЛЕННЯ ПРОМІСА: ${event.reason}`);
-};
-
- -

Запобігання обробці за замовчуванням

- -

Багато середовищ (таких як {{Glossary("Node.js")}}) за замовчуванням виводять необроблені відхилення промісів у консоль. Ви можете запобігти цьому, додавши обробник для подій unhandledrejection, що — на додачу до будь-яких інших задач, які ви бажаєте виконати — викликає {{domxref("Event.preventDefault()", "preventDefault()")}}, щоб скасувати подію, запобігаючи її спливанню та обробці кодом логування під час виконання. Це працює, тому що unhandledrejection скасовується.

- -
window.addEventListener('unhandledrejection', function (event) {
-  // ...тут ваш код, який обробляє необроблені відхилення...
-
-  // Запобігти обробці за замовчуванням (наприклад, виводу
-  // помилки у консоль)
-
-  event.preventDefault();
-});
-
- -

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

- - - - - - - - - - - - - - -
СпецифікаціяСтатусКоментар
{{SpecName('HTML WHATWG', 'webappapis.html#unhandled-promise-rejections', 'unhandledrejection')}}{{Spec2('HTML WHATWG')}}Початкове визначення.
- -

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

- - - -

{{Compat("api.Window.unhandledrejection_event")}}

- -

Див. також

- - - -

[1] Відповідний обробник подій визначений як властивість у домішці {{domxref("WindowEventHandlers")}}, яка доступна як у інтерфейсі {{domxref("Window")}}, так і в усіх типах інтерфейсів {{domxref("Worker")}}.

diff --git a/files/uk/web/api/windoweventhandlers/index.html b/files/uk/web/api/windoweventhandlers/index.html deleted file mode 100644 index cb37cc2a2c..0000000000 --- a/files/uk/web/api/windoweventhandlers/index.html +++ /dev/null @@ -1,105 +0,0 @@ ---- -title: WindowEventHandlers -slug: Web/API/WindowEventHandlers -tags: - - API - - HTML-DOM - - Interface - - Mixin - - NeedsTranslation - - Reference - - TopicStub - - WindowEventHandlers -translation_of: Web/API/WindowEventHandlers ---- -
{{APIRef("HTML DOM")}}
- -

The WindowEventHandlers mixin describes the event handlers common to several interfaces like {{domxref("Window")}}, or {{domxref("HTMLBodyElement")}} and {{domxref("HTMLFrameSetElement")}}. Each of these interfaces can implement additional specific event handlers.

- -
-

Note: WindowEventHandlers is a mixin and not an interface; you can't actually create an object of type WindowEventHandlers.

-
- -

Properties

- -

The events properties, of the form onXYZ, are defined on the {{domxref("WindowEventHandlers")}}, and implemented by {{domxref("Window")}}, and {{domxref("WorkerGlobalScope")}} for Web Workers.

- -
-
{{domxref("WindowEventHandlers.onafterprint")}}
-
Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("afterprint")}} event is raised.
-
{{domxref("WindowEventHandlers.onbeforeprint")}}
-
Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("beforeprint")}} event is raised.
-
{{domxref("WindowEventHandlers.onbeforeunload")}}
-
Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("beforeunload")}} event is raised.
-
{{domxref("WindowEventHandlers.onhashchange")}}
-
Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("hashchange")}} event is raised.
-
{{domxref("WindowEventHandlers.onlanguagechange")}} {{experimental_inline}}
-
Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("languagechange")}} event is raised.
-
{{domxref("WindowEventHandlers.onmessage")}}
-
Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("message")}} event is raised.
-
{{domxref("WindowEventHandlers.onmessageerror")}}
-
Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("MessageError")}} event is raised.
-
{{domxref("WindowEventHandlers.onoffline")}}
-
Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("offline")}} event is raised.
-
{{domxref("WindowEventHandlers.ononline")}}
-
Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("online")}} event is raised.
-
{{domxref("WindowEventHandlers.onpagehide")}}
-
Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("pagehide")}} event is raised.
-
{{domxref("WindowEventHandlers.onpageshow")}}
-
Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("pageshow")}} event is raised.
-
{{domxref("WindowEventHandlers.onpopstate")}}
-
Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("popstate")}} event is raised.
-
{{domxref("WindowEventHandlers.onrejectionhandled")}}
-
Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("rejectionhandled")}} event is raised, indicating that a {{jsxref("Promise")}} was rejected and the rejection has been handled.
-
{{domxref("WindowEventHandlers.onstorage")}}
-
Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("storage")}} event is raised.
-
{{domxref("WindowEventHandlers.onunhandledrejection")}}
-
Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("unhandledrejection")}} event is raised, indicating that a {{jsxref("Promise")}} was rejected but the rejection was not handled.
-
{{domxref("WindowEventHandlers.onunload")}}
-
Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("unload")}} event is raised.
-
- -

Methods

- -

This interface defines no method.

- -

Specifications

- - - - - - - - - - - - - - - - - - - - - - - - - - -
SpecificationStatusComment
{{SpecName('HTML WHATWG', '#windoweventhandlers', 'WindowEventHandlers')}}{{Spec2('HTML WHATWG')}}No change since the latest snapshot, {{SpecName("HTML5.1")}}.
{{SpecName('HTML5.1', '#windoweventhandlers', 'WindowEventHandlers')}}{{Spec2('HTML5.1')}}Snapshot of {{SpecName("HTML WHATWG")}}. Added onlanguage since the {{SpecName("HTML5 W3C")}} snapshot.
{{SpecName("HTML5 W3C", "#windoweventhandlers", "WindowEventHandlers")}}{{Spec2('HTML5 W3C')}}Snapshot of {{SpecName("HTML WHATWG")}}. Creation of WindowEventHandlers (properties where on the target before it).
- -

Browser compatibility

- - - -

{{Compat("api.WindowEventHandlers")}}

- -

See also

- - diff --git a/files/uk/web/api/windoweventhandlers/onrejectionhandled/index.html b/files/uk/web/api/windoweventhandlers/onrejectionhandled/index.html deleted file mode 100644 index 81cabc79bd..0000000000 --- a/files/uk/web/api/windoweventhandlers/onrejectionhandled/index.html +++ /dev/null @@ -1,52 +0,0 @@ ---- -title: WindowEventHandlers.onrejectionhandled -slug: Web/API/WindowEventHandlers/onrejectionhandled -tags: - - API - - HTML DOM - - JavaScript - - Promise - - WindowEventHandlers - - onrejectionhandled - - Обробник подій - - Проміс - - події -translation_of: Web/API/WindowEventHandlers/onrejectionhandled ---- -
{{APIRef}}
- -

Властивість onrejectionhandled домішки {{domxref("WindowEventHandlers")}} - це {{domxref("EventHandler")}} для обробки подій rejectionhandled. Ці події виникають, коли відхиляються об'єкти {{jsxref("Promise")}}.

- -

Синтаксис

- -
window.addEventListener("rejectionhandled", function(event) { ... });
-window.onrejectionhandled = function(event) { ...};
- -

Приклад

- -
window.onrejectionhandled = function(e) {
-  console.log(e.reason);
-}
- -

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

- - - - - - - - - - - - - - -
СпецифікаціяСтатусКоментар
{{SpecName('HTML WHATWG', 'webappapis.html#handler-window-onrejectionhandled', 'onrejectionhandled')}}{{Spec2('HTML WHATWG')}}Початкове визначення.
- -

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

- - - -

{{Compat("api.WindowEventHandlers.onrejectionhandled")}}

diff --git a/files/uk/web/api/windoweventhandlers/onunhandledrejection/index.html b/files/uk/web/api/windoweventhandlers/onunhandledrejection/index.html deleted file mode 100644 index 888297c406..0000000000 --- a/files/uk/web/api/windoweventhandlers/onunhandledrejection/index.html +++ /dev/null @@ -1,56 +0,0 @@ ---- -title: WindowEventHandlers.onunhandledrejection -slug: Web/API/WindowEventHandlers/onunhandledrejection -tags: - - API - - HTML DOM - - Promise - - WindowEventHandlers - - onunhandledrejection - - Властивість - - події - - проміси -translation_of: Web/API/WindowEventHandlers/onunhandledrejection ---- -
{{APIRef}}
- -

Властивість onunhandledrejection домішки {{domxref("WindowEventHandlers")}} - це {{domxref("EventHandler")}} для обробки подій unhandledrejection. Ці події виникають для необроблених відхилень об'єктів {{jsxref("Promise")}}.

- -

Синтаксис

- -
window.onunhandledrejection = function;
- -

Значення

- -

function - це {{domxref("EventHandler")}} або функція, яку треба викликати, коли вікно отримує події unhandledrejection. Обробник подій отримує вхідний параметр як {{domxref("PromiseRejectionEvent")}}.

- -

Приклади

- -

Цей приклад просто виводить у консоль значення reason (причина) необроблених відхилень.

- -
window.onunhandledrejection = function(e) {
-  console.log(e.reason);
-}
- -

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

- - - - - - - - - - - - - - -
СпецифікаціяСтатусКоментар
{{SpecName('HTML WHATWG', 'webappapis.html#handler-window-onunhandledrejection', 'onunhandledrejection')}}{{Spec2('HTML WHATWG')}}Початкове визначення.
- -

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

- - - -

{{Compat("api.WindowEventHandlers.onunhandledrejection")}}

diff --git a/files/uk/web/api/windoworworkerglobalscope/index.html b/files/uk/web/api/windoworworkerglobalscope/index.html deleted file mode 100644 index 0c8177dbaa..0000000000 --- a/files/uk/web/api/windoworworkerglobalscope/index.html +++ /dev/null @@ -1,189 +0,0 @@ ---- -title: WindowOrWorkerGlobalScope -slug: Web/API/WindowOrWorkerGlobalScope -tags: - - API - - DOM - - DOM API - - NeedsTranslation - - Service Worker - - TopicStub - - Window - - WindowOrWorkerGlobalScope - - Worker - - WorkerGlobalScope -translation_of: Web/API/WindowOrWorkerGlobalScope ---- -
{{ApiRef()}}
- -

The WindowOrWorkerGlobalScope mixin describes several features common to the {{domxref("Window")}} and {{domxref("WorkerGlobalScope")}} interfaces. Each of these interfaces can, of course, add more features in addition to the ones listed below.

- -
-

Note: WindowOrWorkerGlobalScope is a mixin and not an interface; you can't actually create an object of type WindowOrWorkerGlobalScope.

-
- -

Properties

- -

These properties are defined on the {{domxref("WindowOrWorkerGlobalScope")}} mixin, and implemented by {{domxref("Window")}} and {{domxref("WorkerGlobalScope")}}.

- -
-
-
{{domxref("WindowOrWorkerGlobalScope.caches")}} {{readOnlyinline}}
-
Returns the {{domxref("CacheStorage")}} object associated with the current context. This object enables functionality such as storing assets for offline use, and generating custom responses to requests.
-
{{domxref("WindowOrWorkerGlobalScope.indexedDB")}} {{readonlyInline}}
-
Provides a mechanism for applications to asynchronously access capabilities of indexed databases; returns an {{domxref("IDBFactory")}} object.
-
{{domxref("WindowOrWorkerGlobalScope.isSecureContext")}} {{readOnlyinline}}
-
Returns a boolean indicating whether the current context is secure (true) or not (false).
-
{{domxref("WindowOrWorkerGlobalScope.origin")}} {{readOnlyinline}}
-
Returns the origin of the global scope, serialized as a string.
-
-
- -

Methods

- -

These properties are defined on the {{domxref("WindowOrWorkerGlobalScope")}} mixin, and implemented by {{domxref("Window")}} and {{domxref("WorkerGlobalScope")}}.

- -
-
{{domxref("WindowOrWorkerGlobalScope.atob()")}}
-
Decodes a string of data which has been encoded using base-64 encoding.
-
{{domxref("WindowOrWorkerGlobalScope.btoa()")}}
-
Creates a base-64 encoded ASCII string from a string of binary data.
-
{{domxref("WindowOrWorkerGlobalScope.clearInterval()")}}
-
Cancels the repeated execution set using {{domxref("WindowOrWorkerGlobalScope.setInterval()")}}.
-
{{domxref("WindowOrWorkerGlobalScope.clearTimeout()")}}
-
Cancels the delayed execution set using {{domxref("WindowOrWorkerGlobalScope.setTimeout()")}}.
-
{{domxref("WindowOrWorkerGlobalScope.createImageBitmap()")}}
-
Accepts a variety of different image sources, and returns a {{domxref("Promise")}} which resolves to an {{domxref("ImageBitmap")}}. Optionally the source is cropped to the rectangle of pixels originating at (sx, sy) with width sw, and height sh.
-
{{domxref("WindowOrWorkerGlobalScope.fetch()")}}
-
Starts the process of fetching a resource from the network.
-
{{domxref("WindowOrWorkerGlobalScope.setInterval()")}}
-
Schedules a function to execute every time a given number of milliseconds elapses.
-
{{domxref("WindowOrWorkerGlobalScope.setTimeout()")}}
-
Schedules a function to execute in a given amount of time.
-
- -

Specifications

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
SpecificationStatusComment
{{SpecName("HTML WHATWG",'webappapis.html#windoworworkerglobalscope-mixin', 'WindowOrWorkerGlobalScope mixin')}}{{Spec2('HTML WHATWG')}}This is where the main mixin is defined.
{{SpecName('Fetch','#fetch-method','fetch()')}}{{Spec2('Fetch')}}Definition of the fetch() method.
{{SpecName('Service Workers', '#self-caches', 'caches')}}{{Spec2('Service Workers')}}Definition of the caches property.
{{SpecName('IndexedDB 2', '#dom-windoworworkerglobalscope-indexeddb', 'indexedDB')}}{{Spec2('IndexedDB 2')}}Definition of the indexedDB property.
{{SpecName('Secure Contexts', 'webappapis.html#dom-origin', 'isSecureContext')}}{{Spec2('Secure Contexts')}}Definition of the isSecureContext property.
- -

Browser compatibility

- -

{{CompatibilityTable}}

- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FeatureFirefox (Gecko)ChromeEdgeInternet ExplorerOperaSafari
Basic support{{CompatGeckoDesktop(52)}}54{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}
origin{{CompatGeckoDesktop(54)}}59{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FeatureAndroid WebviewEdgeFirefox Mobile (Gecko)AndroidIE MobileOpera MobileSafari MobileChrome for Android
Basic support{{CompatUnknown}}{{CompatUnknown}}{{CompatGeckoMobile(52)}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}54
origin{{CompatUnknown}}{{CompatUnknown}}{{CompatGeckoMobile(54)}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}59
-
- -

 

- -

See also

- - diff --git a/files/uk/web/api/windoworworkerglobalscope/settimeout/index.html b/files/uk/web/api/windoworworkerglobalscope/settimeout/index.html deleted file mode 100644 index eff8576a84..0000000000 --- a/files/uk/web/api/windoworworkerglobalscope/settimeout/index.html +++ /dev/null @@ -1,429 +0,0 @@ ---- -title: WindowTimers.setTimeout() -slug: Web/API/WindowOrWorkerGlobalScope/setTimeout -translation_of: Web/API/WindowOrWorkerGlobalScope/setTimeout -original_slug: Web/API/WindowTimers/setTimeout ---- -
{{APIRef("HTML DOM")}}
- -
 
- -
Метод setTimeout(), що належить об'єкту {{domxref("WindowOrWorkerGlobalScope")}}, та наслідується від window.setTimeout,  встановлює таймер, що виконує функцію або вказаний фрагмент коду один раз, щойно спливе заданий час.
- -
 
- -

Синтаксис

- -
var timeoutID = window.setTimeout(func[, delay, param1, param2, ...]);
-var timeoutID = window.setTimeout(code[, delay]);
-
- -

Параметри

- -
-
func
-
{{jsxref("function")}} котру необхідно виконати після того, як вийде заданий час.
-
code
-
Опційний синтаксис, котрий дозволяє задавати рядок замість функції, котра компілюється і виконується при спрацюванні таймера. Використання цього синтаксису не рекомендовано з тих же ж причин, котрі роблять застосування {{jsxref("eval()")}} загрозою безпеці.
-
delay {{optional_inline}}
-
 
-
Час у мілісекундах (тисячних секунди), котрий таймер має зачекати перед тим, як виконати вказану функцію або код. Якщо цей параметр пропустити, буде використано значення 0. Варто зазначити, що справжній час затримки, може бути довшим. Дивіться розділ {{anch("Reasons for delays longer than specified","Причини, з яких затримка є фактично довшою ніж задано")}}
-
param1, ..., paramN {{optional_inline}}
-
Додаткові параметри, що передаються до func або code, щойно час таймера спливе.
-
- -
-

Зверніть увагу:  Internet Explorer 9 та більш ранні версії не підтримують додаткові параметри. Застосовуйте поліфіл, щобл уможливити цей функціонал (див. розділ Callback arguments).  

-
- -

Значення, що повертається

- -


- Після виклику setTimeout(), повертається timeoutID  - це не нульове цифрове значення, що використовується для ідентифікації створеного таймера. Цей ідентифікатор можна передати як параметр до {{domxref("Window.clearTimeout()")}} щоб відмінити таймер.

- -

Корисно знати, що setTimeout() та {{domxref("WindowTimers.setInterval", "setInterval()")}} використовують спільну колекцію ID ідентифікаторів, а також що  clearTimeout() та {{domxref("WindowTimers.clearInterval", "clearInterval()")}} технічно можуть бути взаємозамінними. Тим не менше, задля ясності, варто завжди зіставляти їх, аби не допускати помилок під час розробки коду. 

- -

Приклад

- -

У наступному прикладі створено дві кнопки на веб сторінці, що прив'язані до setTimeout() та clearTimeout() процесів. Після натискання на першу кнопку встановлюється таймер, що викликає діалогове вікно alert через дві секунди та зберігає ID таймера для подальшого використання у clearTimeout(). За бажанням ви можете відмінити цей таймер, якщо натисните другу кнопку.

- -

HTML код

- -
<p>Live Example</p>
-<button onclick="delayedAlert();">Відобразити діалогове вікно alert через дві секунди.</button>
-<p></p>
-<button onclick="clearAlert();">Відмінити відображення діалогового вікна.</button>
-
- -

JavaScript код

- -
var timeoutID;
-
-function delayedAlert() {
-  timeoutID = window.setTimeout(slowAlert, 2000);
-}
-
-function slowAlert() {
-  alert("Це було дійсно повільно!");
-}
-
-function clearAlert() {
-  window.clearTimeout(timeoutID);
-}
-
- -

Результат

- -

{{EmbedLiveSample('Example', 'Приклад')}}

- -

Дивіться також clearTimeout() example.

- -

Поліфіл

- -

Якщо вам необхідно передати один чи декілька аргументів до колбек функції, а також потрібно, щоб цей функціонал працював у браузерах, що не підтримують передачу додаткових аргументів для setTimeout() чи setInterval() (наприклад, версії Internet Explorer 9 чи нижче), ви можете застосувати цей поліфіл, який активує стандартну HTML5 функціональність. Просто додайте цей код на початку вашого скрипта: 

- -
/*\
-|*|
-|*|  Polyfill which enables the passage of arbitrary arguments to the
-|*|  callback functions of JavaScript timers (HTML5 standard syntax).
-|*|
-|*|  https://developer.mozilla.org/en-US/docs/DOM/window.setInterval
-|*|
-|*|  Syntax:
-|*|  var timeoutID = window.setTimeout(func, delay[, param1, param2, ...]);
-|*|  var timeoutID = window.setTimeout(code, delay);
-|*|  var intervalID = window.setInterval(func, delay[, param1, param2, ...]);
-|*|  var intervalID = window.setInterval(code, delay);
-|*|
-\*/
-
-(function() {
-  setTimeout(function(arg1) {
-    if (arg1 === 'test') {
-      // feature test is passed, no need for polyfill
-      return;
-    }
-    var __nativeST__ = window.setTimeout;
-    window.setTimeout = function(vCallback, nDelay /*, argumentToPass1, argumentToPass2, etc. */ ) {
-      var aArgs = Array.prototype.slice.call(arguments, 2);
-      return __nativeST__(vCallback instanceof Function ? function() {
-        vCallback.apply(null, aArgs);
-      } : vCallback, nDelay);
-    };
-  }, 0, 'test');
-
-  var interval = setInterval(function(arg1) {
-    clearInterval(interval);
-    if (arg1 === 'test') {
-      // feature test is passed, no need for polyfill
-      return;
-    }
-    var __nativeSI__ = window.setInterval;
-    window.setInterval = function(vCallback, nDelay /*, argumentToPass1, argumentToPass2, etc. */ ) {
-      var aArgs = Array.prototype.slice.call(arguments, 2);
-      return __nativeSI__(vCallback instanceof Function ? function() {
-        vCallback.apply(null, aArgs);
-      } : vCallback, nDelay);
-    };
-  }, 0, 'test');
-}())
-
- -

Фікс для IE

- -

Якщо вам потрібен фікс, який не впливатиме на роботу жодного іншого мобільного чи десктопного браузера, окрім IE9 та нижче, ви можете скористатись умовними коментарями JavaScript:

- -
/*@cc_on
-  // conditional IE < 9 only fix
-  @if (@_jscript_version <= 9)
-  (function(f){
-     window.setTimeout=f(window.setTimeout);
-     window.setInterval=f(window.setInterval);
-  })(function(f){return function(c,t){var a=[].slice.call(arguments,2);return f(function(){c instanceof Function?c.apply(this,a):eval(c)},t)}});
-  @end
-@*/
-
- -

Або використати умовні коментарі HTML для IE9 та нижче:

- -
<!--[if lte IE 9]><script>
-(function(f){
-window.setTimeout=f(window.setTimeout);
-window.setInterval=f(window.setInterval);
-})(function(f){return function(c,t){
-var a=[].slice.call(arguments,2);return f(function(){c instanceof Function?c.apply(this,a):eval(c)},t)}
-});
-</script><![endif]-->
-
- -

Тимчасові рішення

- -

Ще одне можливе рішення - використання анонімної функції для виклику колбека, але це вартісне рішення. Приклад:

- -
var intervalID = setTimeout(function() { myFunc("one", "two", "three"); }, 1000);
-
- -

Приклад, наведений вище, може бути також написаний за допомогою   arrow function:

- -
var intervalID = setTimeout(() => { myFunc("one", "two", "three"); }, 1000);
-
- -

Ще одне рішення - використання   function's bind. Приклад:

- -
setTimeout(function(arg1){}.bind(undefined, 10), 1000);
-
- -

Проблема "this"

- -

Коли ви передаєте до setTimeout() метод або будь-яку іншу функцію, ймовірно вона буде викликана не з тим значенням this, на яке ви очікуєте. Ця проблема детально описана у JavaScript reference.

- -

Пояснення

- -

Код, що виконується всередині setTimeout(), викликається із  іншого контекста виконання (execution context), ніж у функції, яка викликала setTimeout. До функції, яку викликають всередині setTimeout застосовуються звичайні правила призначення this. І, якщо ви не встановили this під час виклику або за допомогою bind, його значенням за замовчуванням буде об'єкт  global (або window) у нестрогому режимі, або undefined у строгому режимі. Значення this буде іншим, аніж у функції, яка викликала setTimeout. Розгляньте наступний приклад:

- -
myArray = ["zero", "one", "two"];
-myArray.myMethod = function (sProperty) {
-    alert(arguments.length > 0 ? this[sProperty] : this);
-};
-
-myArray.myMethod(); // prints "zero,one,two"
-myArray.myMethod(1); // prints "one"
- -

Приклад вище працює тому, що myMethod викликано, як метод масиву myArray. Тому його this дорівнює myArray, а значення this[sProperty] всередині метода дорівнює myArray[sProperty]. Тим не менше, у наступному прикладі:

- -
setTimeout(myArray.myMethod, 1000); // prints "[object Window]" after 1 second
-setTimeout(myArray.myMethod, 1500, "1"); // prints "undefined" after 1.5 seconds
- -

Метод myArray.myMethod передано до setTimeout, як звичайну функцію, якій не задано значення this. І коли вона викликається, її this за замовчуванням дорівнює об'єкту window. У  setTimeout неможливо передати this аргументом, як, наприклад, у методи Array (forEach, reduce, тощо), або через використання  call, як показано у прикладі нижче:

- -
setTimeout.call(myArray, myArray.myMethod, 2000); // error: "NS_ERROR_XPC_BAD_OP_ON_WN_PROTO: Illegal operation on WrappedNative prototype object"
-setTimeout.call(myArray, myArray.myMethod, 2500, 2); // same error
-
- -

Можливі рішення

- -

Типовий спосіб вирішення цієї проблеми - використання функції обгортки, яка встановлює this із необхідним значенням: 

- -
setTimeout(function(){myArray.myMethod()}, 2000); // prints "zero,one,two" after 2 seconds
-setTimeout(function(){myArray.myMethod('1')}, 2500); // prints "one" after 2.5 seconds
- -

Стрілочна функція також є прийнятною альтернативою:

- -
setTimeout(() => {myArray.myMethod()}, 2000); // prints "zero,one,two" after 2 seconds
-setTimeout(() => {myArray.myMethod('1')}, 2500); // prints "one" after 2.5 seconds
- -

Ще одне можливе рішення проблеми this - замінити нативні глобальні функції setTimeout() та setInterval() кастомними функціями, які можуть приймати об'єкт this і застосовувати його у колбек функції, використовуючи  Function.prototype.call. Наприклад: 

- -
// Enable setting 'this' in JavaScript timers
-
-var __nativeST__ = window.setTimeout,
-    __nativeSI__ = window.setInterval;
-
-window.setTimeout = function (vCallback, nDelay /*, argumentToPass1, argumentToPass2, etc. */) {
-  var oThis = this,
-      aArgs = Array.prototype.slice.call(arguments, 2);
-  return __nativeST__(vCallback instanceof Function ? function () {
-    vCallback.apply(oThis, aArgs);
-  } : vCallback, nDelay);
-};
-
-window.setInterval = function (vCallback, nDelay /*, argumentToPass1, argumentToPass2, etc. */) {
-  var oThis = this,
-      aArgs = Array.prototype.slice.call(arguments, 2);
-  return __nativeSI__(vCallback instanceof Function ? function () {
-    vCallback.apply(oThis, aArgs);
-  } : vCallback, nDelay);
-};
- -
Зверніть увагу:  Подібний підхід дозволяє передавати будь-яку кількість аргументів у колбек функцію таймерів навіть для IE. Таким чином, цей спосіб може також бути використаний як поліфіл. Перегляньте параграф Callback arguments .
- -

Випробування нового підхода:

- -
myArray = ["zero", "one", "two"];
-myArray.myMethod = function (sProperty) {
-    alert(arguments.length > 0 ? this[sProperty] : this);
-};
-
-setTimeout(alert, 1500, "Hello world!"); // the standard use of setTimeout and setInterval is preserved, but...
-setTimeout.call(myArray, myArray.myMethod, 2000); // prints "zero,one,two" after 2 seconds
-setTimeout.call(myArray, myArray.myMethod, 2500, 2); // prints "two" after 2.5 seconds
-
- -
Зверніть увагу:  JavaScript 1.8.5 впровадив метод   Function.prototype.bind(), який встановлює значення this для кожного виклику вказаної функції. Це допомагає уникнути використання функції обгортки для призначення this колбека.
- -

Приклад використання bind():

- -
myArray = ["zero", "one", "two"];
-myBoundMethod = (function (sProperty) {
-    console.log(arguments.length > 0 ? this[sProperty] : this);
-}).bind(myArray);
-
-myBoundMethod(); // prints "zero,one,two" because 'this' is bound to myArray in the function
-myBoundMethod(1); // prints "one"
-setTimeout(myBoundMethod, 1000); // still prints "zero,one,two" after 1 second because of the binding
-setTimeout(myBoundMethod, 1500, "1"); // prints "one" after 1.5 seconds
-
- -

Примітки

- -

Таймер можна скасувати за допомогою {{domxref("Window.clearTimeout()")}}. Щоб викликати функцію повторно (наприклад, через кожні N мілісекунди), використовуйте  {{domxref("Window.setInterval()")}}.

- -

Важливо пам'ятати, що функція або фрагмент коду не можуть бути виконані, допоки не буде завершено поток функції, яка викликала setTimeout(). Наприклад. 

- -
function foo(){
-  console.log('foo has been called');
-}
-setTimeout(foo, 0);
-console.log('After setTimeout');
- -

Виведе в консоль:

- -
After setTimeout
-foo has been called
- -

Тому що, навіть не зважаючи на те, що setTimeout було викликано із нульовою затримкою, вона переміщується у чергу і її виконання відбудеться у найближчому наступному циклі, тобто не відразу. Код, що в данний момент виконується, повинен бути завершений. Тільки після цього функції, переміщені в чергу, будуть виконані. Тому порядок виконання може бути іншим, аніж очікувалось.

- -

Passing string literals

- -

Passing a string instead of a function to setTimeout() suffers from the same hazards as using eval.

- -
// Recommended
-window.setTimeout(function() {
-    alert("Hello World!");
-}, 500);
-
-// Not recommended
-window.setTimeout("alert('Hello World!');", 500);
-
- -

A string passed to setTimeout is evaluated in the global context, so local symbols in the context where setTimeout() was called will not be available when the string is evaluated as code.

- -

Причини чому затримка є фактично довшою ніж вказано

- -

There are a number of reasons why a timeout may take longer to fire than anticipated. This section describes the most common reasons.

- -

Nested timeouts forced to >=4ms

- -

Historically browsers implement setTimeout() "clamping": successive setTimeout() calls with delay smaller than the "minimum delay" limit are forced to use at least the minimum delay. The minimum delay, DOM_MIN_TIMEOUT_VALUE, is 4 ms (stored in a preference in Firefox: dom.min_timeout_value), with a DOM_CLAMP_TIMEOUT_NESTING_LEVEL of 5.

- -

In fact, 4 ms is specified by the HTML5 spec and is consistent across browsers released in 2010 and onward. Prior to {{geckoRelease("5.0")}}, the minimum timeout value for nested timeouts was 10 ms.

- -

To implement a 0 ms timeout in a modern browser, you can use {{domxref("window.postMessage()")}} as described here.

- -

Timeouts in inactive tabs clamped to >=1000ms

- -

To reduce the load (and associated battery usage) from background tabs, timeouts are often clamped to firing no more often than once per second (1000 ms) in inactive tabs.

- -

Firefox implements this behavior since version 5 (see {{bug(633421)}}, the 1000ms constant can be tweaked through the dom.min_background_timeout_value preference). Chrome implements this behavior since version 11 (crbug.com/66078).

- -

Firefox for Android uses a timeout value of 15 minutes for background tabs since {{bug(736602)}} in Firefox 14, and background tabs can also be unloaded entirely.

- -
-

Firefox 50 no longer throttles background tabs if a Web Audio API {{domxref("AudioContext")}} is actively playing sound. Firefox 51 further amends this such that background tabs are no longer throttled if an {{domxref("AudioContext")}} is present in the tab at all, even if no sound is being played. These resolve a number of issues with apps which play note-based music not being able to time or synchronize the music properly when the tab is in the background.

-
- -

Late timeouts

- -

In addition to "clamping", the timeout can also fire later when the page (or the OS/browser itself) is busy with other tasks

- -

Maximum delay value

- -

Browsers including Internet Explorer, Chrome, Safari, and Firefox store the delay as a 32-bit signed integer internally. This causes an integer overflow when using delays larger than 2147483647, resulting in the timeout being executed immediately.

- -

Specifications

- - - - - - - - - - - - - - -
SpecificationStatusComment
{{SpecName("HTML WHATWG", "webappapis.html#dom-settimeout", "WindowTimers.setTimeout()")}}{{Spec2("HTML WHATWG")}}Initial definition (DOM Level 0)
- -

Browser compatibility

- -

{{CompatibilityTable}}

- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
FeatureChromeFirefox (Gecko)Internet ExplorerOperaSafari
Basic support1.0{{CompatGeckoDesktop("1")}}4.04.01.0
Supports parameters for callback[1]{{CompatVersionUnknown}}{{CompatVersionUnknown}}10.0{{CompatVersionUnknown}}{{CompatVersionUnknown}}
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FeatureAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Basic support1.01.0{{CompatGeckoMobile("1")}}6.06.01.0
Supports parameters for callback[1]{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}
-
- -

[1] Whether it supports the optional parameters when in its first form or not.

- -

See also

- - diff --git a/files/uk/web/api/xmlhttprequest/index.html b/files/uk/web/api/xmlhttprequest/index.html deleted file mode 100644 index 362f5385cb..0000000000 --- a/files/uk/web/api/xmlhttprequest/index.html +++ /dev/null @@ -1,178 +0,0 @@ ---- -title: XMLHttpRequest -slug: Web/API/XMLHttpRequest -tags: - - AJAX - - API - - HTTP - - Interface - - NeedsTranslation - - Reference - - TopicStub - - Web - - XHR -translation_of: Web/API/XMLHttpRequest ---- -
{{APIRef("XMLHttpRequest")}}
- -
- -

Об'єкти XMLHttpRequest використовуються для взаємодії з серверами. Ти можеш отримати дані за URL без повної перезагрузки сторінки. Це дозволяє веб-сторінці оновити частину вмісту, не перешкоджаючи роботі користувача XMLHttpRequest часто використовуюється в програмуванні з використанням технології Ajax.

- -

{{InheritanceDiagram}}

- -
Історія
- -

XMLHttpRequest був спочатку розроблений компанією Microsoft десь у 1999 році і пізніше прийнятий компаніями Mozilla, Apple та Google. З жовтня 2014 року він був стандартизований в WHATWG, разом з новим методом {{domxref("WindowOrWorkerGlobalScope.fetch()", "fetch()")}} на основі промісів.

- -

Не зважаючи на своє ім'я, XMLHttpRequest може використовуватись для отримання будь-якого типу даних, не лише XML, і підтримує інші протоколи окрім HTTP (включаючи file і ftp).

- -

Конструктор

- -
-
{{domxref("XMLHttpRequest.XMLHttpRequest", "XMLHttpRequest()")}}
-
Конструктор ініціалізує об'єкт XMLHttpRequest. Він має бути викликаний перед використанням будь-яких з його методів.
-
- -

Властивості

- -

Успадковує властивості {{domxref("XMLHttpRequestEventTarget")}} і {{domxref("EventTarget")}}.

- -
-
{{domxref("XMLHttpRequest.onreadystatechange")}}
-
{{domxref("EventHandler")}} викликається щоразу, коли атрибут readyState змінюється.
-
{{domxref("XMLHttpRequest.readyState")}} {{readonlyinline}}
-
Повертає unsigned short, the state запиту.
-
{{domxref("XMLHttpRequest.response")}} {{readonlyinline}}
-
Повертає {{domxref("ArrayBuffer")}}, {{domxref("Blob")}}, {{domxref("Document")}}, об'єкт JavaScript, або ж {{domxref("DOMString")}}, залежить від значення {{domxref("XMLHttpRequest.responseType")}}, що містить тіло відповіді.
-
{{domxref("XMLHttpRequest.responseText")}} {{readonlyinline}}
-
Повертає {{domxref("DOMString")}}, що містить відповідь на запит в якості тексту, або null, якщо запит завершився помилкою або не був надісланим досі.
-
{{domxref("XMLHttpRequest.responseType")}}
-
Вказує на тип відповіді.
-
{{domxref("XMLHttpRequest.responseURL")}} {{readonlyinline}}
-
Повертає the serialized URL відповіді або ж пустий рядок, якщо URL — null.
-
{{domxref("XMLHttpRequest.responseXML")}} {{readonlyinline}}
-
Повертає {{domxref("Document")}}, що містить відповідь на запит або null, якщо запит завершився помилкою, досі не був надісланий, або не може бути розпізнаний, як XML чи HTML. Not available in workers.
-
{{domxref("XMLHttpRequest.status")}} {{readonlyinline}}
-
Повертає unsigned short з статусом відповіді на запит.
-
{{domxref("XMLHttpRequest.statusText")}} {{readonlyinline}}
-
Повертає {{domxref("DOMString")}}, що містить стрічку відповіді, повернену HTTP-сервером. Навідміну від {{domxref("XMLHTTPRequest.status")}}, що включає цілісний текст відповіді (наприклад, "200 OK").
-
- -
-

Увага: починаючи від специфікації HTTP/2 (8.1.2.4 Поля пседо-заголовку відповіді), HTTP/2 не визначає шляху передачі версії чи reason phrase, що включається в стрічку статусу HTTP/1.1.

-
- -
-
{{domxref("XMLHttpRequest.timeout")}}
-
Має тип unsigned long. Являє собою час у мілісекундах, відведений на запит перед тим, як буде автоматично перерваний.
-
{{domxref("XMLHttpRequestEventTarget.ontimeout")}}
-
{{domxref("EventHandler")}}, що викликається щоразу після спливання часу, відведенного на запит. {{gecko_minversion_inline("12.0")}}
-
{{domxref("XMLHttpRequest.upload")}} {{readonlyinline}}
-
{{domxref("XMLHttpRequestUpload")}}, що являє собою процес завантаження.
-
{{domxref("XMLHttpRequest.withCredentials")}}
-
{{domxref("Boolean")}}, що вказує, чи слід робити запити Access-Control використовуючи такі облікові дані, як файли cookie або заголовки авторизації.
-
- -

Нестандартні властивості

- -
-
{{domxref("XMLHttpRequest.channel")}}{{ReadOnlyInline}}
-
{{Interface("nsIChannel")}}. Канал, що використовується об'єктом коли виконується запит.
-
{{domxref("XMLHttpRequest.mozAnon")}}{{ReadOnlyInline}}
-
Логічна змінна. Якщо її значення — істина, запит буде надісланий без кукі та заголовків аутентифікації.
-
{{domxref("XMLHttpRequest.mozSystem")}}{{ReadOnlyInline}}
-
Логічна змінна. Якщо її значення — істина, оригінальна політика не буде застосована до запиту.
-
{{domxref("XMLHttpRequest.mozBackgroundRequest")}}
-
Логічна змінна. Вказує чи представляє об'єкт сервіс фонового запиту.
-
{{domxref("XMLHttpRequest.mozResponseArrayBuffer")}}{{gecko_minversion_inline("2.0")}} {{obsolete_inline("6")}} {{ReadOnlyInline}}
-
Є ArrayBuffer. Відповідь на запит у вигляді масиву JavaScript.
-
{{domxref("XMLHttpRequest.multipart")}}{{obsolete_inline("22")}}
-
Це особливість Gecko, логічна змінна, що була видалена з Firefox/Gecko 22. Будь ласка, використовуйте натомість Server-Sent Events, Web Sockets, або responseText.
-
- -

Обробники подій

- -

onreadystatechange підримується у всіх браузерах, як властивість XMLHttpRequest.

- -

З тих пір у різних браузерах було впроваджено ряд додаткових обробників подій (onload, onerror, onprogress тощо). Вони підтримуються у Firefox. Зокрема, дивіться nsIXMLHttpRequestEventTarget та Using XMLHttpRequest.

- -

Більш нові браузери, включаючи Firefox, також підтримують прослуховування подій XMLHttpRequest починаючи від стандарту API addEventListener в розширені на встановлення властивостей функцій обробника on*.

- -

Methods

- -
-
{{domxref("XMLHttpRequest.abort()")}}
-
Aborts the request if it has already been sent.
-
{{domxref("XMLHttpRequest.getAllResponseHeaders()")}}
-
Returns all the response headers, separated by CRLF, as a string, or null if no response has been received.
-
{{domxref("XMLHttpRequest.getResponseHeader()")}}
-
Returns the string containing the text of the specified header, or null if either the response has not yet been received or the header doesn't exist in the response.
-
{{domxref("XMLHttpRequest.open()")}}
-
Initializes a request. This method is to be used from JavaScript code; to initialize a request from native code, use openRequest() instead.
-
{{domxref("XMLHttpRequest.overrideMimeType()")}}
-
Overrides the MIME type returned by the server.
-
{{domxref("XMLHttpRequest.send()")}}
-
Sends the request. If the request is asynchronous (which is the default), this method returns as soon as the request is sent.
-
{{domxref("XMLHttpRequest.setRequestHeader()")}}
-
Sets the value of an HTTP request header. You must call setRequestHeader()after open(), but before send().
-
- -

Non-standard methods

- -
-
{{domxref("XMLHttpRequest.init()")}}
-
Initializes the object for use from C++ code.
-
- -
Warning: This method must not be called from JavaScript.
- -
-
{{domxref("XMLHttpRequest.openRequest()")}}
-
Initializes a request. This method is to be used from native code; to initialize a request from JavaScript code, use open() instead. See the documentation for open().
-
{{domxref("XMLHttpRequest.sendAsBinary()")}}{{deprecated_inline()}}
-
A variant of the send() method that sends binary data.
-
- -

Specifications

- - - - - - - - - - - - - - -
SpecificationStatusComment
{{SpecName('XMLHttpRequest')}}{{Spec2('XMLHttpRequest')}}Live standard, latest version
- -

Browser compatibility

- - - -
{{Compat("api.XMLHttpRequest")}}
- -

See also

- - diff --git a/files/uk/web/css/-moz-orient/index.html b/files/uk/web/css/-moz-orient/index.html deleted file mode 100644 index 851b26e69b..0000000000 --- a/files/uk/web/css/-moz-orient/index.html +++ /dev/null @@ -1,153 +0,0 @@ ---- -title: '-moz-orient' -slug: Web/CSS/-moz-orient -translation_of: Web/CSS/-moz-orient ---- -
{{CSSRef}}{{Non-standard_header}}
- -

-moz-orient CSS властивість, що задає орієнтацію обраного елемента.

- -

{{cssinfo}}

- -

Синтаксис

- -{{csssyntax}} - -

Значення

- -
-
inline
-
The element is rendered in the same direction as the axis of the text: horizontally for horizontal writing modes, vertically for vertical writing modes.
-
block
-
The element is rendered orthogonally to the axis of the text: vertically for horizontal writing modes, horizontal for vertical writing modes.
-
horizontal
-
The element is rendered horizontally.
-
vertical
-
The element is rendered vertically.
-
- -

Приклади

- -

HTML

- -
<p>
-  The following progress meter
-  is horizontal (the default):
-</p>
-<progress max="100" value="75"></progress>
-
-<p>
- The following progress meter
- is vertical:
-</p>
-<progress class="vert" max="100" value="75"></progress>
- -

CSS

- -
.vert {
-  -moz-orient: vertical;
-  width: 16px;
-  height: 150px;
-}
- -

Результат

- -

{{EmbedLiveSample("Examples","200","360")}}

- -

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

- -

Though submitted to the W3C, with positive initial feedback, this property is not yet part of any specification; currently, this is a Mozilla-specific extension (that is, -moz-orient).

- -

Браузерна сумісність

- -

{{CompatibilityTable}}

- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FeatureChromeFirefox (Gecko)Internet ExplorerOperaSafari
Basic support{{CompatNo}}{{CompatGeckoDesktop("6.0")}}{{property_prefix("-moz")}}[1]{{CompatNo}}{{CompatNo}}{{CompatNo}}
auto value{{CompatNo}}{{CompatGeckoDesktop("21.0")}}[2]
- {{CompatNo}}{{CompatGeckoDesktop(40)}}
{{CompatNo}}{{CompatNo}}{{CompatNo}}
inline and block values{{CompatNo}}{{CompatGeckoDesktop(40)}}{{CompatNo}}{{CompatNo}}{{CompatNo}}
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FeatureAndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Basic support{{CompatNo}}{{CompatGeckoMobile("6.0")}}{{property_prefix("-moz")}}[1]{{CompatNo}}{{CompatNo}}{{CompatNo}}
auto value{{CompatNo}}{{CompatGeckoMobile("21.0")}}[2]
- {{CompatNo}}{{CompatGeckoDesktop(40)}}
{{CompatNo}}{{CompatNo}}{{CompatNo}}
inline and block values{{CompatNo}}{{CompatGeckoMobile(40)}}{{CompatNo}}{{CompatNo}}{{CompatNo}}
-
- -

[1] In Gecko 6.0 {{geckoRelease("6.0")}}, there was a bug that causes vertical {{HTMLElement("progress")}} elements to render with the dimensions of a horizontal bar. This is fixed in Gecko 7.0 {{geckoRelease("7.0")}}.

- -

[2] The auto value was equivalent to horizontal.

- -

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

- - diff --git a/files/uk/web/css/@font-face/font-display/index.html b/files/uk/web/css/@font-face/font-display/index.html deleted file mode 100644 index 736f517126..0000000000 --- a/files/uk/web/css/@font-face/font-display/index.html +++ /dev/null @@ -1,87 +0,0 @@ ---- -title: font-display -slug: Web/CSS/@font-face/font-display -translation_of: Web/CSS/@font-face/font-display ---- -
{{CSSRef}}
- -

Властивість font-display визначає як font face відображаєтся стосовно як він завантижився і готовий до використання.

- -

Хронологія відображення шрифта

- -

Хронологія відображення шрифта залежить від часу на початку завантаження шрифта та його використання. Типи хронології поділені на три частини які вказують поведінку відображення усих елементів які використовують цей шрифт.

- -
-
Блокування шрифту(block)
-
Якщо шрифт не завантажений, усі елементи які очікують на його використання мають відображатись невидимими(invisible). Якщо шрифт успішно завантажений за цей період, вони відображаются за замовчуванням.
-
Заміна шрифту(swap)
-
Якщо шрифт не завантажений, усі елементи що очікують на його використання , мають використати запасний шрифт. Якщо шрифт успішно завантажений за цей період, вони відображаются за замовчуванням.
-
Невдача(failure)
-
Якщо шрифт не був завантажений, клієнт відображає його як невдачно завантажений, що викликає звичайне резервування шрифту.
-
- -

{{cssinfo}}

- -

Синтаксис

- -
/* Keyword values */
-font-display: auto;
-font-display: block;
-font-display: swap;
-font-display: fallback;
-font-display: optional;
- -

Значення

- -
-
auto
-
Відображення шрифту виконуєтся автоматично клієнтом.
-
block
-
Надає елементам короткий період блокування і нескінченний swap період.
-
swap
-
Надає надзвичайно малий період блокування і нескінченний період підміни шрифту.
-
fallback
-
Надає надзвичайно малий період блокування і малий період підміни шрифту.
-
optional
-
Надає надзвичайно малий період блокування без підміни шрифту.
-
- -

Формальний синтаксис

- -{{csssyntax}} - -

Приклад

- -
@font-face {
-  font-family: ExampleFont;
-  src: url(/path/to/fonts/examplefont.woff) format('woff'),
-       url(/path/to/fonts/examplefont.eot) format('eot');
-  font-weight: 400;
-  font-style: normal;
-  font-display: fallback;
-}
- -

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

- - - - - - - - - - - - - - - - -
SpecificationStatusComment
{{SpecName('CSS4 Fonts', '#font-display-desc', 'font-display')}}{{Spec2('CSS4 Fonts')}}Initial definition
- -

Сумісність з браузерами

- - - -

{{Compat("css.at-rules.font-face.font-display")}}

diff --git a/files/uk/web/css/@font-face/index.html b/files/uk/web/css/@font-face/index.html deleted file mode 100644 index 0a7217c851..0000000000 --- a/files/uk/web/css/@font-face/index.html +++ /dev/null @@ -1,197 +0,0 @@ ---- -title: '@font-face' -slug: Web/CSS/@font-face -tags: - - '@-правила' - - '@font-face' - - CSS - - CSS Шрифти - - Посилання - - типографія - - шрифти -translation_of: Web/CSS/@font-face ---- -
{{CSSRef}}
- -

@font-face CSS @-правило вказує спеціальний шрифт для відображення текста. Шрифт може бути завантажений з зовнішнього сервера або встановлено локально на комп'ютері користувача. Якщо функція local() вказує ім'я шрифта то його пошук буде відбуватися  на комп'ютері користувача. Інакше ресурси шрифти вказані з використанням функції url() будуть завантажені і використані

- -

Дозвіл авторам впроваджувати їх власні шрифти дає можливість стилізувати контент без обмежень в так званих "безпечних" шрифтах (Це такі шрифти,що широко використовуються та визнані як загальнодоступні). Можливість вказувати ім'я локально встановлених шрифтів дає можливість налаштовувати шрифт більш гнучко без залежності від інтернет з'єднання.

- -

Поширеним випадком є використання url() і local() разом, що дає змогу використовувати втановлений користувачем шрифт і завантажувати шрифт у разі його відсутності на користувацькому пристрої.

- -

@font-face @-правило може бути використане не лише на вищому рівні CSS, а й всередині будь-якого @-правила.

- -
@font-face {
-  font-family: "Open Sans";
-  src: url("/fonts/OpenSans-Regular-webfont.woff2") format("woff2"),
-       url("/fonts/OpenSans-Regular-webfont.woff") format("woff");
-}
- -

Синтаксис

- -

Опис

- -
-
{{cssxref("@font-face/font-display", "font-display")}}
-
Вказує як шрифт відображатиметься в залежності від того чи він завантажений та готовий до використання.
-
{{cssxref("@font-face/font-family", "font-family")}}
-
Задає ім'я, що буде використовуватися для задання властивостей шрифта.
-
{{cssxref("@font-face/font-stretch", "font-stretch")}}
-
Значення {{cssxref("font-stretch")}} . Починаючи з Firefox 61 (та інших сучасних браузерів)  {{cssxref("font-stretch")}} також допускає задання двох значень для вказання діапазону, що підтримується шрифтом, наприклад: font-stretch: 50% 200%;
-
{{cssxref("@font-face/font-style", "font-style")}}
-
Значення {{cssxref("font-style")}}. Починаючи з Firefox 61 (і інших сучасних браузерів) {{cssxref("font-style")}}.також допускає задання двох значень для вказання діапазону, що підтримується шрифтом, наприклад: font-style: oblique 20deg 50deg;
-
{{cssxref("@font-face/font-weight", "font-weight")}}
-
Значення {{cssxref("font-weight")}}. Починаючи з Firefox 61 (і інших сучасних браузерів) {{cssxref("font-weight")}} також допускає задання двох значень для вказання діапазону, що підтримується шрифтом, наприклад: font-weight: 100 400;
-
{{cssxref("@font-face/font-variant", "font-variant")}}
-
Значення {{cssxref("font-variant")}}.
-
{{cssxref("font-feature-settings", "font-feature-settings")}}
-
Дозволяє контролювати інші розширені можлифості OpenType шрифтів.
-
{{cssxref("@font-face/font-variation-settings", "font-variation-settings")}}
-
Дозволяє здійснювати низькорівневий контроль над варіаціями шрифтів OpenType чи TrueType, вказуючи назви осей з чотирьох букв для зміни разом з їх значеннями.
-
{{cssxref("@font-face/src", "src")}}
-
-

Вказує ресурс, що містить дані шрифта.  Це може бути URL для віддаленого файлу шрифта чи ім'я для шрифта на комп'ютері користувача.

- -

Щоб дати браузеру підказку який вибрати формат ресурсу шрифта, формат можна вказати в середині функції format():

- -
src: url(ideal-sans-serif.woff) format("woff"),
-     url(basic-sans-serif.ttf) format("truetype");
- -

Достіпні типи: "woff", "woff2", "truetype", "opentype", "embedded-opentype", і "svg".

-
-
{{cssxref("@font-face/unicode-range", "unicode-range")}}
-
Діапазон  Unicode кодів, що буде використовуватись в шрифті.
-
- -

Формальний синтаксис

- -{{csssyntax}} - -

Приклади

- -

Цей приклад просто вказує завантажуваний шрифт для використання і застосовує його до всього тіла документа:

- -

Дивитися live приклад

- -
<html>
-<head>
-  <title>Web Font Sample</title>
-  <style type="text/css" media="screen, print">
-    @font-face {
-      font-family: "Bitstream Vera Serif Bold";
-      src: url("https://mdn.mozillademos.org/files/2468/VeraSeBd.ttf");
-    }
-
-    body { font-family: "Bitstream Vera Serif Bold", serif }
-  </style>
-</head>
-<body>
-  This is Bitstream Vera Serif Bold.
-</body>
-</html>
-
- -

В цьому прикладі використовується локальний шрифт користувача "Helvetica Neue Bold"; якщо у користувача цей шрифт не встановлений тоді натомість використовується завантажуваний шрифт "MgOpenModernaBold.ttf":

- -
@font-face {
-  font-family: MyHelvetica;
-  src: local("Helvetica Neue Bold"),
-       local("HelveticaNeue-Bold"),
-       url(MgOpenModernaBold.ttf);
-  font-weight: bold;
-}
-
- -

MIME-типи шрифтів

- - - - - - - - - - - - - - - - - - - - - - - - - - -
ФорматMIME-тип
TrueTypefont/ttf
OpenTypefont/otf
Web Open File Formatfont/woff
Web Open File Format 2font/woff2
- -

Нотатки

- - - -

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

- - - - - - - - - - - - - - - - - - - - - - - - - - -
СпецифікаціяСтатусКоментар
{{SpecName('WOFF2.0', '', 'WOFF2 font format')}}{{Spec2('WOFF2.0')}}Специфікація фомату шрифта з новим алгоритмом стиснення
{{SpecName('WOFF1.0', '', 'WOFF font format')}}{{Spec2('WOFF1.0')}}Специфікація формата шрифта
{{SpecName('CSS3 Fonts', '#font-face-rule', '@font-face')}}{{Spec2('CSS3 Fonts')}}Початкове визначення
- -

Підтримка браузерів 

- - - -

{{Compat("css.at-rules.font-face")}}

- -

Прогляньте також

- - diff --git a/files/uk/web/css/@page/bleed/index.html b/files/uk/web/css/@page/bleed/index.html deleted file mode 100644 index 3f7ef352e1..0000000000 --- a/files/uk/web/css/@page/bleed/index.html +++ /dev/null @@ -1,83 +0,0 @@ ---- -title: bleed -slug: Web/CSS/@page/bleed -tags: - - '@сторінка' - - CSS - - Web -translation_of: Web/CSS/@page/bleed ---- -
{{CSSRef}}{{SeeCompatTable}}
- -

 bleed це пропускний дескриптор правил css, використовується  з {{cssxref("@page")}} за правилом , визначає ступінь області пропуску сторінки за межами сторінки. Ця властивість має тільки ефект  якщо позначки обрізання   увімкнено за допомогою властивості {{cssxref("@page/marks", "marks")}} property.

- -

Syntax

- -
/* Keyword values */
-bleed: auto;
-
-/* <length> values */
-bleed: 8pt;
-bleed: 1cm;
-
- -

Значення

- -
-
auto
-
Обчислюється до 6pt якщо  значення в {{cssxref("@page/marks", "marks")}} є обрізаним. В іншому випадку він обчислюється до нуля.
-
{{cssxref("<довжина>")}}
-

- Вказує, наскільки назовні, в кожному напрямку, область випуску простягається поза полем сторінки. Значення можуть бути від’ємними, але можуть бути певні обмеження щодо реалізації.
-
- -

Формальне визначення

- -

{{cssinfo}}

- -

Формальний синтаксис

- -{{csssyntax}} - -

Приклади

- -

Встановлення кровоточення сторінки  в 1см.

- -
@page {
-  bleed: 1cm;
-}
-
- -

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

- - - - - - - - - - - - - - - - -
СпецифікаціяСтанКоментарі
{{SpecName("CSS3 Paged Media", "#bleed", "bleed")}}{{Spec2("CSS3 Paged Media")}}Initial definition
- -

Сувмістність з браузерами

- - - - - -

{{Compat("css.at-rules.page.bleed")}}

- -

Зазвичай переглядають

- - diff --git a/files/uk/web/css/@page/index.html b/files/uk/web/css/@page/index.html deleted file mode 100644 index 99089c653c..0000000000 --- a/files/uk/web/css/@page/index.html +++ /dev/null @@ -1,112 +0,0 @@ ---- -title: '@page' -slug: Web/CSS/@page -tags: - - '@page' - - At-rule - - CSS - - Layout - - NeedsTranslation - - Reference - - TopicStub - - Web -translation_of: Web/CSS/@page ---- -
{{CSSRef}}
- -

The @page CSS at-rule is used to modify some CSS properties when printing a document.

- -

Syntax

- -
@page {
-  margin: 1cm;
-}
-
-@page :first {
-  margin: 2cm;
-}
- -

Descriptors

- -
-
size
-
Specifies the target size and orientation of the page box’s containing block. In the general case, where one page box is rendered onto one page sheet, it also indicates the size of the destination page sheet.
-
- -
-
marks
-
Adds crop and/or registration marks to the document.
-
- -
-
bleed
-
Specifies the extent beyond the page box at which the page rendering is clipped.
-
- -

Description

- -

You can't change all CSS properties with @page. You can only change the margins, orphans, widows, and page breaks of the document. Attempts to change any other CSS properties will be ignored.

- -

The @page at-rule can be accessed via the CSS object model interface {{domxref("CSSPageRule")}}.

- -
Note: The W3C is discussing how to handle viewport-related {{cssxref("<length>")}} units, vh, vw, vmin, and vmax. Meanwhile do not use them within a @page at-rule.
- -

Formal syntax

- -{{csssyntax}} - -

Examples

- -

@page pseudo-class examples

- -

Please refer to the various pseudo-classes of @page for examples.

- - - -

Specifications

- - - - - - - - - - - - - - - - - - - - - - - - - - -
SpecificationStatusComment
{{SpecName('CSS Logical Properties', '#page', ':recto and :verso')}}{{Spec2('CSS Logical Properties')}}Adds the :recto and :verso page selectors
{{SpecName('CSS3 Paged Media', '#at-page-rule', '@page')}}{{Spec2('CSS3 Paged Media')}}No change from {{SpecName('CSS2.1')}}, though more CSS at-rules can be used inside a @page.
{{SpecName('CSS2.1', 'page.html#page-selectors', '@page')}}{{Spec2('CSS2.1')}}Initial definition
- -

Browser compatibility

- - - -

{{Compat("css.at-rules.page")}}

- -

See also

- - diff --git a/files/uk/web/css/_colon_active/index.html b/files/uk/web/css/_colon_active/index.html deleted file mode 100644 index aa90d1e19b..0000000000 --- a/files/uk/web/css/_colon_active/index.html +++ /dev/null @@ -1,129 +0,0 @@ ---- -title: ':active' -slug: 'Web/CSS/:active' -tags: - - CSS - - Веб - - Довідка - - Макет - - Псевдоклас -translation_of: 'Web/CSS/:active' ---- -
{{CSSRef}}
- -

CSS псевдо-клас :active  відображає елемент (наприклад, кнопку), який в даний момент активовано користувачем. У випадку застосування миші, "активація" зазвичай починається в момент натискання основної клавіші.

- -
/* Вибирає будь-який <a>, що активується */
-a:active {
-  color: red;
-}
- -

Псевдоклас :active частіш за все використовується на елементах {{HTMLElement("a")}} і {{HTMLElement("button")}}. Інші поширені варіанти застосування цього селектору включають елементи, що містять активований елемент, а також елементи форм, які активуються через асоційований із ними  {{HTMLElement("label")}}.

- -

Стилі, задані псевдокласом :active будуть перевизначені будь-яким наступним спорідненим із посиланнями псевдокласом ({{cssxref(":link")}}, {{cssxref(":hover")}}, чи {{cssxref(":visited")}}), що має хоча б таку ж специфічність. Для правильної стилізації посилань помістіть правила :active після всіх інших споріднених із посиланнями правил, як визначено порядком LVHA: :link:visited:hover:active.

- -
Зауважте, що: на системах із багатокнопковими мишами CSS3 вказує, що псевдоклас :active повинен застосовуватись лише для основної кнопки; у випадку правосторонньої миші це зазвичай крайня ліва кнопка.
- -

Синтаксис

- -{{csssyntax}} - -

Приклади

- -

Активні посилання

- -

HTML

- -
<p>Цей абзац містить посилання:
-  <a href="#">Це посилання буде забарвлено у червоний при натисканні на нього.</a>
-  Цей абзац отримає сірий фон при натисканні на посилання.
-</p>
- -

CSS

- -
a:link { color: blue; }          /* Невідвідані посилання */
-a:visited { color: purple; }     /* Відвідані посилання */
-a:hover { background: yellow; }  /* Посилання із наведеним курсором */
-a:active { color: red; }         /* Активні посилання */
-
-p:active { background: #eee; }   /* Активні абзаци */
- -

Результат

- -

{{EmbedLiveSample('Активні_посилання')}}

- -

Активні елементи форм

- -

HTML

- -
<form>
-  <label for="my-button">Моя кнопка: </label>
-  <button id="my-button" type="button">Спробуйте натиснути на мене чи на мою мітку!</button>
-</form>
- -

CSS

- -
form :active {
-  color: red;
-}
-
-form button {
-  background: white;
-}
- -

Результат

- -

{{EmbedLiveSample('Активні_елементи_форм')}}

- -

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

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
СпецифікаціяСтатусПримітка
{{SpecName('HTML WHATWG', 'scripting.html#selector-active', ':active')}}{{Spec2('HTML WHATWG')}} 
{{SpecName('CSS4 Selectors', '#active-pseudo', ':active')}}{{Spec2('CSS4 Selectors')}}Без змін.
{{SpecName('CSS3 Selectors', '#useraction-pseudos', ':active')}}{{Spec2('CSS3 Selectors')}}Без змін.
{{SpecName('CSS2.1', 'selector.html#dynamic-pseudo-classes', ':active')}}{{Spec2('CSS2.1')}}Без змін.
{{SpecName('CSS1', '#anchor-pseudo-classes', ':active')}}{{Spec2('CSS1')}}Первинне визначення.
- -

Підтримка у браузерах

- -
- - -

{{Compat("css.selectors.active")}}

-
- -

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

- - diff --git a/files/uk/web/css/_colon_root/index.html b/files/uk/web/css/_colon_root/index.html deleted file mode 100644 index 94153aa29d..0000000000 --- a/files/uk/web/css/_colon_root/index.html +++ /dev/null @@ -1,100 +0,0 @@ ---- -title: ':root' -slug: 'Web/CSS/:root' -tags: - - Псевдо-клас -translation_of: 'Web/CSS/:root' ---- -
{{CSSRef}}
- -

Опис

- -

Псевдо-клас :root вказує на кореневий елемент дерева документа. Якщо застосувати його до HTML, :root відображає {{HTMLElement("html")}} і є ідентичним селектору html, та не зважаючи на це, його вага є більшою.

- -

Синтаксис

- -{{csssyntax}} - -

Приклад

- -

Використання :root може бути корисним при декларуванні глобальних змінних CSS

- -
:root {
-  --main-color: hotpink;
-  --pane-padding: 5px 42px;
-}
-
- -

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

- - - - - - - - - - - - - - - - - - - - - -
СпецифікаціяСтанКоментар
{{SpecName('CSS4 Селектори', '#root-pseudo', ':root')}}{{Spec2('CSS4 Selectors')}}Без змін
{{SpecName('CSS3 Селектори', '#root-pseudo', ':root')}}{{Spec2('CSS3 Selectors')}}Початкове визначення
- -

Браузерна сумісність

- -

{{CompatibilityTable}}

- -
- - - - - - - - - - - - - - - - - - - -
ПідтримкаChromeFirefox (Gecko)Internet ExplorerOperaSafari
Базова1{{CompatGeckoDesktop("1.7")}}99.51.0
-
- -
- - - - - - - - - - - - - - - - - - - -
ПідтримкаAndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Базова{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}
-
diff --git a/files/uk/web/css/_doublecolon_before/index.html b/files/uk/web/css/_doublecolon_before/index.html deleted file mode 100644 index 675b0c375d..0000000000 --- a/files/uk/web/css/_doublecolon_before/index.html +++ /dev/null @@ -1,237 +0,0 @@ ---- -title: '::before (:before)' -slug: 'Web/CSS/::before' -tags: - - CSS - - Web - - Псевдо-елемент - - Розмытка -translation_of: 'Web/CSS/::before' ---- -
{{CSSRef}}
- -

В CSS, ::before створює псевдо-елемент, що є першим дочірнім елементом вибраного елемента. Це часто використовується для косметичного вмісту елемента з властивістю {{cssxref("content")}}. Він за замовчуванням лінійний

- -
/* Додає серце перед посиланнями */
-a::before {
-  content: "";
-}
- -
-

Нотатка: Псевдо-елемент згенерований за допомогою ::before і::after міститься в вікні форматування об'єкта, і таким чином не приймає замінювані елементи як  {{htmlelement("img")}}, або {{htmlelement("br")}} елементи.

-
- -

Синтаксис

- -{{csssyntax}} - -
-

Нотатка: CSS3 представляє позначення ::before (з двома двокрапками) щоб розрізняти псевдо-класи і псевдо-елементи. Браузер також приймає  :before, представлений в CSS2.

-
- -

Приклади

- -

Додавання лапок

- -

Простий приклад використання псевдо-елемента ::before додає лапки. Тут ми використовуємо і ::before і {{Cssxref("::after")}} замість символів лапок.

- -

HTML

- -
<q>Деякі цитати,</q> сказав він, <q> кращі за інші.</q>
- -

CSS

- -
q::before {
-  content: "«";
-  color: blue;
-}
-
-q::after {
-  content: "»";
-  color: red;
-}
- -

Результат

- -

{{EmbedLiveSample('Adding_quotation_marks', '500', '50', '')}}

- -

Декоративний приклад

- -

Ми можемо стилізувати текст чи зображення у властивості  {{cssxref("content")}} майже як завгодно.

- -

HTML

- -
<span class="ribbon">Зверніть увагу де помаранчевий блок</span>
- -

CSS

- -
.ribbon {
-  background-color: #5BC8F7;
-}
-
-.ribbon::before {
-  content: "Подивіться на цей помаранчевий блок.";
-  background-color: #FFBA10;
-  border-color: black;
-  border-style: dotted;
-}
- -

Результат

- -

{{EmbedLiveSample('Decorative_example', 450, 60)}}

- -

Список завдань

- -

В цьому прикладі ми створимо простий список завдань, використовуючи псевдо-елемент. Цей метод може часто використовуватись щоб додавати невеликі штрихи до  UI щоб покращити user experience.

- -

HTML

- -
<ul>
-  <li>Купити молоко</li>
-  <li>Вигуляти собаку</li>
-  <li>Вправи</li>
-  <li>Писати код</li>
-  <li>Грати музику</li>
-  <li>Відпочити</li>
-</ul>
-
- -

CSS

- -
li {
-  list-style-type: none;
-  position: relative;
-  margin: 2px;
-  padding: 0.5em 0.5em 0.5em 2em;
-  background: lightgrey;
-  font-family: sans-serif;
-}
-
-li.done {
-  background: #CCFF99;
-}
-
-li.done::before {
-  content: '';
-  position: absolute;
-  border-color: #009933;
-  border-style: solid;
-  border-width: 0 0.3em 0.25em 0;
-  height: 1em;
-  top: 1.3em;
-  left: 0.6em;
-  margin-top: -1em;
-  transform: rotate(45deg);
-  width: 0.5em;
-}
- -

JavaScript

- -
var list = document.querySelector('ul');
-list.addEventListener('click', function(ev) {
-  if (ev.target.tagName === 'LI') {
-     ev.target.classList.toggle('done');
-  }
-}, false);
-
- -

Вище - код живого прикладу. Відмітьте, що ми не використовуємо іконки, а галочкою являється псевдо-елемент ::before  які стилізовані за допомогою CSS.

- -

Результат

- -

{{EmbedLiveSample('To-do_list', 400, 300)}}

- -

Нотатки

- -

Також виправлення позиціонування в Firefox 3.5 не дозволяють вмісту бути згенерованим як окремий попередній елемент (відповідно до специфікації CSS "Псевдо-елемент :before і :after впливають на інші блоки так як вони були б справжніми елементами"), Вони можуть використовуватись, щоб впроваджувати незначні поліпшення для  не табличних розміток.  (наприклад, щоб досягти центрування) в випадку  доки вміст, що має центруватись  поміщений в дочірній наступний , колонка до і після контенту може бути представлена без додавання попереднього чи наступного сусіднього блоку (наприклад, це, можливо, найбільш семантично правильніше, додавати допоміжний span як нижче, чим додавати  <div/>  перед і після). (І завжди пам'ятайте додавати ширину до  float об'єкта, інакше він не буде обтікати!)

- -

HTML

- -
<div class="example">
-<span id="floatme">"Floated Before" має згенеруватись ліворуч від
-вікна перегляду і не виносити за межі рядка на потік нижче. Аналогічно
-"Floated After" має з'являтись праворуч</span>
-</div>
- -

CSS

- -
#floatme { float: left; width: 50%; }
-
-/* Щоб отримати пусту колонку просто позначте в hex коді
-  нерозривний пробіл: \a0 у якості контенту
-(Використовуйте \0000a0 коли іде після такого символа як пробіл )
-*/
-.example::before {
-  content: "Floated Before";
-  float: left;
-  width: 25%;
-}
-.example::after {
-  content: "Floated After";
-  float: right;
-  width: 25%;
-}
-
-/* For styling */
-.example::before, .example::after {
-  background: yellow;
-  color: red;
-}
- -

Результат

- -

{{EmbedLiveSample("Notes")}}

- -

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

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
СпецифікаціяСтатусКоментар
{{SpecName('CSS4 Pseudo-Elements', '#selectordef-before', '::before')}}{{Spec2('CSS4 Pseudo-Elements')}}No significant changes to the previous specification.
{{Specname("CSS3 Transitions", "#animatable-properties", "")}}{{Spec2("CSS3 Transitions")}}Allows transitions on properties defined on pseudo-elements.
{{Specname("CSS3 Animations", "", "")}}{{Spec2("CSS3 Animations")}}Allows animations on properties defined on pseudo-elements.
{{SpecName('CSS3 Selectors', '#gen-content', '::before')}}{{Spec2('CSS3 Selectors')}}Introduces the two-colon syntax.
{{SpecName('CSS2.1', 'generate.html#before-after-content', '::before')}}{{Spec2('CSS2.1')}}Initial definition, using the one-colon syntax
- -

Підтримка браузерів

- -
- - -

{{Compat("css.selectors.before")}}

-
- -

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

- - diff --git a/files/uk/web/css/_doublecolon_slotted/index.html b/files/uk/web/css/_doublecolon_slotted/index.html deleted file mode 100644 index a363141b7c..0000000000 --- a/files/uk/web/css/_doublecolon_slotted/index.html +++ /dev/null @@ -1,104 +0,0 @@ ---- -title: '::slotted()' -slug: 'Web/CSS/::slotted' -translation_of: 'Web/CSS/::slotted' ---- -
{{ CSSRef }}
- -

Псевдо-елемент ::slotted() являє собою будь-який елемент, поміщений в слот всередині шаблону HTML (додаткову інформацію див. в розділі Використання шаблонів і слотів).

- -

Це працює тільки при використанні всередині CSS, поміщеного в тіньовий DOM. Зверніть увагу, що цей селектор не буде вибирати текстовий вузол, поміщений в слот; він призначений тільки для фактичних елементів.

- -
/* Вибір будь-якого елемента, поміщеного в слот */
-::slotted(*) {
-  font-weight: bold;
-}
-
-/* Вибір будь-якого <span> елемента, поміщеного в слот */
-::slotted(span) {
-  font-weight: bold;
-}
-
- -

Синтакс

- -{{csssyntax}} - -

Приклади

- -

Наступні фрагменти коду взяті з демо-версії застосування псевдо-елемента :slotted (див. демо).

- -

У цьому демо ми використовуємо простий шаблон з трьома слотами:

- -
<template id="person-template">
-  <div>
-    <h2>Personal ID Card</h2>
-    <slot name="person-name">NAME MISSING</slot>
-    <ul>
-      <li><slot name="person-age">AGE MISSING</slot></li>
-      <li><slot name="person-occupation">OCCUPATION MISSING</slot></li>
-    </ul>
-  </div>
-</template>
- -

Кастомний веб-компонент— <person-details> —  визначений, як:

- -
customElements.define('person-details',
-  class extends HTMLElement {
-    constructor() {
-      super();
-      let template = document.getElementById('person-template');
-      let templateContent = template.content;
-
-      const shadowRoot = this.attachShadow({mode: 'open'});
-
-      let style = document.createElement('style');
-      style.textContent = 'div { padding: 10px; border: 1px solid gray; width: 200px; margin: 10px; }' +
-                           'h2 { margin: 0 0 10px; }' +
-                           'ul { margin: 0; }' +
-                           'p { margin: 10px 0; }' +
-                           '::slotted(*) { color: gray; font-family: sans-serif; } ';
-
-      shadowRoot.appendChild(style);
-      shadowRoot.appendChild(templateContent.cloneNode(true));
-  }
-})
- -

Ви побачите, що при заповненні елемента стилю  певними значеннями, ми вибираємо всі слотовані елементи  (::slotted(*)) і надаємо їм інший шрифт і колір. Це дозволяє їм краще виділятися поруч зі слотами, які не були успішно заповнені. 

- -

Для вибору конкретних елементів, вказуєм необхідний тип елементу замість *.  Для прикладу - селектор, який застосує стилі лише для div елементів, матиме наступний вигляд (::slotted(div)). Більше інформації про стилізацію slot елементів та розробку кастомних веб компонентів, ви можете знайти на моєму github.

- -

При вставці на сторінку елемент виглядає наступним чином:

- -

<person-details> <p slot="person-name">Dr. Shazaam</p> <span slot="person-age">Immortal</span> <span slot="person-occupation">Superhero</span> </person-details>

- -

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

- - - - - - - - - - - - - - - - -
SpecificationStatusComment
{{ SpecName('CSS Scope', '#slotted-pseudo', '::slotted') }}{{ Spec2('CSS Scope') }}Початкове визначення
- -

Сумісність браузерами

- - - -

{{Compat("css.selectors.slotted")}}

- -

Див. також

- - diff --git a/files/uk/web/css/alternative_style_sheets/index.html b/files/uk/web/css/alternative_style_sheets/index.html deleted file mode 100644 index f805d1d125..0000000000 --- a/files/uk/web/css/alternative_style_sheets/index.html +++ /dev/null @@ -1,81 +0,0 @@ ---- -title: Альтернативні таблиці стилів -slug: Web/CSS/Alternative_style_sheets -tags: - - Стилі - - Теми -translation_of: Web/CSS/Alternative_style_sheets -original_slug: Web/CSS/Альтернативні_таблиці_стилів ---- -

Specifying alternative style sheets in a web page provides a way for users to see multiple versions of a page, based on their needs or preferences.

- -

Firefox lets the user select the stylesheet using the View > Page Style submenu, Internet Explorer also supports this feature (beginning with IE 8), also accessed from View > Page Style (at least as of IE 11), but Chrome requires an extension to use the feature (as of version 48). The web page can also provide its own user interface to let the user switch styles.

- -

An example: specifying the alternative stylesheets

- -

The alternate stylesheets are commonly specified using a {{HTMLElement("link")}} element with rel="stylesheet alternate" and title="..." attributes, for example:

- -
<link href="reset.css" rel="stylesheet" type="text/css">
-
-<link href="default.css" rel="stylesheet" type="text/css" title="Default Style">
-<link href="fancy.css" rel="alternate stylesheet" type="text/css" title="Fancy">
-<link href="basic.css" rel="alternate stylesheet" type="text/css" title="Basic">
-
- -

In this example, the styles "Default Style", "Fancy", and "Basic" will be listed in the Page Style submenu, with the Default Style pre-selected. When the user selects a different style, the page will immediately be re-rendered using that style sheet.

- -

No matter what style is selected, the rules from the reset.css stylesheet will always be applied.

- -

Try it out

- -

Click here for a working example you can try out.

- -

Details

- -

Any stylesheet in a document falls into one of the following categories:

- - - -

When style sheets are referenced with a title attribute on the {{HTMLElement("link", "<link rel=\"stylesheet\">")}} or {{HTMLElement("style")}} element, the title becomes one of the choices offered to the user. Style sheets linked with the same title are part of the same choice. Style sheets linked without a title attribute are always applied.

- -

Use rel="stylesheet" to link to the default style, and rel="alternate stylesheet" to link to alternative style sheets. This tells the browser which style sheet title should be selected by default, and makes that default selection apply in browsers that do not support alternate style sheets.

- -

Specifications

- - - - - - - - - - - - - - - - - - - - - - - - - - -
SpecificationStatusComment
{{SpecName('CSSOM', '#css-style-sheet-collections', 'CSS Style Sheet Collections')}}{{Spec2('CSSOM')}}The CSS OM specification defines the concepts of the style sheet set name, its disabled flag, and the preferred CSS style sheet set name.
- It defines how these are determined, and lets the HTML specification define the HTML-specific behaviors by requiring it to define when to create a CSS style sheet.
-

{{SpecName('HTML WHATWG', 'semantics.html#link-type-stylesheet', 'Link type "stylesheet"')}}
- {{SpecName('HTML WHATWG', 'semantics.html#attr-style-title', 'The style element')}}
- {{SpecName('HTML WHATWG', 'semantics.html#attr-meta-http-equiv-default-style', 'Default style state (http-equiv="default-style")')}}

-
{{Spec2('HTML WHATWG')}}The HTML specification defines when and how the create a CSS style sheet algorithm is invoked while handling <link> and <style> elements, and also defines the behavior of <meta http-equiv="default-style">.
{{SpecName("HTML4.01", "present/styles.html#h-14.3", "Alternative style sheets")}}{{Spec2("HTML4.01")}}Earlier, the HTML specification itself defined the concept of preferred and alternate stylesheets.
- -

 

diff --git a/files/uk/web/css/animation-name/index.html b/files/uk/web/css/animation-name/index.html deleted file mode 100644 index c600b3ecd1..0000000000 --- a/files/uk/web/css/animation-name/index.html +++ /dev/null @@ -1,141 +0,0 @@ ---- -title: animation-name -slug: Web/CSS/animation-name -translation_of: Web/CSS/animation-name ---- -
{{CSSRef}}
- -
Animation-name - це властивість CSS, яка визначає одну або декілька анімацій, які повинні бути застосовані на елементі. Кожне animation-name вказує на {{cssxref("@keyframes")}} правило, яке визначає значення властивостей для анімаційного ряду.
- -
 
- -
/* Single animation */
-animation-name: none;
-animation-name: test_05;
-animation-name: -specific;
-animation-name: sliding-vertically;
-
-/* Multiple animations */
-animation-name: test1, animation4;
-animation-name: none, -moz-specific, sliding;
-
-/* Global values */
-animation-name: initial
-animation-name: inherit
-animation-name: unset
- -

Часто, буде зручно користуватися коротким варіантом  {{cssxref("animation")}} для встановлення усіх властивостей анімації за один раз.

- -

{{cssinfo}}

- -

Syntax

- -

Values

- -
-
none
-
Значення, яке вказує на відсутність основних кадрів (keyframes). Може бути використано для деактивації анімації без зміни інших параметрів анімації, or to deactivate animations coming from the cascade.
-
{{cssxref("<custom-ident>")}}
-
Ім'я анімації. Цей ідентифікатора складається з комбінаціїThis identifier is composed of a combination of літер a-z (без врахування регістру літер), цифр 0-9, підкреслення (_), і/або дефісу (-). The first non-dash character must be a letter. Also, two dashes are forbidden at the beginning of the identifier. Furthermore, the identifier can't be none, unset, initial, or inherit.
-
- -
-

Note: When you specify multiple comma-separated values on an animation-* property, they will be assigned to the animations specified in the {{cssxref("animation-name")}} property in different ways depending on how many there are. For more information, see Setting multiple animation property values.

-
- -

Formal syntax

- -{{csssyntax}} - -

Examples

- -

See CSS animations for examples.

- -

Specifications

- - - - - - - - - - - - - - - - -
SpecificationStatusComment
{{SpecName('CSS3 Animations', '#animation-name', 'animation-name')}}{{Spec2('CSS3 Animations')}}Initial definition.
- -

Browser compatibility

- -
{{CompatibilityTable}}
- -
- - - - - - - - - - - - - - - - - - - - - -
FeatureChromeEdgeFirefox (Gecko)Internet ExplorerOperaSafari (WebKit)
Basic support{{CompatVersionUnknown}}{{property_prefix("-webkit")}}
- {{CompatChrome(43.0)}}
{{CompatVersionUnknown}}{{property_prefix("-webkit")}}
- {{CompatVersionUnknown}}
{{CompatGeckoDesktop("5.0")}}{{property_prefix("-moz")}}
- {{CompatGeckoDesktop("16.0")}}[1]
10 12 {{property_prefix("-o")}}
- 12.10
4.0{{property_prefix("-webkit")}}
-
- -
- - - - - - - - - - - - - - - - - - - - - - - -
FeatureAndroidEdgeFirefox Mobile (Gecko)IE PhoneOpera MobileSafari MobileChrome for Android
Basic support{{CompatUnknown}}{{CompatVersionUnknown}}{{property_prefix("-webkit")}}
- {{CompatVersionUnknown}}
{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}
-
- -

[1] In addition to the unprefixed support, Gecko 44.0 {{geckoRelease("44.0")}} added support for a -webkit- prefixed version of the property for web compatibility reasons behind the preference layout.css.prefixes.webkit, defaulting to false. Since Gecko 49.0 {{geckoRelease("49.0")}} the preference defaults to true.

- -

See also

- - diff --git a/files/uk/web/css/attr()/index.html b/files/uk/web/css/attr()/index.html deleted file mode 100644 index 85afa37991..0000000000 --- a/files/uk/web/css/attr()/index.html +++ /dev/null @@ -1,265 +0,0 @@ ---- -title: attr() -slug: Web/CSS/attr() -tags: - - CSS - - CSS функція - - Web - - attr - - Макет -translation_of: Web/CSS/attr() ---- -
{{CSSRef}}
- -
- -
- -
Примітка: Функція attr() може буті використана з будь-якою властивісттю CSS, але підтримка для властивостей інших ніж {{CSSxRef("content")}} є експериментальною, і підтримка для параметру type-or-unit обмежена.
- -
- -

Функція attr() в CSS використовується для повернення значення атрибуту вибраного елементу і використання його в таблиці стилів. Вона може бути використана на псевдоелементах, і в цьому випадку повертається значення атрибута для використання в якості тексту псевдоелемента.

- -
/* Просте застосування */
-attr(data-count);
-attr(title);
-
-/* З параметром type */
-attr(src url);
-attr(data-count number);
-attr(data-width px);
-
-/* З параметром  fallback */
-attr(data-count number, 0);
-attr(src url, "");
-attr(data-width px, inherit);
-attr(data-something, "default");
-
-
- -

Синтаксис

- -

Значення

- -
-
attribute-name
-
Це ім'я атрибута елемента HTML, на який функція посилається у CSS.
-
<type-or-unit> {{Experimental_Inline}}
-
Це ключове слово, що представляє або тип значення атрибута, або його одиницю, оскільки в HTML деякі атрибути мають неявні одиниці. Якщо використання <type-or-unit> як значення для даного атрибуту недійсне, вираз з attr() також буде недійсним. Якщо пропущено, за замовчуванням використовується string. Список дійсних значень: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Ключове словоАсоційований типКоментарЗначення за замовчуванням
string{{CSSxRef("<string>")}}Значення атрибута трактується як CSS {{CSSxRef("<string>")}}. Воно НЕ буде оброблюватися, і зокрема символи будуть використані як-є замість того, щоб маскування CSS перетворювалися на інші символи.Пустий рядок.
color {{Experimental_Inline}}{{CSSxRef("<color>")}}Значення атрибуту аналізується як хеш (3- або 6-значні хеші) або як ключове слово. Повінне бути дійсним значенням CSS {{CSSxRef("<string>")}}.
- Провідні і кінцеві прогалини будуть прибрані.
currentColor
url {{Experimental_Inline}}{{CSSxRef("<url>")}}Значення атрибута аналізується як CSS рядок що використовується всередині CSS функції url().
- Відносна URL-адреса вирішується відносно оригінального документа, а не щодо таблиці стилів.
- Провідні і кінцеві прогалини будуть прибрані.
The url about:invalid that points to a non-existent document with a generic error condition.
integer {{Experimental_Inline}}{{CSSxRef("<integer>")}}Значення атрибута аналізується як CSS {{CSSxRef("<integer>")}}. Якщо воно не є дійсним значенням, тобто не є числом або виходить за межі діапазону, прийнятого властивістю CSS, використовується значення за замовчуванням.
- Провідні і кінцеві прогалини будуть прибрані.
0, або, якщо 0 не є дійсним значенням для властивості, мінімальним значенням властивості.
number {{Experimental_Inline}}{{CSSxRef("<number>")}}Значення атрибута аналізується як CSS {{CSSxRef("<number>")}}. Якщо воно не є дійсним значенням, тобто не є числом або виходить за межі діапазону, прийнятого властивістю CSS, використовується значення за замовчуванням.
- Провідні і кінцеві прогалини будуть прибрані.
0, або, якщо 0 не є дійсним значенням для властивості, мінімальним значенням властивості.
length {{Experimental_Inline}}{{CSSxRef("<length>")}}Значення атрибута аналізується як CSS {{CSSxRef("<length>")}} вимір, що вміщує одиниці виміру (наприклад, 12.5em). Якщо воно не є дійсним значенням, тобто не є довжиною або виходить за межі діапазону, прийнятого властивістю CSS, використовується значення за замовчуванням.
- Якщо дана одиниця виміру є відносною довжиною, attr () обчислює її до абсолютної довжини
- Провідні і кінцеві прогалини будуть прибрані.
0, або, якщо 0 не є дійсним значенням для властивості, мінімальним значенням властивості.
em, ex, px, rem, vw, vh, vmin, vmax, mm, cm, in, pt, or pc {{Experimental_Inline}}{{CSSxRef("<length>")}}Значення атрибута аналізується як CSS {{CSSxRef("<number>")}}, що не містить одиниць виміру (e.g. 12.5), і трактується як {{CSSxRef("<length>")}} з вказаними одиницями виміру. Якщо воно не є дійсним значенням, тобто не є довжиною або виходить за межі діапазону, прийнятого властивістю CSS, використовується значення за замовчуванням.
- Якщо дана одиниця виміру є відносною довжиною, attr () обчислює її до абсолютної довжини
- Провідні і кінцеві прогалини будуть прибрані.
0, або, якщо 0 не є дійсним значенням для властивості, мінімальним значенням властивості.
angle {{Experimental_Inline}}{{CSSxRef("<angle>")}}Значення атрибута аналізується як CSS {{CSSxRef("<angle>")}} вимір, із зазначеними одиницями віміру (наприклад, 30.5deg). Якщо воно не є дійсним значенням, тобто не є мірою кута або виходить за межі діапазону, прийнятого властивістю CSS, використовується значення за замовчуванням.
- Провідні і кінцеві прогалини будуть прибрані.
0deg, або, якщо 0deg не є дійсним значенням для властивості, мінімальним значенням властивості.
deg, grad, rad {{Experimental_Inline}}{{CSSxRef("<angle>")}}Значення атрибута аналізується як CSS {{CSSxRef("<number>")}}, тобто без одиниць виміру (наприклад, 12.5), і трактується як  {{CSSxRef("<angle>")}} із зазначеними одиницями віміру. Якщо воно не є дійсним значенням, тобто не є числом або виходить за межі діапазону, прийнятого властивістю CSS, використовується значення за замовчуванням.
- Провідні і кінцеві прогалини будуть прибрані.
0deg, або, якщо 0deg не є дійсним значенням для властивості, мінімальним значенням властивості.
time {{Experimental_Inline}}{{CSSxRef("<time>")}}Значення атрибута аналізується як CSS {{CSSxRef("<time>")}} вимір, із зазначеними одиницями віміру (наприклад, 30.5ms). Якщо воно не є дійсним значенням, тобто не є значенням часу або виходить за межі діапазону, прийнятого властивістю CSS, використовується значення за замовчуванням.
- Провідні і кінцеві прогалини будуть прибрані.
0s, або, якщо 0s не є дійсним значенням для властивості, мінімальним значенням властивості.
s, ms {{Experimental_Inline}}{{CSSxRef("<time>")}}Значення атрибута аналізується як CSS {{CSSxRef("<number>")}}, що не містить одиниць виміру (наприклад, 12.5), і трактується як {{CSSxRef("<time>")}} із зазначеними одиницями віміру. Якщо воно не є дійсним значенням, тобто не є числом або виходить за межі діапазону, прийнятого властивістю CSS, використовується значення за замовчуванням.
- Провідні і кінцеві прогалини будуть прибрані..
0s, або, якщо 0s не є дійсним значенням для властивості, мінімальним значенням властивості.
frequency {{Experimental_Inline}}{{CSSxRef("<frequency>")}}Значення атрибута аналізується як CSS {{CSSxRef("<frequency>")}} вимір, із зазначеними одиницями віміру (наприклад, 30.5kHz). Якщо воно не є дійсним значенням, тобто не є частотою або виходить за межі діапазону, прийнятого властивістю CSS, використовується значення за замовчуванням.0Hz, або, якщо 0Hz не є дійсним значенням для властивості, мінімальним значенням властивості.
Hz, kHz {{Experimental_Inline}}{{CSSxRef("<frequency>")}}Значення атрибута аналізується як CSS {{CSSxRef("<number>")}}, тобто без одиниць виміру (наприклад, 12.5), і трактується як {{CSSxRef("<frequency>")}} із зазначеними одиницями віміру. Якщо воно не є дійсним значенням, тобто не є частотою або виходить за межі діапазону, прийнятого властивістю CSS, використовується значення за замовчуванням.
- Провідні і кінцеві прогалини будуть прибрані.
0Hz, або, якщо 0Hz не є дійсним значенням для властивості, мінімальним значенням властивості.
% {{Experimental_Inline}}{{CSSxRef("<percentage>")}}Значення атрибута аналізується як CSS {{CSSxRef ("<number>")}}, тобто без одиниць виміру (наприклад, 12.5), і інтерпретується як {{CSSxRef ("<percentage>")}}. Якщо воно не є дійсним значенням, тобто не є числом або виходить за межі діапазону, прийнятого властивістю CSS, використовується значення за замовчуванням.
- Якщо дане значення використовується як довжина, attr () обчислює його до абсолютної довжини.
- Провідні і кінцеві прогалини будуть прибрані.
0%, або, якщо 0% не є дійсним значенням для властивості, мінімальним значенням властивості.
-
-
<fallback> {{Experimental_Inline}}
-
Значення, яке буде використовуватися, якщо пов'язаний атрибут відсутній або містить неприпустиме значення. Резервне значення має бути допустимим, якщо вказано attr(), навіть якщо воно не використовується, і не повинно містити іншого виразу attr(). Якщо attr() не є єдиним значенням компонента властивості, його значення <fallback> повинно мати тип, визначений <type-or-unit>. Якщо не встановлено, CSS буде використовувати значення за замовчуванням, визначений для кожного <type-or-unit>.
-
- -

Формальний синтаксис

- -{{CSSSyntax}} - -

Приклади

- -

Властивість content

- -

HTML

- -
<p data-foo="hello">world</p>
- -

CSS

- -
[data-foo]::before {
-  content: attr(data-foo) " ";
-}
- -

Результат

- -

{{EmbedLiveSample("content_property", "100%", 50)}}

- -

<color> значення

- -

{{SeeCompatTable}}

- -
-

HTML

- -
<div class="background" data-background="lime">background expect to be red if your browser does not support adavanced usage of attr()</div>
- -

CSS

- - - -
.background {
-  background-color: red;
-}
-
-.background[data-background] {
-  background-color: attr(data-background color, red);
-}
-
- -

Результат

- -

{{EmbedLiveSample("color-value", "100%", 50)}}

- -

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

- - - - - - - - - - - - - - - - - - - - - - - - - - -
СпецифікаціяСтатусКоментар
{{SpecName("CSS4 Values", "#attr-notation", "attr()")}}{{Spec2("CSS4 Values")}}Без змін.
{{SpecName("CSS3 Values", "#attr-notation", "attr()")}}{{Spec2("CSS3 Values")}} -

Додано два не обов'язкові параметри;
- може використовуватися зі всіма властивостями;
- може повертати інші значення, крім {{CSSxRef("<string>")}}.

- Ці зміни експериментальні і можуть бути скасовані під час фази CR, якщо підтримка браузерів занадто мала.
{{SpecName("CSS2.1", "generate.html#x18", "attr()")}}{{Spec2("CSS2.1")}}Обмежено властивісттю {{CSSxRef("content")}};
- завжди повертає {{CSSxRef("<string>")}}.
- -

Сумісність браузерів

- - - -

{{Compat("css.types.attr")}}

- -

Також перегляньте

- - diff --git a/files/uk/web/css/backdrop-filter/index.html b/files/uk/web/css/backdrop-filter/index.html deleted file mode 100644 index 6701367b35..0000000000 --- a/files/uk/web/css/backdrop-filter/index.html +++ /dev/null @@ -1,136 +0,0 @@ ---- -title: backdrop-filter -slug: Web/CSS/backdrop-filter -translation_of: Web/CSS/backdrop-filter ---- -
{{CSSRef}}{{SeeCompatTable}}
- -

Властивість backdrop-filter дозволяє застосувати графічні ефекти, такі як розмиття або зміщення кольорів до області позаду елемента. Оскільки це стосується всього, що стоїть поза елементом, щоб побачити ефект, ви повинні зробити елемент або його фон принаймні частково прозорим.

- -
/* Значення ключового слова */
-backdrop-filter: none;
-
-/* URL до SVG фільтру */
-backdrop-filter: url(commonfilters.svg#filter);
-
-/* Значення фільтру функцій */
-backdrop-filter: blur(2px);
-backdrop-filter: brightness(60%);
-backdrop-filter: contrast(40%);
-backdrop-filter: drop-shadow(4px 4px 10px blue);
-backdrop-filter: grayscale(30%);
-backdrop-filter: hue-rotate(120deg);
-backdrop-filter: invert(70%);
-backdrop-filter: opacity(20%);
-backdrop-filter: sepia(90%);
-backdrop-filter: saturate(80%);
-
-/* Кілька фільтрів */
-backdrop-filter: url(filters.svg#filter) blur(4px) saturate(150%);
-
-/* Глобальні значення */
-backdrop-filter: inherit;
-backdrop-filter: initial;
-backdrop-filter: unset;
-
- -

{{cssinfo}}

- -

Синтаксис

- -

Значення

- -
-
none
-
Фільтр відключений для фону
-
<filter-function-list>
-
Перелік фільтрів, розділених пробілами які застосовані для фону. Список фільтрів такий же як і для властивості filter.
-
- -

Формальний синтаксис

- -{{csssyntax}} - -

Приклад

- -

CSS

- -
.box {
-  background-color: rgba(255, 255, 255, 0.3);
-  border-radius: 5px;
-  font-family: sans-serif;
-  text-align: center;
-  line-height: 1;
-  backdrop-filter: blur(10px);
-  -webkit-backdrop-filter: blur(10px);
-  max-width: 50%;
-  max-height: 50%;
-  padding: 20px 40px;
-}
-
-html,
-body {
-  height: 100%;
-  width: 100%;
-}
-
-body {
-  background-image: url('https://lorempixel.com/400/200/');
-  background-position: center center;
-  background-repeat: no-repeat;
-  background-size: cover;
-}
-
-.container {
-  align-items: center;
-  display: flex;
-  justify-content: center;
-  height: 100%;
-  width: 100%;
-}
- -

HTML

- -
<div class="container">
-  <div class="box">
-    <p>backdrop-filter: blur(10px)</p>
-  </div>
-</div>
-
- -

Результат

- -

{{EmbedLiveSample("Example", 600, 400)}}

- -

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

- - - - - - - - - - - - - - - - -
СпецифікацяСтатусКоментар
{{SpecName('Filters 2.0', '#BackdropFilterProperty', 'backdrop-filter')}}{{Spec2('Filters 2.0')}}Initial definition.
- -

Сумісність з браузерами

- - - -

{{Compat("css.properties.backdrop-filter")}}

- -

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

- - diff --git a/files/uk/web/css/css_animations/index.html b/files/uk/web/css/css_animations/index.html deleted file mode 100644 index 9b1af6c15e..0000000000 --- a/files/uk/web/css/css_animations/index.html +++ /dev/null @@ -1,140 +0,0 @@ ---- -title: CSS Animations -slug: Web/CSS/CSS_Animations -tags: - - CSS - - CSS анімації - - Довідка - - Огляд -translation_of: Web/CSS/CSS_Animations ---- -
{{CSSRef}}
- -

CSS-анімації - це модуль CSS, який дозволяє вам змінювати значення CSS-правил впродовж певного часу, використовуючи ключові кадри (keyframes). Поведінка цих анімацій може контролюватися шляхом встановлення їх функцій синхронізації, тривалості, числа повторів, та інших атрибутів.

- -

Довідка

- -

CSS Властивості

- -
- -
- -

CSS @-правила

- -
- -
- -

Посібники

- -
-
Виявлення підтримки CSS-анімації
-
Описує техніку виявлення підтримки браузером CSS-анімації.
-
Використання CSS анімацій
-
Покроковий підручник про те, як створити анімацію засобами CSS. Дана стаття описує кожне відповідне CSS властивість і at-правило, та пояснює, як вони взаємодіють між собою.
-
Підказки і хитрощі для CSS анімацій
-
Підказки і хитрощі, які допоможуть вам досягти якнайкращих результатів у CSS-анімаціях. В даний момент описує техніку, що дозволяє програти спочатку уже запущену анімацію (API не підтримує напряму такий функціонал).
-
- -

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

- - - - - - - - - - - - - - - - -
СпецифікаціяСтатусКоментар
{{ SpecName('CSS3 Animations') }}{{ Spec2('CSS3 Animations') }}Початкове визначення.
- -

Сумісність із браузерами

- -
{{CompatibilityTable}}
- -
- - - - - - - - - - - - - - - - - - - - - -
ВластивістьChromeEdgeFirefox (Gecko)Internet ExplorerOperaSafari (WebKit)
Базова підтримка{{CompatVersionUnknown}}{{property_prefix("-webkit")}}
- 43.0
{{CompatVersionUnknown}}{{CompatGeckoDesktop("5.0")}}{{property_prefix("-moz")}}
- {{CompatGeckoDesktop("16.0")}}
1012{{property_prefix("-o")}}
- 12.10[2]
4.0{{property_prefix("-webkit")}}
-
- -
- - - - - - - - - - - - - - - - - - - - - -
ВластивістьAndroidEdgeFirefox Mobile (Gecko)IE PhoneOpera MobileSafari Mobile
Basic support2.1 {{property_prefix("-webkit")}} [1]
- 4.0 {{property_prefix("-webkit")}}
{{CompatVersionUnknown}}{{CompatGeckoMobile("5.0")}}{{property_prefix("-moz")}}
- {{CompatGeckoMobile("16.0")}}
{{CompatUnknown}}{{CompatUnknown}}{{CompatVersionUnknown}}{{property_prefix("-webkit")}}
-
- -

[1] Часткова підтримка: властивість {{cssxref("animation-fill-mode")}} не підтримується в Android браузері до версії 2.3.

- -

[2] Ознайомтесь із release notes to Opera 12.50.

- -

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

- - - -

 

diff --git a/files/uk/web/css/css_animations/using_css_animations/index.html b/files/uk/web/css/css_animations/using_css_animations/index.html deleted file mode 100644 index eb125ac0af..0000000000 --- a/files/uk/web/css/css_animations/using_css_animations/index.html +++ /dev/null @@ -1,358 +0,0 @@ ---- -title: Використання CSS анімацій -slug: Web/CSS/CSS_Animations/Using_CSS_animations -tags: - - CSS Animations - - Довідка -translation_of: Web/CSS/CSS_Animations/Using_CSS_animations -original_slug: Web/CSS/CSS_Animations/Використання_CSS_анімацій ---- -

{{SeeCompatTable}}{{CSSRef}}

- -

CSS анімації роблять можливим анімацію переходів (transitions) з однєї конфігурації CSS стилю до іншої. Анімації складаються з двох компонентів, а власне - стилю, котрий описує CSS анімацію та набір ключових кадрів (keyframes), які задають початковий та кінцевий стан стилю анімації, а також є можливим задання точок проміжного стану.

- -

В CSS анімацій є три ключові переваги перед традиційними скриптовими техніками анімації:

- -
    -
  1. Вони легкі у використанні для простих анімацій; ви можете створити їх навіть без знань JavaScript.
  2. -
  3. Анімації добре функціонують, навіть при помірному навантаженні на систему. Прості анімації на JavaScript можуть працювати не дуже добре (в разі, якщо вони не ідеально зроблені). Движок рендера може використовувати техніку пропуску кадрів та інші засоби для підтримки гладкої анімації.
  4. -
  5. Надаючи таким чином браузеру контроль над послідовністю анімації ви надаєте можливість брауцзеру оптимізувати свою роботу та ефективність, наприклад, завдяки зупинці анімації у вкладках, які не є відкриті для перегляду.
  6. -
- -

Конфігурування анімації

- -

Щоб створити CSS-анімаційну послідвність, ви стилізуєте анімований елемент {{ cssxref("animation") }} властивістю чи її підвластивостями. Це дозвоялє вам коригувати таймінг, тривалість та інші деталі анімації згідно з вашими потребами. Це не конфігурує актуальний вигляд анімації, яка здійснюється проходом через {{ cssxref("@keyframes") }} at-правила, як це описано в {{ anch("Визначення послідовності анімації через ключові кадри") }} нижче.

- -

Підвластивостями властивості {{ cssxref("animation") }} є:

- -
-
{{ cssxref("animation-delay") }}
-
Змінює час затримки між часом з моменту завантаження елемента та початком анімаційної послідовності.
-
{{ cssxref("animation-direction") }}
-
Визначає зміну напрямку анімації та його чергування в залежності від кількості проходів анімації, а також може задавати повернення в початковий стан і починати прохід заново.
-
{{ cssxref("animation-duration") }}
-
Визначає тривалість циклу анімації.
-
{{ cssxref("animation-iteration-count") }}
-
Визначає кількість проходів (повторів) анімації; ви можете також обрати значення infinite для нескінченного повтору анімації.
-
{{ cssxref("animation-name") }}
-
Задає ім'я для анімації {{ cssxref("@keyframes") }} через at-правило, яке описує анімаційні ключові кадри.
-
{{ cssxref("animation-play-state") }}
-
Дозволяє вам призупиняти та відновлювати анімацію.
-
{{ cssxref("animation-timing-function") }}
-
Задає конфігурацію таймінгу анімації; інакше кажучи, як саме буде анімація робити прохід через ключові кадри, це можливо завдяки кривим прискорення.
-
{{ cssxref("animation-fill-mode") }}
-
Визначає, які значення будуть застосовані для анімації перед початком та після її закінчення.
-
- -

Визначення послідовності анімації через ключові кадри

- -

Опісля того, як ви задали анімації таймінг, вам потрібно задати вигляд анімації. Це робиться завдяки одному чи більше  ключовому кадру шляхом застосування at-правила {{ cssxref("@keyframes") }}. Кожен ключовий кадр описує, як саме повинен відображатися анімований елемент у певний момент під час проходження анімаційної послідовності.

- -

Після того, як таймінг анімації був заданий в CSS стилі, який конгфігурує анімацію, ключові кадри використовують {{ cssxref("percentage") }} для відображення моменту під час анімації, в якому буде розміщений той чи інший ключовий кадр. 0% вказує на сам початок анімаціїйної послідовності, тоді як 100% вказує на завершальний етап анімації. Оскільки ці два моменти є такими важливими, вони мають свої спеціальні імена: from і to відповідно. Обидва ці імені є необов'язковими. Якщо from/0% чи to/100% не є задано, то браузер починає чи зупиняє анімацію використовуючи середньообраховані значення всіх атрибутів.

- -

Ви також можете на свій розсуд додавати проміжні кадри до анімації, аби описати стан анімації в проміжні періоди.

- -

Приклади

- -
Примітка: Подані приклади не використовують вендорних префіксів. WebKit-браузери та старіші версії інших браузерів можуть потребувати цих префіксів; приклади, на які ви можете клацнути для перегляду у вашому браузері також включають -webkit-префіксовані версії.
- -

Текст, що ковзає у вікні браузера

- -

Цей простий приклад стилізує елемент {{ HTMLElement("p") }} так, що текст "зісковзує" в вікно браузера з-поза його правого краю.

- -

Майте на увазі, що такі анімації можуть робити сторінку ширшою, аніж вікно браузера. Аби уникнути такої проблеми, потрібно помістити анімований елемент в контейнер і встановити для останнього {{cssxref("overflow")}}:hidden.

- -
p {
-  animation-duration: 3s;
-  animation-name: slidein;
-}
-
-@keyframes slidein {
-  from {
-    margin-left: 100%;
-    width: 300%;
-  }
-
-  to {
-    margin-left: 0%;
-    width: 100%;
-  }
-}
-
- -

В цьому прикладі стиль для {{ HTMLElement("p") }}-елемента визначає, що тривалість анімації становить 3 секунди від початку до кінця, використовуючи властивість {{ cssxref("animation-duration") }}, а також присвоює ім'я цій анімації, яке використано у ключових кадрах {{ cssxref("@keyframes") }} . Їхні at-правила визначили, що це ключові кадри для анімації, яка називається “slidein”.

- -

Якщо нам потрібно ще якусь додаткову стилізацію елемента {{ HTMLElement("p") }} для відобаження в браузерах, які не підтримують CSS анімацій, то ми б її включили туди ж; однак, в цьому випадку ми не потребуємо додаткової стилізації, крім анімації елемента.

- -

Ключові кадри визначені через  at-правила {{ cssxref("@keyframes") }}. В даному випадку є лише два ключових кадри. Перший ключовий кадр наступає в 0% (вжито спеціальне ім'я from). Тут, ми змінюємо лівий маргін елемента як 100% (тобто це відраховується, як відстань від правого краю контейнера), і встановили 300% ширини для елемента (Втричі ширше за контейнер). Завдяки цьому на першому ключовому кадрі анімований елемент буде знаходитися поза межами контейнера (вікна браузера).

- -

Другий ключовий кадр (він же завершальний) розміщений на завершенні анімації, 100% (спеціальне ім'я to). Лівий маргін встановлено як 0% і ширину елемента ми встановили як 100%. Це спричиняє "приклеювання" елемента до лівого краю вікна браузера.

- -
<p>The Caterpillar and Alice looked at each other for some time in silence:
-at last the Caterpillar took the hookah out of its mouth, and addressed
-her in a languid, sleepy voice.</p>
-
- -

(Перезавантажте сторінку, аби побачити анімацію, або ж клікніть на кнопку CodePen, щоб побачити анімацію в середовищі CodePen)

- -

{{EmbedLiveSample("Making_text_slide_across_the_browser_window","100%","250")}}

- -

Додавання інших ключових кадрів

- -

Давайте додамо ще один ключовий кадр до анімації з попереднього прикладу. Припустимо, нам потрібно трішки збільшити шрифт, коли текст рухається вліво, а потім ми його повертаємо до попередніх параметрів. Це просто, як додавання ось такого ключового кадру:

- -
75% {
-  font-size: 300%;
-  margin-left: 25%;
-  width: 150%;
-}
-
- - - - - -

Це повідомляє браузеру, що елемент, при виконанні 75% анімації, повинен мати лівий маргін 25% і ширину 150%.

- -

(Перезавантажте сторінку, аби побачити анімацію, або ж клікніть на конпку CodePen, щоб побачити анімацію в середовищі CodePen)

- -

{{EmbedLiveSample("Adding_another_keyframe","100%","250")}}

- -

Making it repeat

- -

Якщо вам потрібно, аби анімація повторювалась, просто використайте властивість  {{ cssxref("animation-iteration-count") }} , щоб зазначити, скільки разів повинна повторитися анімація. В даному випадку давайте використаємо значення infinite для отримання постійної анімації:

- -
p {
-  animation-duration: 3s;
-  animation-name: slidein;
-  animation-iteration-count: infinite;
-}
-
- - - - - -

{{EmbedLiveSample("Making_it_repeat","100%","250")}}

- -

Змінюємо напрямки анімації

- -

Отже, анімація повторювана, але це виглядає дивно: текст по завершенню циклу, з початком нового знову стрибає вбік. Отже нам треба зробити, аби текст плавно повертався назад, на початкову позицію. Це просто: прописуємо у {{ cssxref("animation-direction") }} значення alternate:

- -
p {
-  animation-duration: 3s;
-  animation-name: slidein;
-  animation-iteration-count: infinite;
-  animation-direction: alternate;
-}
-
- - - - - -

{{EmbedLiveSample("Making_it_move_back_and_forth","100%","250")}}

- -

Використання скорочень для правил анімації

- -

{{ cssxref("animation") }} скорочення є вигідним для економії місця. От, для прикладу, правила анімації, які ми вже використали в статті:

- -
p {
-  animation-duration: 3s;
-  animation-name: slidein;
-  animation-iteration-count: infinite;
-  animation-direction: alternate;
-}
-
- -

Їх можна замінити ось таким чином

- -
p {
-  animation: 3s infinite alternate slideIn;
-}
- -
-

Примітка: Ви можете дізнатися про це більше на сторінці довідки {{ cssxref("animation") }} :

-
- -

Задання множинних значень властивостей анімації

- -

Нескорочені значення CSS анімації можуть приймати множинні значення, розділені комами — таку особливість можна використати, якщо вам потрібно задати множинні анімації єдиним набором правил і відповідно задати різні тривалості, повтори і так далі для різних анімацій. Давайте глянемо на кілька швидких прикладів, аби пояснити різні зміни:

- -

В першому прикладі у нас є набір з трьох різних імен анімації, але одна й та ж тривалість і кількість повторів:

- -
animation-name: fadeInOut, moveLeft300px, bounce;
-animation-duration: 3s;
-animation-iteration-count: 1;
- -

В другому прикладі в нас є набір з 3х значень для кожної властивості. В цьому випадку кожна анімація буде здійснюватися з відповідними значеннями, згідно з їх розміщенням у властивостях, то ж, приміром, fadeInOut має тривалість в 2.5s і кількість повторів 2,  і т.д..

- -
animation-name: fadeInOut, moveLeft300px, bounce;
-animation-duration: 2.5s, 5s, 1s;
-animation-iteration-count: 2, 1, 5;
- -

У цьому третьому випадку є три різні анімації, але лише дві різні тривалості та кількості повторів. У таких випадках наборів значень недостатньо, то ж кожна анімація отримає свій набір значень шляхом перебору від початку до кінця. Наприклад, fadeInOut отримає тривалість в 2.5s і moveLeft300px матиме тривалість 5s. Набори значень на цьому закінчились, тому все починається з початку і третя анімація bounce отримає тривалість знову в 2.5s. Кількість повторів (та й будь-які інші значення властивостей, які ви задасте) будуть присвоєні такими самим чином.

- -
animation-name: fadeInOut, moveLeft300px, bounce;
-animation-duration: 2.5s, 5s;
-animation-iteration-count: 2, 1;
- -

Використання подій анімації

- -

Ви можете отримати додатковий контроль над анімаціями, як і корисну інформацію про них шляхом використання подій анімації. Ці події, представлені об'єктом {{ domxref("AnimationEvent") }}, можуть бути використані, аби визначити, коли починаються, закінчуються і починають новий повтор різні анімації. Кожна подія містить час, о котрій вона сталась та ім'я анімації, яка її запустила.

- -

Зараз ми змінимо приклад з ковзаючим текстом, аби вивести певну інформацію про кожну анімаційну подію, тобто її час, то ж ми можемо розібратися, як вони працюють.

- -

Додавання CSS

- -

Починаємо зі створення CSS для анімації. Дана анімація триватиме 3 секунди, назвемо її “slidein”, задамо повтор 3 рази, і напрям анімації alternate кожного разу. В {{ cssxref("@keyframes") }}, ширина і лівий маргін змінюються, щоб текст ковзав по екрану.

- -
.slidein {
-  animation-duration: 3s;
-  animation-name: slidein;
-  animation-iteration-count: 3;
-  animation-direction: alternate;
-}
-
-@keyframes slidein {
-  from {
-    margin-left:100%;
-    width:300%
-  }
-
-  to {
-    margin-left:0%;
-    width:100%;
-  }
-}
- -

Встановлення animation event listeners - прослуховування подій анімації

- -

Ми використаємо код JavaScript для прослуховування всіх трьох можливих подій анімації. Даний код задає наші event listeners; ми викликаємо його, коли документ вперше завантажений, для того, щоб отримати впорядковані дані.

- -
var e = document.getElementById("watchme");
-e.addEventListener("animationstart", listener, false);
-e.addEventListener("animationend", listener, false);
-e.addEventListener("animationiteration", listener, false);
-
-e.className = "slidein";
-
- -

Це цілком звичайний код, аби дізнатися більше, ви можете звіритися з документацією {{ domxref("eventTarget.addEventListener()") }}. Останнє, що робить код - він задає клас анімованого елемента як “slidein”; це нам потрібно для запуску анімації.

- -

Чому? Тому що подія animationstart запускається одразу ж, як стартує анімація; в даному випадку це стається до того, як починає діяти наш код. То ж ми починаємо анімацію самі, задаючи клас елементу для стиля, котрий буде анімований по факту.

- -

Отримання подій

- -

Події надсилаються до функції listener(), як це показано нижче.

- -
function listener(e) {
-  var l = document.createElement("li");
-  switch(e.type) {
-    case "animationstart":
-      l.innerHTML = "Started: elapsed time is " + e.elapsedTime;
-      break;
-    case "animationend":
-      l.innerHTML = "Ended: elapsed time is " + e.elapsedTime;
-      break;
-    case "animationiteration":
-      l.innerHTML = "New loop started at time " + e.elapsedTime;
-      break;
-  }
-  document.getElementById("output").appendChild(l);
-}
-
- -

Даний код також дуже простий. Він просто дивиться в {{ domxref("event.type") }}, аби визначити, який власне тип події анімації трапився, тоді додає відповідну примітку в {{ HTMLElement("ul") }} (невпорядкований список), який ми використовуємо для виводу звіту про ці події.

- -

Звіт після завершення роботи буде виглядати якось от так:

- - - -

Зауважте, що часи подій досить точні щодо тих, які ми очікували відповідно до таймінгу, який ми задали, коли створювали анімацію. Візьміть до уваги також і те, що після завершального проходу анімації подія animationiteration не була надіслана; натомість надіслало подію animationend.

- -

HTML

- -

Чисто для повної завершеності огляду ось код, який відображає контент сторіки, включно зі списком звіту про події анімації, який створився завдяки вищеописаному скрипту:

- -
<h1 id="watchme">Watch me move</h1>
-<p>
-  This example shows how to use CSS animations to make <code>H1</code>
-  elements move across the page.
-</p>
-<p>
-  In addition, we output some text each time an animation event fires,
-  so you can see them in action.
-</p>
-<ul id="output">
-</ul>
-</body>
-
- -

{{EmbedLiveSample('Using_animation_events', '600', '300')}}

- -

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

- - diff --git a/files/uk/web/css/css_box_model/index.html b/files/uk/web/css/css_box_model/index.html deleted file mode 100644 index 5bd889607a..0000000000 --- a/files/uk/web/css/css_box_model/index.html +++ /dev/null @@ -1,162 +0,0 @@ ---- -title: Коробчаста модель CSS -slug: Web/CSS/CSS_Box_Model -tags: - - CSS - - Довідка - - Коробчаста модель CSS -translation_of: Web/CSS/CSS_Box_Model -original_slug: Web/CSS/Коробчаста_модель_CSS ---- -
Коробчаста модель (box model) — це алгоритм CSS, що подає елементи (включно з їх {{cssxref("margin", "відступами")}} та {{cssxref("padding", "полями")}}) у вигляді прямокутних «коробок» та компонує їх відповідно до {{cssxref("Visual_formatting_model", "моделі візуального формування")}}.
- -

Довідка

- -

Властивості

- -

Властивості, що визначають потік (flow) вмісту

- -
- -
- -

Властивості, що визначають розміри

- -
- -
- -

Властивості, що визначають відступи

- -
- -
- -

Властивості, що визначають поля

- -
- -
- -

Інші властивості

- -
- -
- -

Посібники

- -
-
Вступ до коробчастої моделі CSS
-
Описує та пояснює одне з ґрунтовних понять в CSS — коробчасту модель. Ця модель визначає, як CSS розташовує елементи, їх вміст, {{cssxref("padding", "поля")}}, {{cssxref("border", "обрамок")}} та {{cssxref("margin", "відступи")}}.
-
Згортання відступів
-
Два прилеглі відступи інколи згортаються в один. Ця стаття наводить правила, за якими це відбувається, та пояснює, як цим керувати.
-
Модель візуального формування
-
Описує та пояснює модель візуального формування.
-
- -

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

- - - - - - - - - - - - - - - - - - - - - - - - - - -
СпецифікаціяСтатусКоментар
{{SpecName("CSS3 Box")}}{{Spec2("CSS3 Box")}} 
{{SpecName("CSS2.1", "box.html")}}{{Spec2("CSS2.1")}} 
{{SpecName("CSS1")}}{{Spec2("CSS1")}}Первинне визначення
- -

Підтримка веб-переглядачами

- -

{{CompatibilityTable}}

- -
- - - - - - - - - - - - - - - - - - - -
FeatureChromeFirefox (Gecko)Internet ExplorerOperaSafari (WebKit)
Basic support1.0{{CompatGeckoDesktop("1")}}3.03.51.0 (85)
-
- -
- - - - - - - - - - - - - - - - - - - -
FeatureAndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Basic support1.0{{CompatGeckoMobile("1")}}6.06.01.0
-
diff --git a/files/uk/web/css/css_box_model/mastering_margin_collapsing/index.html b/files/uk/web/css/css_box_model/mastering_margin_collapsing/index.html deleted file mode 100644 index 44a6f7b56b..0000000000 --- a/files/uk/web/css/css_box_model/mastering_margin_collapsing/index.html +++ /dev/null @@ -1,91 +0,0 @@ ---- -title: Згортання відступів -slug: Web/CSS/CSS_Box_Model/Mastering_margin_collapsing -tags: - - CSS - - Коробчаста модель CSS - - Посібник -translation_of: Web/CSS/CSS_Box_Model/Mastering_margin_collapsing -original_slug: Web/CSS/CSS_Box_Model/Згортання_відступів ---- -
{{CSSRef}}
- -

The top and bottom margins of blocks are sometimes combined (collapsed) into a single margin whose size is the largest of the individual margins (or just one of them, if they are equal), a behavior known as margin collapsing. Note that the margins of floating and absolutely positioned elements never collapse.

- -

Margin collapsing occurs in three basic cases:

- -
-
Безпосередні (прилеглі) сусіди
-
The margins of adjacent siblings are collapsed (except when the latter sibling needs to be cleared past floats).
-
Батько та перший/останній дочірній елемент
-
If there is no border, padding, inline part, {{cssxref("Block_formatting_context")}} created, or clearance to separate the {{cssxref("margin-top")}} of a block from the {{cssxref("margin-top")}} of its first child block; or no border, padding, inline content, {{cssxref("height")}}, {{cssxref("min-height")}}, or {{cssxref("max-height")}} to separate the {{cssxref("margin-bottom")}} of a block from the {{cssxref("margin-bottom")}} of its last child, then those margins collapse. The collapsed margin ends up outside the parent.
-
- -
-
Порожні блоки
-
If there is no border, padding, inline content, {{cssxref("height")}}, or {{cssxref("min-height")}} to separate a block's {{cssxref("margin-top")}} from its {{cssxref("margin-bottom")}}, then its top and bottom margins collapse.
-
- -

More complex margin collapsing (of more than two margins) occurs when these cases are combined.

- -

These rules apply even to margins that are zero, so the margin of a first/last child ends up outside its parent (according to the rules above) whether or not the parent's margin is zero.

- -

When negative margins are involved, the size of the collapsed margin is the sum of the largest positive margin and the smallest (most negative) negative margin.

- -

When all margins are negative, the size of the collapsed margin is the smallest (most negative) margin. This applies to both adjacent elements and nested elements.

- -

Приклади

- -

HTML

- -
<p>The bottom margin of this paragraph is collapsed...</p>
-<p>...with the top margin of this paragraph, yielding a margin of <code>1.2rem</code> in between.</p>
-
-<div>This parent element contains two paragraphs!
-  <p>This paragraph has a <code>.4rem</code> margin between it and the text above.</p>
-  <p>My bottom margin collapses with my parent, yielding a bottom margin of <code>2rem</code>.</p>
-</div>
-
-<p>Blah blah blah.</p>
- -

CSS

- -
div {
-  margin: 2rem 0;
-  background: lavender;
-}
-
-p {
-  margin: .4rem 0 1.2rem 0;
-  background: yellow;
-}
- -

Результат

- -

{{EmbedLiveSample('Examples','100%',250)}}

- -

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

- - - - - - - - - - - - - - - - -
СпецифікаціяСтатусКоментар
{{SpecName("CSS2.1", "box.html#collapsing-margins", "margin collapsing")}}{{Spec2("CSS2.1")}}Первинне визначення
- -

Див. також

- - diff --git a/files/uk/web/css/css_flexible_box_layout/basic_concepts_of_flexbox/index.html b/files/uk/web/css/css_flexible_box_layout/basic_concepts_of_flexbox/index.html deleted file mode 100644 index bbd3d8d5e4..0000000000 --- a/files/uk/web/css/css_flexible_box_layout/basic_concepts_of_flexbox/index.html +++ /dev/null @@ -1,392 +0,0 @@ ---- -title: Використання CSS flexible-боксів -slug: Web/CSS/CSS_Flexible_Box_Layout/Basic_Concepts_of_Flexbox -translation_of: Web/CSS/CSS_Flexible_Box_Layout/Basic_Concepts_of_Flexbox -translation_of_original: Web/CSS/CSS_Flexible_Box_Layout/Using_CSS_flexible_boxes -original_slug: Web/CSS/CSS_Flexible_Box_Layout/Using_CSS_flexible_boxes ---- -
{{CSSRef}}
- -

CSS3 flex-бокс, або flexbox, це режим розмітки створений для упорядкування елементів на сторінці таким чином, щоб вони поводилися передбачувано у випадках, коли розмітка сторінки адаптована під різні розміри екрану і різні девайси.  В багатьох випадках flexible box є вдосконаленням блокової моделі розмітки, яка не використовує обтікання (floats) і не виконує схлопування відступів flex контейнера і  його контенту (margins collapse).

- -

Для багатьох дизайнерів модель використання flex-боксів буде більш простою для застосування. Дочірні елементи всередині flex-боксу можуть розміщуватись у будь-якому напрямку і можуть мати змінні виміри щоб адаптовуватись до різних розмірів дисплею. Позиціонування елементів у такому разі є простішим і комплексна розмітка досягається значно легше і з чистішим кодом, оскільки порядок відображення елементів не пов'язаний із їх порядком в коді. Ця незалежність навмисне стосується лише візуального рендерингу, залишаючи порядок інтерпритації і навігацію залежними від порядку у сорсі.

- -
Увага: Де-які броузери все ще можуть частково або повністю не підтримувати flex боксів. Ознайомтесь із  таблицею сумісності для flex боксів
- -

Концепція flex-боксів

- -

Головною концепцією flex-боксів є можливість зміни висоти та/або ширини його елементів шоб найкраше заповнювати простір будь-якого дисплею. Flex-контейнер збільшує елементи, щоб заповнити доступний простір чи зменшує щоб запобігти перекриванню.

- -

Алгоритм розмітки flex-боксами є напрямно-агностичним на противагу блоковій розмітці, яка вертикально-орієнтована, чи горизонтально-орієнтованій інлайн-розмітці. Не зважаючи на те що розмітка блоками добре підходить для сторінки, їй не вистачає об'єктивного механізму для підтримки компонентів, що повинні змінювати орієнтацію, розміри а також розтягуватись чи стискатись при змінах юзер-агента, змінах з вертикальної на горизонтальну орієнтацію і таке інше. Розмітка flex-боксами найбільш бажана для компонентів додатку і шаблонів, що мало масштабуються, тоді як grid-розмітка створена для великих шаблонів, що масштабуються. Обидві технології є частиною розробки CSS Working Group яка має сприяти сумісності web-аплікацій з різними юзер-агентами, режимами а також більшій гнучкості.

- -

Словник Flexible box термінів  

- -

Оскільки опис flexible-боксів не включає таких словосполучень, як горизонтальна/інлайн і вертикальна/блокова осі, пояснення моделі передбачає нову термінологію. Використовуйте наступну діаграму під час перегляду словника термінів. Вона зображає flex-контейнер, що має  flex-напрямок ряду, що означає, що кожен flex item розміщений горизонтально, один за одним по головній осі (main axis) відповідно до встановленного режиму написання, напрямку тексту елементу. Зліва-направо у данному випадку.

- -

flex_terms.png

- -
-
Flex-контейнер
-
Батьківський елемент, у якому містяться flex-айтеми. Flex-контейнер визначається flex або inline-flex значеннями {{Cssxref("display")}} властивості.
-
Flex-айтем
-
-

Кожен дочірній елемент flex-контейнеру стає flex-айтемом. Текст, що напряму міститься в flex-контейнері обгортається анонімним flex-айтемом.

-
-
Осі
-
-

Кожен flexible-бокс шаблон будується по двох осях. Головна вісь (main axis) - вісь, вздовж якої flex-айтеми слідують один за одним. Перехресна вісь (cross axis) вісь, що перпендикулярна до main axis.

- -
    -
  • Властивість flex-direction встановлює main axis.
  • -
  • Властивість justify-content визначає як flex-айтеми розташовані вздовж main axis на поточній лінії.
  • -
  • Властивість align-items визначає замовчування для розташування flex-айтемів вздовж cross axis на поточній лінії.
  • -
  • Властивість align-self встановлює, як кожен окремий flex-айтем вирівняний по cross axis і переписує замовчування, встановлене за допомогою align-items.
  • -
-
-
Напрямки
-
-

Головний початок/головний кінець(main start/main end) і перехресний початок/перехресний кінець(cross start/cross end) це сторони flex-контейнера, що визначають початок і закінчення потоку flex-айтемів. Вони слідують за головною і перехресною осями flex-контейнера у векторі, встановленому режимом написання (зліва-направо, зправа-наліво і т.д.).

- -
    -
  • Властивість order присвоює елементи порядковим групам і визначає, який елемент є першим.
  • -
  • Властивість flex-flow це скорочена форма для flex-direction та flex-wrap властивостей.
  • -
-
-
Лінії
-
-

Flex-айтеми можуть бути розміщені на одній чи кількох лініях відповідно до flex-wrap властивості, яка контролює напрямок перехресних ліній і напрямок у якому складаються нові лінії.

-
-
Виміри
-
Еквівалентами для height і width для flex-айтемів є main size та cross size, які відповідно стосуються main axis і cross axis flex-контейнера.
-
-
    -
  • Початковим значенням для min-height і min-width є 0.
  • -
  • Властивість flex виступає скороченням для flex-grow, flex-shrink, а також flex-basis властивостей для встановлення гнучкості flex-айтема.
  • -
-
-
- -

Робимо елемент flexible-боксом

- -

Щоб зробити елемент flexible-боксом, вкажіт занчення display властивості наступним чином:

- -
display : flex
- -

або

- -
display : inline-flex
- -

Роблячи таким чином, ми визначаєм елемент як flexible-бокс, а його нащадків- як flexible-айтеми. Значення flex робить контейнер блоковим елементом. А inline-flex значення перетворює його на інлайн-елемент.

- -
Увага: Для вказання префіксу вендора, додайте рядок до значення атрибуту, а не до самого атрибуту. Наприклад, display : -webkit-flex.
- -

Характеристики flex-айтема

- -

Текст, що напряму поміщений до flex-контейнера автоматично обгортається в анонімний flex-айтем. Тим не менше анонімний flex-айтем, що містить лише пробільні симфоли не рендериться, так ніби йому було встановлене правило display: none.

- -

Абсолютно-позиціоновані дочірні елементи flex-контейнера позиціонуються так, що іхня статична позиція визначається відносно головного стартового кута контент-боксу їхнього flex-контейнера.

- -

У сусідніх flex-айтемів марджіни не накладаються один на інший. Використовуючи auto марджіни можна поглинути зайві відстані у вертикальному чи горизонтальному напрямках тим самим досягнувши вирівнювання чи розмежування сусідніх flex-айтемів.  Для детальної інформації прочитайте  вирівнювання з допомогою 'auto' марджінів у W3C специфікації "модель Flexible-бокс розмітки" (англ.).

- -

Для забезпечення адекватного замовчування мінімальних розмірів flex-айтема, використовуйте min-width:auto і/або min-height:auto. Для flex-айтемів, значення атрибуту auto вираховує мінімальну ширину/висоту айтема щоб не були меншими за ширину/висоту їхнього контенту, гарантуючи, що айтем відрендерений достатньо великим, для того, щоб вмістити контент. Дивіться {{cssxref("min-width")}} і {{cssxref("min-height")}} для більш детальної інформації.

- -

Атрибути вирівнювання flex-боксів виконують справжнє центрування, на відміну від інших методів центрування у CSS. Це означає, що flex-айтеми залишаться відцентрованими навіть коли вони виходять за межі flex-контейнера. Хоча така ситуація де-коли можи бути проблемою, оскільки якщо вони виходять за межі верхнього чи лівого (для LTR мов , таких, як англійська чи українська; проблема актуальна для правого краю для RTL мов, таких, як арабська) країв сторінки, вам не вдасться проскролити до цієї частини, не зважаючи на те, що там є контент! В майбутньому релізі властивості вирівнювання мають бути розширені для підтримаки безпечного режиму також. Зараз, якщо це проблема, Ви можете використовувати відступи (margin), щоб досягнути центрування.

- -

For now, if this is a concern, you can instead use margins to achieve centering, as they'll respond in a "safe" way and stop centering if they overflow. Instead of using the align- properties, just put auto margins on the flex items you wish to center. Instead of the justify- properties, put auto margins on the outside edges of the first and last flex items in the flex container. The auto margins will "flex" and assume the leftover space, centering the flex items when there is leftover space, and switching to normal alignment when not. However, if you're trying to replace justify-content with margin-based centering in a multi-line flexbox, you're probably out of luck, as you need to put the margins on the first and last flex item on each line. Unless you can predict ahead of time which items will end up on which line, you can't reliably use margin-based centering in the main axis to replace the justify-content property.

- -

Recall that while the display order of the elements is independent of their order in the source code, this independence affects only the visual rendering, leaving speech order and navigation based on the source order. Even the {{cssxref("order")}} property does not affect speech or navigation sequence. Thus developers must take care to order elements properly in the source so as not to damage the document's accessibility.

- -

Flexible box properties

- -

Properties not affecting flexible boxes

- -

Because flexible boxes use a different layout algorithm, some properties do not make sense on a flex container:

- - - -

Examples

- -

Basic flex example

- -

This basic example shows how to apply "flexibility" to an element and how sibling elements behave in a flexible state.

- -
​<!DOCTYPE html>
-<html lang="en">
-  <head>
-    <style>
-
-   .flex
-   {
-      /* basic styling */
-      width: 350px;
-      height: 200px;
-      border: 1px solid #555;
-      font: 14px Arial;
-
-      /* flexbox setup */
-      display: -webkit-flex;
-      -webkit-flex-direction: row;
-
-      display: flex;
-      flex-direction: row;
-   }
-
-   .flex > div
-   {
-      -webkit-flex: 1 1 auto;
-      flex: 1 1 auto;
-
-      width: 30px; /* To make the transition work nicely.  (Transitions to/from
-                      "width:auto" are buggy in Gecko and Webkit, at least.
-                      See http://bugzil.la/731886 for more info.) */
-
-      -webkit-transition: width 0.7s ease-out;
-      transition: width 0.7s ease-out;
-   }
-
-   /* colors */
-   .flex > div:nth-child(1){ background : #009246; }
-   .flex > div:nth-child(2){ background : #F1F2F1; }
-   .flex > div:nth-child(3){ background : #CE2B37; }
-
-   .flex > div:hover
-   {
-        width: 200px;
-   }
-
-   </style>
-
- </head>
- <body>
-  <p>Flexbox nuovo</p>
-  <div class="flex">
-    <div>uno</div>
-    <div>due</div>
-    <div>tre</div>
-  </div>
- </body>
-</html>
- -

Holy Grail Layout example

- -

This example demonstrates how flexbox provides the ability to dynamically change the layout for different screen resolutions. The following diagram illustrates the transformation.

- -

HolyGrailLayout.png

- -

Illustrated here is the case where the page layout suited to a browser window must be optimized for a smart phone window. Not only must the elements reduce in size, but the order in which they are presented must change. Flexbox makes this very simple.

- -
​<!DOCTYPE html>
-<html lang="en">
-  <head>
-    <style>
-
-  body {
-   font: 24px Helvetica;
-   background: #999999;
-  }
-
-  #main {
-   min-height: 800px;
-   margin: 0px;
-   padding: 0px;
-   display: -webkit-flex;
-   display:         flex;
-   -webkit-flex-flow: row;
-           flex-flow: row;
-   }
-
-  #main > article {
-   margin: 4px;
-   padding: 5px;
-   border: 1px solid #cccc33;
-   border-radius: 7pt;
-   background: #dddd88;
-   -webkit-flex: 3 1 60%;
-           flex: 3 1 60%;
-   -webkit-order: 2;
-           order: 2;
-   }
-
-  #main > nav {
-   margin: 4px;
-   padding: 5px;
-   border: 1px solid #8888bb;
-   border-radius: 7pt;
-   background: #ccccff;
-   -webkit-flex: 1 6 20%;
-           flex: 1 6 20%;
-   -webkit-order: 1;
-           order: 1;
-   }
-
-  #main > aside {
-   margin: 4px;
-   padding: 5px;
-   border: 1px solid #8888bb;
-   border-radius: 7pt;
-   background: #ccccff;
-   -webkit-flex: 1 6 20%;
-           flex: 1 6 20%;
-   -webkit-order: 3;
-           order: 3;
-   }
-
-  header, footer {
-   display: block;
-   margin: 4px;
-   padding: 5px;
-   min-height: 100px;
-   border: 1px solid #eebb55;
-   border-radius: 7pt;
-   background: #ffeebb;
-   }
-
-  /* Too narrow to support three columns */
-  @media all and (max-width: 640px) {
-
-   #main, #page {
-    -webkit-flex-flow: column;
-            flex-direction: column;
-   }
-
-   #main > article, #main > nav, #main > aside {
-    /* Return them to document order */
-    -webkit-order: 0;
-            order: 0;
-   }
-
-   #main > nav, #main > aside, header, footer {
-    min-height: 50px;
-    max-height: 50px;
-   }
-  }
-
- </style>
-  </head>
-  <body>
- <header>header</header>
- <div id='main'>
-    <article>article</article>
-    <nav>nav</nav>
-    <aside>aside</aside>
- </div>
- <footer>footer</footer>
-  </body>
-</html>
- -

Playground

- -

There are a few flexbox playgrounds available online for experimenting:

- - - -

Things to keep in mind

- -

The algorithm describing how flex items are laid out can be pretty tricky at times. Here are a few things to consider to avoid bad surprises when designing using flexible boxes.

- -

Flexible boxes are laid out in conformance of the writing mode, which means that main start and main end are laid out according to the position of start and end.

- -

cross start and cross end rely on the definition of the start or before position that depends on the value of direction.

- -

Page breaks are possible in flexible boxes layout as long as break- property allows it. CSS3 break-after, break-before, and break-inside as well as CSS 2.1 page-break-before, page-break-after, and page-break-inside properties are accepted on a flex container, flex items, and inside flex items.

- -

Browser compatibility

- -

{{CompatibilityTable}}

- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
FeatureFirefox (Gecko)ChromeInternet ExplorerOperaSafari
Basic support (single-line flexbox){{CompatGeckoDesktop("18.0")}}[6]{{property_prefix("-moz")}}[2]
- {{CompatGeckoDesktop("22.0")}}
21.0{{property_prefix("-webkit")}}
- 29.0
11[3]12.10{{property_prefix("-webkit")}}[5]6.1{{property_prefix("-webkit")}}[1]
Multi-line flexbox{{CompatGeckoDesktop("28.0")}}21.0{{property_prefix("-webkit")}}
- 29.0
11[3]12.10[5]
- 15 {{property_prefix("-webkit")}}
6.1{{property_prefix("-webkit")}}[1]
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FeatureFirefox Mobile (Gecko)Firefox OSAndroidIE PhoneOpera MobileSafari Mobile
Basic support (single-line flexbox){{CompatGeckoMobile("18.0")}}{{property_prefix("-moz")}}[2]
- {{CompatGeckoMobile("22.0")}}
-

1.0{{property_prefix("-moz")}}[2]
- 1.1

-
2.1{{property_prefix("-webkit")}}[4]
- 4.4
1112.10[5]
- 15{{property_prefix("-webkit")}}
7{{property_prefix("-webkit")}}[1]
Multi-line flexbox{{CompatGeckoMobile("28.0")}}1.32.1{{property_prefix("-webkit")}}[4]
- 4.4
1112.10[5]
- 15{{property_prefix("-webkit")}}
7{{property_prefix("-webkit")}}[1]
-
- -

[1] Safari up to version  6.0 (iOS.1) supported an old incompatible draft version of the specification. Safari 6.1 (and Safari on iOS 7) has been updated to support the final version.

- -

[2] Up to Firefox 22, to activate flexbox support, the user has to change the about:config preference layout.css.flexbox.enabled to true. From Firefox 22 to Firefox 27, the preference is true by default, but the preference has been removed in Firefox 28.

- -

[3] Internet Explorer 10 supports an old incompatible draft version of the specification; Internet Explorer 11 has been updated to support the final version.

- -

[4] Android browser up to 4.3 supported an old incompatible draft version of the specification. Android 4.4 has been updated to support the final version.

- -

[5] While in the initial implementation in Opera 12.10 flexbox was not prefixed, it got prefixed in versions 15 to 16 of Opera and 15 to 19 of Opera Mobile with {{property_prefix("-webkit")}}. The prefix was removed again in Opera 17 and Opera Mobile 24.

- -

[6] Up to Firefox 29, specifying visibility: collapse on a flex item causes it to be treated as if it were display: none instead of the intended behavior, treating it as if it were visibility: hidden. The suggested workaround is to use visibility:hidden for flex items that should behave as if they were designated visibility:collapse. For more information, see {{bug(783470)}}

diff --git a/files/uk/web/css/css_flexible_box_layout/index.html b/files/uk/web/css/css_flexible_box_layout/index.html deleted file mode 100644 index 3520d3040d..0000000000 --- a/files/uk/web/css/css_flexible_box_layout/index.html +++ /dev/null @@ -1,132 +0,0 @@ ---- -title: CSS Flexible Box Layout -slug: Web/CSS/CSS_Flexible_Box_Layout -tags: - - CSS - - CSS Flexible Boxes - - CSS Reference - - NeedsTranslation - - Overview - - TopicStub -translation_of: Web/CSS/CSS_Flexible_Box_Layout ---- -

{{CSSRef}}

- -

CSS Flexible Box Layout це модуль CSS що реалізує можливість розмітки макета за допомогою оптимізованої коробочної моделі, що використовується для створення дизайну інтерфейса користувача, та проводити вирівнювання елементів в одному із вимірів. В цій моделі (flex layout), потомки flex контейнера можуть бути розміщені відносно будь якої осі, і можуть "гнучко" змінювати свій розмір, можуть рости, щоб зайняти весь відведений простір або зменшуватись щоб не переповнити своїми поточними розмірами контейнер, що їх містить. Наявне і горизонтальне і вертикальне вирівнювання потомків, і до того-ж проводити будь-які маніпуляції дуже легко.

- -

 

- -

 

- -

Простий Приклад

- -

В наступному прикладі у контейнерa встановлено властивість display: flex, що означає - три його вкладені елементи є  flex елементами. Значення justify-content має значення space-between для того щоб порожній простір між елементами рівномірно розподілився по головній осі. Однаковий простір буде виділений між кожним елементом, але при цьому крайні елементи(перший та останній) не будуть мати  справа та зліва відповідно відступів від контейнера. Ви можете бачити що елементи будуть розподілені по поточній направляючій вісі, бо на це впливають виставлені по замовчуванню значення властивості align-items рівний stretch. Елементи розтягуються по висоті flex контейнера, і кожен стане такої висоти як самий вищий елемент.

- -

{{EmbedGHLiveSample("css-examples/flexbox/basics/simple-example.html", '100%', 500)}}

- -

Reference

- -

 

- -

Reference

- -

CSS Properties

- -
- -
- -

Guides

- -
-
Using CSS flexible boxes
-
Step-by-step tutorial about how to build layouts using this feature.
-
Using flexbox to lay out Web applications
-
Tutorial explaining how to use flexbox in the specific context of Web applications.
-
- -

Specifications

- - - - - - - - - - - - - - - - -
SpecificationStatusComment
{{ SpecName('CSS3 Flexbox') }}{{ Spec2('CSS3 Flexbox') }}Initial definition.
- -

Browser compatibility

- -

{{CompatibilityTable()}}

- -
- - - - - - - - - - - - - - - - - - - -
FeatureFirefox (Gecko)ChromeInternet ExplorerOperaSafari
Basic support{{CompatGeckoDesktop("20.0")}}21.0{{property_prefix("-webkit")}}
- 29.0
10.0{{property_prefix("-ms")}}
- 11.0
12.106.1{{property_prefix("-webkit")}}
-
- -
- - - - - - - - - - - - - - - - - - - -
FeatureFirefox Mobile (Gecko)AndroidIE PhoneOpera MobileSafari Mobile
Basic support{{CompatVersionUnknown()}}4.41112.107.1{{property_prefix("-webkit")}}
-
- -

 

diff --git a/files/uk/web/css/css_grid_layout/basic_concepts_of_grid_layout/index.html b/files/uk/web/css/css_grid_layout/basic_concepts_of_grid_layout/index.html deleted file mode 100644 index 84c95201bb..0000000000 --- a/files/uk/web/css/css_grid_layout/basic_concepts_of_grid_layout/index.html +++ /dev/null @@ -1,699 +0,0 @@ ---- -title: Основна концепція макета grid -slug: Web/CSS/CSS_Grid_Layout/Basic_Concepts_of_Grid_Layout -tags: - - CSS Grid - - Посібник -translation_of: Web/CSS/CSS_Grid_Layout/Basic_Concepts_of_Grid_Layout ---- -

CSS Grid Layout вводить двовимірну сітку до CSS. Сітки можуть бути використані для виділення основних областей сторінки або невеликих елементів інтерфейсу користувача. У цій статті надана схема CSS Grid Layout та нова термінологія, що є частиною специфікації CSS Grid Layout Level 1. Функції, наведені в цьому огляді, будуть більш детально пояснені далі в цьому посібнику.

- -

Що таке grid?

- -

Grid є перехресним набором  горизонтальних і вертикальних ліній, що перетинаються - один набір визначає стовпці,  інший рядки. Елементи можуть бути розміщені на сітці, дотримуючись цих стовпців та рядків. Макет сітки CSS має такі особливості:

- -

Фіксовані та гнучкі розміри смуг

- -

Ви можете створити сітку з фіксованими розмірами смуг – наприклад, використовуючи пікселі. Це встановлює сітку на певні пікселі, що відповідають бажаному макету. Ви також можете створити сітку з використанням гнучких розмірів у відсотках або з новою одиницею fr, яку розроблену саме для цієї мети.

- -

Розміщення елементів

- -

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

- -

Створення додаткових смуг для вмісту

- -

Ви можете визначати сітку явно в макеті сітки, але специфікація також стосується вмісту, доданого за межами оголошеної сітки, додаючи додаткові рядки та стовпчики за потребою. Спрацьовує принцип додавання " стільки стовпчиків, скільки вміститься в контейнер".

- -

Управління вирівнюванням

- -

Сітка містить функції вирівнювання для того, щоб ми могли контролювати, як вирівнюються розміщені в області сітки елементи  та як вирівнюється вся Grid-сітка.

- -

Управління вмістом, що перекривається

- -

У секцію сітки можна додати більш ніж один елемент. Також області можуть частково перекривати одна одну. Цим накладенням можна керувати за допомогою {{cssxref("z-index")}} властивості.

- -

Grid - це потужна специфікація, яка у поєднанні з іншими можливостями CSS такими, як flexbox, дозволяє вам створювати макети, які раніше неможливо було створити за допомогою CSS. Все починається шляхом створення сітки у grid-контейнері.

- -

Grid-контейнер

- -

Ми створюємо grid-контейнер оголошуючи display: grid або display: inline-grid на елементі. Як тільки ми це зробимо, всі прямі діти елементу стають grid-елементами.

- -

У цьому прикладі, у мене div-елемент з класом wrapper, що містить в собі п'ять дочірніх елементів.

- -
<div class="wrapper">
-  <div>One</div>
-  <div>Two</div>
-  <div>Three</div>
-  <div>Four</div>
-  <div>Five</div>
-</div>
-
- -

Я роблю з класу .wrapper grid-контейнер.

- -
.wrapper {
-  display: grid;
-}
-
- - - -

{{ EmbedLiveSample('The_Grid_container', '200', '330') }}

- -

Всі прямі нащадки тепер є grid-елементами. В браузері ви не помітите ніякої різниці між виглядом елементів до і після створення grid-контейнеру. З цієї точки зору вам буде корисно працювати в редакторі Firefox Developer Edition, який має Grid Inspector, доступний як частина інструментів розробника. Якщо ви розглянете цей приклад в  Firefox і перевірите grid, ви побачите маленький значок біля значення grid. Клікніть його і сітка накладеться на цей елемент у вікні браузера.

- -

Using the Grid Highlighter in DevTools to view a grid

- -

Як вийде - працюйте з  CSS Grid Layout, це інструмент надасть вам краще розуміння того що відбувається з вашою grid-сіткою візуально. 

- -

Якщо ми хочемо щоб це було більше grid-орієнтовано, треба додавати більше смуг-стовбців.

- -

Grid Смуги

- -

Ми визначаємо рядки і стовпчики на нашій grid-сітці  властивостями {{cssxref("grid-template-columns")}} та {{cssxref("grid-template-rows")}}. Вони визначають grid смуги. Grid-смуга – це простір будь якими двома лініями на grid-сітці. На зображенні нижче кольорова смуга – перша смуга-рядок на нашій grid-сітці.

- -

- -

До попереднього прикладу можна додати властивість  grid-template-columns, визначаючи розмір смуг-стовпчиків.

- -

Таким чином створено grid-сітку з трьома смугами-стовпчиками шириною по 200 рх. Дочірні елементи вкладатимуться в цю grid-сітку в кожну клітинку. 

- -
-
<div class="wrapper">
-  <div>One</div>
-  <div>Two</div>
-  <div>Three</div>
-  <div>Four</div>
-  <div>Five</div>
-</div>
-
- -
.wrapper {
-  display: grid;
-  grid-template-columns: 200px 200px 200px;
-}
-
- - - -

{{ EmbedLiveSample('grid_first', '610', '140') }}

-
- -

Одиниця fr 

- -

Смуги визначаються одиницями довжини. Grid-сітка має додаткову одиницю довжини яка допомагає створювати гнучкі grid-смуги. Одиниця fr  являє собою частку вільного простору в  grid-контейнері. Наступна сітка створює три рівних по ширині смуги які  стають більше і менше відповідно наявному простору. 

- -
-
<div class="wrapper">
-  <div>One</div>
-  <div>Two</div>
-  <div>Three</div>
-  <div>Four</div>
-  <div>Five</div>
-</div>
-
- -
.wrapper {
-  display: grid;
-  grid-template-columns: 1fr 1fr 1fr;
-}
-
- - - -

{{ EmbedLiveSample('fr_unit_ls', '220', '140') }}

-
- -

В наступному прикладі ми створюємо визначення з 2fr смугою і дві 1fr смуги. Доступний простір розділений на чотири частини, дві з яких надаються першій смузі і по одній частині кожній з наступних двох.

- -
.wrapper {
-  display: grid;
-  grid-template-columns: 2fr 1fr 1fr;
-}
-
- -

В останньому прикладі ми комбінуємо абсолютні одиниці ширини смуг з фракційними. Перша смуга  500 px, фіксована ширина відбирається з доступного простору. Решта простору ділиться на три і призначається двом гнучким смугам пропорційно. 

- -
.wrapper {
-  display: grid;
-  grid-template-columns: 500px 1fr 2fr;
-}
-
- -

Визначення смуг зі значенням repeat()

- -

Великі grid-сітки з багатьма стугами можуть використовувати значення repeat() для скорочення при визначенні стовпчиків: 

- -
.wrapper {
-  display: grid;
-  grid-template-columns: 1fr 1fr 1fr;
-}
-
- -

Також може бути записано як:

- -
.wrapper {
-  display: grid;
-  grid-template-columns: repeat(3, 1fr);
-}
-
- -

Значення repeat може використовуватись лише для частини стовпчиків. В наступному прикладі ініційовано смугу 20 рх, секцію з 6 смуг шириною 1fr, і смугу 20 рх. 

- -
.wrapper {
-  display: grid;
-  grid-template-columns: 20px repeat(6, 1fr) 20px;
-}
-
- -

Значення repeat визначає смуги, тобто його можливо використовувати для створення цілих шаблонів стовпчиків. В наступному прикладі grid-сітка складається з 10 смуг. Смуга 1fr , смуга 2fr і так п'ять разів.

- -
.wrapper {
-  display: grid;
-  grid-template-columns: repeat(5, 1fr 2fr);
-}
-
- -

Неявна і явна Grid-сітка

- -

Cтворюючи Grid-сітку нашого прикладу, ми визначили стовпчики-смуги властивістю {{cssxref("grid-template-columns")}}, але дозволимо grid-сітці створювати рядки так, як краще для контенту. Такі рядки створюються в неявній grid-сітці. Явна grid-сітка складається з рядків і стовпчиків, які визначаються властивостями  {{cssxref("grid-template-columns")}} та {{cssxref("grid-template-rows")}}.

- -

Якщо ми розташовуємо щось поза цією grid-сіткою, або кількість вмісту потребує більше grid смуг, тоді  grid-сітка створює рядки і стовпчики в неявній  grid-сітці. Такі смуги матимуть авторозмір за замовчуванням якраз щоб вмістити свій контент.

- -

Ви також можете визначити встановлений розмір для смуг, створених в неявній grid-сітці властивостями {{cssxref("grid-auto-rows")}} та {{cssxref("grid-auto-columns")}}.

- -

В прикладі нижче ми використовуємо grid-auto-rows  щоб забезпечити неявне створення смуги висотою 200 рх.

- -
<div class="wrapper">
-  <div>One</div>
-  <div>Two</div>
-  <div>Three</div>
-  <div>Four</div>
-  <div>Five</div>
-</div>
-
- -
.wrapper {
-  display: grid;
-  grid-template-columns: repeat(3, 1fr);
-  grid-auto-rows: 200px;
-}
-
- - - -

{{ EmbedLiveSample('The_implicit_and_explicit_grid', '230', '420') }}

- -

Розміри смуги і minmax()

- -

Встановлюючи явну grid-сітку або визначаючи розміри для автоматично створених рядків або стовпчиків може виникнути необхідність надання смугам мінімального розміру. Але треба переконатись що розширюючись, вони відповідатимуть будь якому доданому контенту. Наприклад ми хочемо щоб рядки ніколи не були менше 100 рх, але якщо контент розширюється до 300 рх, ми б хотіли щоб рядок розширився до такої висоти. 

- -

Grid для таких випадків має функцію {{cssxref("minmax", "minmax()")}}. В наступному прикладі я використовую minmax()в значенні {{cssxref("grid-auto-rows")}}. Це означає, що автоматично створені рядки матимуть мінімальну висоту 100 рх, а максимальну auto. Використання auto означає, що розмір буде підлаштовуватись під розмір контенту таким чином, щоб вмістити найвищий елемент в цьому рядку.

- -
.wrapper {
-  display: grid;
-  grid-template-columns: repeat(3, 1fr);
-  grid-auto-rows: minmax(100px, auto);
-}
-
- - - -
<div class="wrapper">
-  <div>One</div>
-  <div>Two
-    <p>I have some more content in.</p>
-    <p>This makes me taller than 100 pixels.</p>
-  </div>
-  <div>Three</div>
-  <div>Four</div>
-  <div>Five</div>
-</div>
- -

{{ EmbedLiveSample('Track_sizing_and_minmax()', '240', '470') }}

- -

Grid Лінії

- -

Варто зауважити що коли ми визначаємо Grid, ми визначаємо grid-смуги (але не grid-лінії). В такому випадку Grid дає нам нумеровані лінії для позиціонування елементів. В прикладі нижче Grid має 3 стовпчика, 2 рядки і 4 вертикальних лінії.

- -

Diagram showing numbered grid lines.

- -

Лінії пронумеровано згідно способу нумерації документа: зліва направо і зверху вниз (якщо на мові що викоричтовується пишуть справа наліво, то і нумерація ліній справа наліво). Лінії також можуть бути поіменовані.

- -

Позиціонування елементів по лініях

- -

Наступний приклад демонструє просте позиціонування елементів по лініях. При розміщенні елементів ми надаємо перевагу більше лініям ніж смугам.

- -

В наступному прикладі ми розміщуємо перші два елементи на Grid-cітці, яка складається з трьох смуг-стовпчиків, застосовуючи властивості {{cssxref("grid-column-start")}}, {{cssxref("grid-column-end")}}, {{cssxref("grid-row-start")}} та {{cssxref("grid-row-end")}}.  Рухаючись зліва направо, перший елемент починається з вертикальної лініі 1 і простягається до вертикальної лініі 4, що праворуч нашої Grid-сітки. Він починається на горизонтальній лінії 1 і закінчується на горизонтальній лінії 3, тобто займає два рядка смуг.

- -

Другий елемент починається з вертикальної лініі 1, і простягається на одну смугу. Це за замовчуванням, тому можна не вказувати кінцеву лінію. Також по рядках він простягається з горизонтальній лінії 3 до горизонтальній лінії 5. Інші елементи розміщуються в порожніх просторах на Grid-сітці.

- -
<div class="wrapper">
-  <div class="box1">One</div>
-  <div class="box2">Two</div>
-  <div class="box3">Three</div>
-  <div class="box4">Four</div>
-  <div class="box5">Five</div>
-</div>
-
- -
.wrapper {
-  display: grid;
-  grid-template-columns: repeat(3, 1fr);
-  grid-auto-rows: 100px;
-}
-.box1 {
-  grid-column-start: 1;
-  grid-column-end: 4;
-  grid-row-start: 1;
-  grid-row-end: 3;
-}
-.box2 {
-  grid-column-start: 1;
-  grid-row-start: 3;
-  grid-row-end: 5;
-}
-
- - - -

{{ EmbedLiveSample('Positioning_items_against_lines', '230', '420') }}

- -

Не забуваймо, що можна використовувати Grid Inspector в Firefox Developer Tools щоб побачити як елементи позиціонуються на лініях Grid-сітки.

- -

Grid-клітини

- -

Grid-клітина – найменша одиниця Grid-сітки, по аналогії з чарунком таблиці. Як ми бачили в попередніх прикладах, якщо Grid-сітка визначена як батьківська, дочірні елементи лежатимуть по одному в кожній її клітині. На зображенні кольором позначено першу клітину Grid-сітки.

- -

The first cell of the grid highlighted

- -

Grid-ділянки

- -

Елементи можуть розташовуватись на одній або декількох клітинках як в рядок так і в стовпчик, і це створює Grid-ділянки. Grid-ділянки завжди прямокутні, неможлива, наприклад, L-подібна Grid-ділянка. На зображенні Grid-ділянка займає два рядки і два стовпчики.

- -

A grid area

- -

Розриви

- -

Розриви між Grid-клітинами створюються властивістями {{cssxref("grid-column-gap")}} та {{cssxref("grid-row-gap")}}, або скорочено {{cssxref("grid-gap")}}. В наступному прикладі створюється проміжок у 10рх між стовпчиками та проміжок 1em між рядками. 

- -
.wrapper {
-  display: grid;
-  grid-template-columns: repeat(3, 1fr);
-  column-gap: 10px;
-  row-gap: 1em;
-}
- -
-

Примітка: Коли гріди тільки почали використовуватись браузерами {{cssxref("column-gap")}}, {{cssxref("row-gap")}} та {{cssxref("gap")}} мали префікси grid- як от {{cssxref("grid-column-gap")}}, {{cssxref("grid-row-gap")}} та {{cssxref("grid-gap")}} відповідно.

- -

Браузери наразі оновлюються, щоб видалити цей префікс, проте попередньо встановлені версії також будуть підтримуватися як псевдоніми, що робить їх безпечними для використання. В даний час деякі веб-переглядачі не підтримують безпрефіксний варіант, тому в прикладах цього посібника використовуюється версія з grid- префіксом.

-
- -
<div class="wrapper">
-  <div>One</div>
-  <div>Two</div>
-  <div>Three</div>
-  <div>Four</div>
-  <div>Five</div>
-</div>
- - - -

{{ EmbedLiveSample('Gutters') }}

- -

Будь-який простір, відведений на розриви, буде враховуватись до відведення простору для гнучких fr довжин смуг. Розриви використовуваються в розмітці, як звичайні grid-смуги, за виключенням того, що ви не зможете в них нічого помістити. З точки зору лінійного позиціонування розрив діє як товста лінія.

- -

Вкладені Grid-сітки

- -

Grid-елементи можуть ставати Grid-контейнерами. В попередньому прикладі ми створили Grid-сітку з трьох стовпчиків з двома позиціонованими елементами.  Перший з них має піделементи. Оскільки ці елементи не є прямими нащадками, вони не беруть участі в  Grid-розкладці і відображаються в нормальному потоці. 

- -
-
<div class="wrapper">
-  <div class="box box1">
-    <div class="nested">a</div>
-    <div class="nested">b</div>
-    <div class="nested">c</div>
-  </div>
-  <div class="box box2">Two</div>
-  <div class="box box3">Three</div>
-  <div class="box box4">Four</div>
-  <div class="box box5">Five</div>
-</div>
-
- -

Nested grid in flow

- -

Якщо застосувати display: grid до box1, то ця Grid-смуга також стане Grid-сіткою. А елементи, що в ній містяться, надалі розташовуватимуться на цій новій Grid-сітці.

- -
.box1 {
-  grid-column-start: 1;
-  grid-column-end: 4;
-  grid-row-start: 1;
-  grid-row-end: 3;
-  display: grid;
-  grid-template-columns: repeat(3, 1fr);
-}
- - -
- -

{{ EmbedLiveSample('nesting', '600', '340') }}

- -

В цьому випадку, дочірня сітка немає відношення до батьківської. Як ви можете бачити на прикладі, вона не наслідує батьківськи {{cssxref("grid-gap")}}, а також лінії дочірньої сітки не вирівнюються по лініях батьківської сітки.

- -

Під-сітка

- -

У робочій чорнетці специфікації Grid Level 2 є функція під назвою subgrid, яка має дозволити нам створювати вкладені сітки, які б використовували визначення смуги батьківської сітки.

- -
-

Примітка: під-сітки ще не реалізовані в жодному браузері, і їхня специфікація ще може змінюватися.

-
- -

У поточній специфікації ми відредагуємо вищезгаданий приклад вкладеної Grid-сітки, змінивши визначення смуги з grid-template-columns: repeat(3, 1fr) , на grid-template-columns: subgrid. Вкладена сітка надалі використовуватиме батьківські Grid-смуги до елементів макета.

- -
.box1 {
-  grid-column-start: 1;
-  grid-column-end: 4;
-  grid-row-start: 1;
-  grid-row-end: 3;
-  display: grid;
-  grid-template-columns: subgrid;
-}
- -

Нашарування елементів за допомогою z-index

- -

Grid-елементи можуть займати одну і ту ж саму клітину. Якщо повернутись до нашого прикладу з елементами, що розташовані за номером рядка, ми можемо змінити його так, щоб два елементи перекривали один одного.

- -
-
<div class="wrapper">
-  <div class="box box1">One</div>
-  <div class="box box2">Two</div>
-  <div class="box box3">Three</div>
-  <div class="box box4">Four</div>
-  <div class="box box5">Five</div>
-</div>
- -
.wrapper {
-  display: grid;
-  grid-template-columns: repeat(3, 1fr);
-  grid-auto-rows: 100px;
-}
-
-.box1 {
-  grid-column-start: 1;
-  grid-column-end: 4;
-  grid-row-start: 1;
-  grid-row-end: 3;
-}
-
-.box2 {
-  grid-column-start: 1;
-  grid-row-start: 2;
-  grid-row-end: 4;
-}
- - -
- -

{{ EmbedLiveSample('l_ex', '230', '420') }}

- -

Елемент box2 тепер перекриває box1, він відображається зверху, тому що пізніше трапляеться в коді документу.

- -

Керування послідовністю

- -

Ми можемо контролювати порядок, в якому елементи накладаються один на одного, використовуючи властивість z-index. Якщо надати box2 нижчий z-index, ніж в box1, то він і буде показаний нижче у стеці.

- -
.wrapper {
-  display: grid;
-  grid-template-columns: repeat(3, 1fr);
-  grid-auto-rows: 100px;
-}
-
-.box1 {
-  grid-column-start: 1;
-  grid-column-end: 4;
-  grid-row-start: 1;
-  grid-row-end: 3;
-  z-index: 2;
-}
-
-.box2 {
-  grid-column-start: 1;
-  grid-row-start: 2;
-  grid-row-end: 4;
-  z-index: 1;
-}
-
- - - -

{{ EmbedLiveSample('Controlling_the_order', '230', '420') }}

- -

Наступні кроки

- -

У цій статті ми швидко переглянули специфікацію Grid Layout. Пограйте з прикладами коду, а потім переходьте до наступної частини цього посібника, де ми насправді почнемо заглиблюватись в деталі CSS Grid Layout.

- - diff --git a/files/uk/web/css/css_grid_layout/index.html b/files/uk/web/css/css_grid_layout/index.html deleted file mode 100644 index e403f8364f..0000000000 --- a/files/uk/web/css/css_grid_layout/index.html +++ /dev/null @@ -1,245 +0,0 @@ ---- -title: CSS Grid Layout -slug: Web/CSS/CSS_Grid_Layout -tags: - - CSS - - Grid Layout - - Grids - - Layout - - NeedsTranslation - - Overview - - Reference - - TopicStub -translation_of: Web/CSS/CSS_Grid_Layout ---- -

CSS Grid layout відзначається тим, що розділяє сторінку на ділянки чи задає співвідношення між елементами, побудованими з HTML примітивів, з точки зору розміру, положення та слоїв.

- -

Подібно до таблиць, CSS Grid дозволяє автору вирівнювати елементи у стовпчиках та рядках. Однак, CSS Grid, в порівнянні з таблицями, надає більше можливостей і полегшує створення макетів. Наприклад, дочірні елементи Grid-контейнера можуть перекривати один одного і нашаровуватись, подібно до позиційованих CSS елементів.

- -

Базовий приклад

- -

У наведеному нижче прикладі показана сітка з трьома стовпчиками, в якій нові рядки мають мінімальну висоту 100 пікселів, а максимальна висота вираховується автоматично. Елементи розміщені в сітці використовуючи лінійне розташування .

- -
- - -

HTML

- -
<div class="wrapper">
-  <div class="one">One</div>
-  <div class="two">Two</div>
-  <div class="three">Three</div>
-  <div class="four">Four</div>
-  <div class="five">Five</div>
-  <div class="six">Six</div>
-</div>
- -

CSS

- -
.wrapper {
-  display: grid;
-  grid-template-columns: repeat(3, 1fr);
-  grid-gap: 10px;
-  grid-auto-rows: minmax(100px, auto);
-}
-.one {
-  grid-column: 1 / 3;
-  grid-row: 1;
-}
-.two {
-  grid-column: 2 / 4;
-  grid-row: 1 / 3;
-}
-.three {
-  grid-column: 1;
-  grid-row: 2 / 5;
-}
-.four {
-  grid-column: 3;
-  grid-row: 3;
-}
-.five {
-  grid-column: 2;
-  grid-row: 4;
-}
-.six {
-  grid-column: 3;
-  grid-row: 4;
-}
-
- -

{{ EmbedLiveSample('example', '500', '440') }}

-
- -

Посилання

- -

CSS властивості

- -
- -
- -

CSS функції

- -
- -
- -

Глосарій

- -
- -
- -

Посібники

- -
- -
- -

Зовнішні ресурси

- - - -

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

- - - - - - - - - - - - - - - - -
SpecificationStatusComment
{{ SpecName('CSS3 Grid') }}{{ Spec2('CSS3 Grid') }}Initial definition.
- - diff --git a/files/uk/web/css/css_grid_layout/relationship_of_grid_layout/index.html b/files/uk/web/css/css_grid_layout/relationship_of_grid_layout/index.html deleted file mode 100644 index 7f715c0986..0000000000 --- a/files/uk/web/css/css_grid_layout/relationship_of_grid_layout/index.html +++ /dev/null @@ -1,628 +0,0 @@ ---- -title: Relationship of grid layout to other layout methods -slug: Web/CSS/CSS_Grid_Layout/Relationship_of_Grid_Layout -translation_of: Web/CSS/CSS_Grid_Layout/Relationship_of_Grid_Layout ---- -

CSS Grid Layout has been designed to work alongside other parts of CSS, as part of a complete system for doing the layout. In this guide, I will explain how a grid fits together with other techniques you may already be using.

- -

Grid and flexbox

- -

The basic difference between CSS Grid Layout and CSS Flexbox Layout is that flexbox was designed for layout in one dimension - either a row or a column. Grid was designed for two-dimensional layout - rows, and columns at the same time. The two specifications share some common features, however, and if you have already learned how to use flexbox, the similarities should help you get to grips with Grid.

- -

Одновимірні макети проти двовимірних

- -

A simple example can demonstrate the difference between one- and two-dimensional layouts.

- -

In this first example, I am using flexbox to lay out a set of boxes. I have five child items in my container, and I have given the flex properties values so that they can grow and shrink from a flex-basis of 200 pixels.

- -

I have also set the {{cssxref("flex-wrap")}} property to wrap, so that if the space in the container becomes too narrow to maintain the flex basis, items will wrap onto a new row.

- -
- - -
<div class="wrapper">
-  <div>One</div>
-  <div>Two</div>
-  <div>Three</div>
-  <div>Four</div>
-  <div>Five</div>
-</div>
-
- -
.wrapper {
-  display: flex;
-  flex-wrap: wrap;
-}
-.wrapper > div {
-  flex: 1 1 200px;
-}
-
-
- -

{{ EmbedLiveSample('onedtwod', '500', '230') }}

- -

In the image, you can see that two items have wrapped onto a new line. These items are sharing the available space and not lining up underneath the items above. This is because when you wrap flex items, each new row (or column when working by column) becomes a new flex container. Space distribution happens across the row.

- -

A common question then is how to make those items line up. This is where you want a two-dimensional layout method: You want to control the alignment by row and column, and this is where grid comes in.

- -

The same layout with CSS grids

- -

In this next example, I create the same layout using Grid. This time we have three 1fr column tracks. We do not need to set anything on the items themselves; they will lay themselves out one into each cell of the created grid. As you can see they stay in a strict grid, lining up in rows and columns. With five items, we get a gap on the end of row two.

- -
- - -
<div class="wrapper">
-  <div>One</div>
-  <div>Two</div>
-  <div>Three</div>
-  <div>Four</div>
-  <div>Five</div>
-</div>
-
- -
.wrapper {
-  display: grid;
-  grid-template-columns: repeat(3, 1fr);
-}
-
- -

{{ EmbedLiveSample('Two_Dimensional_With_Grid', '300', '170') }}

-
- -

A simple question to ask yourself when deciding between grid or flexbox is:

- - - -

Content out or layout in?

- -

In addition to the one-dimensional versus two-dimensional distinction, there is another way to decide if you should use flexbox or grid for a layout. Flexbox works from the content out. An ideal use case for flexbox is when you have a set of items and want to space them out evenly in a container. You let the size of the content decide how much individual space each item takes up. If the items wrap onto a new line, they will work out their spacing based on their size and the available space on that line.

- -

Grid works from the layout in. When you use CSS Grid Layout you create a layout and then you place items into it, or you allow the auto-placement rules to place the items into the grid cells according to that strict grid. It is possible to create tracks that respond to the size of the content, however, they will also change the entire track.

- -

If you are using flexbox and find yourself disabling some of the flexibility, you probably need to use CSS Grid Layout. An example would be if you are setting a percentage width on a flex item to make it line up with other items in a row above. In that case, a grid is likely to be a better choice.

- -

Box alignment

- -

The feature of flexbox that was most exciting to many of us was that it gave us proper alignment control for the first time. It made it easy to center a box on the page. Flex items can stretch to the height of the flex container, meaning that equal height columns were possible. These were things we have wanted to do for a very long time, and have come up with all kinds of hacks to at least create the visual effect of.

- -

The alignment properties from the flexbox specification have been added to a new specification called Box Alignment Level 3. This means that they can be used in other specifications, including Grid Layout. In the future, they may well apply to other layout methods as well.

- -

In a later guide in this series, I’ll be taking a proper look at Box Alignment and how it works in Grid Layout. For now, here is a comparison between simple examples of flexbox and grid.

- -

In the first example, which uses flexbox, I have a container with three items inside. The wrapper {{cssxref("min-height")}} is set, so it defines the height of the flex container. I have set {{cssxref("align-items")}} on the flex container to flex-end so the items will line up at the end of the flex container. I have also set the {{cssxref("align-self")}} property on box1 so it will override the default and stretch to the height of the container and on box2 so it aligns to the start of the flex container.

- - - -
<div class="wrapper">
-  <div class="box1">One</div>
-  <div class="box2">Two</div>
-  <div class="box3">Three</div>
-</div>
-
- -
.wrapper {
-  display: flex;
-  align-items: flex-end;
-  min-height: 200px;
-}
-.box1 {
-  align-self: stretch;
-}
-.box2 {
-  align-self: flex-start;
-}
-
- -

{{ EmbedLiveSample('Box_alignment', '300', '230') }}

- -

Alignment in CSS Grids

- -

This second example uses a grid to create the same layout. This time we are using the box alignment properties as they apply to a grid layout. So we align to start and end rather than flex-start and flex-end. In the case of a grid layout, we are aligning the items inside their grid area. In this case that is a single grid cell, but it could be an area made up of several grid cells.

- - - -
<div class="wrapper">
-  <div class="box1">One</div>
-  <div class="box2">Two</div>
-  <div class="box3">Three</div>
-</div>
-
- -
.wrapper {
-  display: grid;
-  grid-template-columns: repeat(3,1fr);
-  align-items: end;
-  grid-auto-rows: 200px;
-}
-.box1 {
-  align-self: stretch;
-}
-.box2 {
-  align-self: start;
-}
-
- -

{{ EmbedLiveSample('Alignment_in_CSS_Grids', '200', '310') }}

- -

The fr unit and flex-basis

- -

We have already seen how the fr unit works to assign a proportion of available space in the grid container to our grid tracks. The fr unit, when combined with the {{cssxref("minmax", "minmax()")}} function can give us very similar behavior to the flex properties in flexbox while still enabling the creation of a layout in two dimensions.

- -

If we look back at the example where I demonstrated the difference between one and two-dimensional layouts, you can see there is a difference between the way of the two layouts work responsively. With the flex layout, if we drag our window wider and smaller, the flexbox does a nice job of adjusting the number of items in each row according to the available space. If we have a lot of space all five items can fit on one row. If we have a very narrow container we may only have space for one.

- -

In comparison, the grid version always has three column tracks. The tracks themselves will grow and shrink, but there are always three since we asked for three when defining our grid.

- -

Auto-filling grid tracks

- -

We can create a similar effect to flexbox, while still keeping the content arranged in strict rows and columns, by creating our track listing using repeat notation and the auto-fill and auto-fit properties.

- -

In this next example, I have used the auto-fill keyword in place of an integer in the repeat notation and set the track listing to 200 pixels. This means that grid will create as many 200 pixels column tracks as will fit in the container.

- - - -
<div class="wrapper">
-  <div>One</div>
-  <div>Two</div>
-  <div>Three</div>
-</div>
-
- -
.wrapper {
-  display: grid;
-  grid-template-columns: repeat(auto-fill, 200px);
-}
-
- -

{{ EmbedLiveSample('Auto-filling_grid_tracks', '500', '170') }}

- -

A flexible number of tracks

- -

This isn’t quite the same as flexbox. In the flexbox example, the items are larger than the 200 pixel basis before wrapping. We can achieve the same in grid by combining auto-fill and the {{cssxref("minmax", "minmax()")}} function. In this next example, I create auto filled tracks with minmax. I want my tracks to be a minimum of 200 pixels, so I set the maximum to be 1fr. Once the browser has worked out how many times 200 pixels will fit into the container–also taking account of grid gaps–it will treat the 1fr maximum as an instruction to share out the remaining space between the items.

- - - -
<div class="wrapper">
-  <div>One</div>
-  <div>Two</div>
-  <div>Three</div>
-</div>
-
- -
.wrapper {
-  display: grid;
-  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
-}
-
- -

{{ EmbedLiveSample('A_flexible_number_of_tracks', '500', '170') }}

- -

We now have the ability to create a grid with a flexible number of flexible tracks, but see items laid out on the grid aligned by rows and columns at the same time.

- -

Grid and absolutely positioned elements

- -

Grid interacts with absolutely positioned elements, which can be useful if you want to position an item inside a grid or grid area. The specification defines the behavior when a grid container is a containing block and a parent of the absolutely positioned item.

- -

A grid container as containing block

- -

To make the grid container a containing block you need to add the position property to the container with a value of relative, just as you would make a containing block for any other absolutely positioned items. Once you have done this, if you give a grid item position: absolute it will take as its containing block the grid container or, if the item also has a grid position, the area of the grid it is placed into.

- -

In the below example I have a wrapper containing four child items. Item three is absolutely positioned and also placed on the grid using line-based placement. The grid container has position: relative and so becomes the positioning context of this item.

- - - -
<div class="wrapper">
-  <div class="box1">One</div>
-  <div class="box2">Two</div>
-  <div class="box3">
-   This block is absolutely positioned. In this example the grid container is the containing block and so the absolute positioning offset values are calculated in from the outer edges of the area it has been placed into.
-  </div>
-  <div class="box4">Four</div>
-</div>
-
- -
.wrapper {
-  display: grid;
-  grid-template-columns: repeat(4,1fr);
-  grid-auto-rows: 200px;
-  grid-gap: 20px;
-  position: relative;
-}
-.box3 {
-  grid-column-start: 2;
-  grid-column-end: 4;
-  grid-row-start: 1;
-  grid-row-end: 3;
-  position: absolute;
-  top: 40px;
-  left: 40px;
-}
-
- -

{{ EmbedLiveSample('A_grid_container_as_containing_block', '500', '330') }}

- -

You can see that the item is taking the area from grid row line 2 to 4, and starting after line 1. Then it is offset in that area using the top and left properties. However, it has been taken out of flow as is usually for absolutely positioned items and so the auto-placement rules now place items into the same space. The item also doesn’t cause the additional row to be created to span to row line 3.

- -

If we remove position: absolute from the rules for .box3 you can see how it would display without the positioning.

- -

A grid container as parent

- -

If the absolutely positioned child has a grid container as a parent but that container does not create a new positioning context, then it is taken out of flow as in the previous example. The positioning context will be whatever element creates a positioning context as is common to other layout methods. In our case, if we remove position: relative from the wrapper above, positioning context is from the viewport, as shown in this image.

- -

Image of grid container as parent

- -

Once again the item no longer participates in the grid layout in terms of sizing or when other items are auto-placed.

- -

With a grid area as the parent

- -

If the absolutely positioned item is nested inside a grid area then you can create a positioning context on that area. In the below example we have our grid as before but this time I have nested an item inside .box3 of the grid.

- -

I have given .box3 position relative and then positioned the sub-item with the offset properties. In this case, the positioning context is the grid area.

- - - -
<div class="wrapper">
-  <div class="box1">One</div>
-  <div class="box2">Two</div>
-  <div class="box3">Three
-    <div class="abspos">
-     This block is absolutely positioned. In this example the grid area is the containing block and so the absolute positioning offset values are calculated in from the outer edges of the grid area.
-    </div>
-  </div>
-  <div class="box4">Four</div>
-</div>
-
- -
.wrapper {
-  display: grid;
-  grid-template-columns: repeat(4,1fr);
-  grid-auto-rows: 200px;
-  grid-gap: 20px;
-}
-.box3 {
-  grid-column-start: 2;
-  grid-column-end: 4;
-  grid-row-start: 1;
-  grid-row-end: 3;
-  position: relative;
-}
-.abspos {
-  position: absolute;
-  top: 40px;
-  left: 40px;
-  background-color: rgba(255,255,255,.5);
-  border: 1px solid rgba(0,0,0,0.5);
-  color: #000;
-  padding: 10px;
-}
-
- -

{{ EmbedLiveSample('With_a_grid_area_as_the_parent', '500', '420') }}

- -

Grid and display: contents

- -

A final interaction with another layout specification that is worth noting is the interaction between CSS Grid Layout and display: contents. The contents value of the display property is a new value that is described in the Display specification as follows:

- -
-

“The element itself does not generate any boxes, but its children and pseudo-elements still generate boxes as normal. For the purposes of box generation and layout, the element must be treated as if it had been replaced with its children and pseudo-elements in the document tree.”

-
- -

If you set an item to display: contents the box it would normally create disappears, and the boxes of the child elements appear as if they have risen up a level. This means that children of a grid item can become grid items. Sound odd? Here is a simple example. In the following markup, I have a grid and the first item on the grid is set to span all three column tracks. It contains three nested items. As these items are not direct children, they don’t become part of the grid layout and so display using regular block layout.

- -
- - -
<div class="wrapper">
-  <div class="box box1">
-    <div class="nested">a</div>
-    <div class="nested">b</div>
-    <div class="nested">c</div>
-  </div>
-  <div class="box box2">Two</div>
-  <div class="box box3">Three</div>
-  <div class="box box4">Four</div>
-  <div class="box box5">Five</div>
-</div>
-
- -
.wrapper {
-  display: grid;
-  grid-template-columns: repeat(3, 1fr);
-  grid-auto-rows: minmax(100px, auto);
-}
-.box1 {
-  grid-column-start: 1;
-  grid-column-end: 4;
-}
-
-
- -

{{ EmbedLiveSample('Display_Contents_Before', '400', '420') }}

-
- -

If I now add display: contents to the rules for box1, the box for that item vanishes and the sub-items now become grid items and lay themselves out using the auto-placement rules.

- -
- - -
<div class="wrapper">
-  <div class="box box1">
-    <div class="nested">a</div>
-    <div class="nested">b</div>
-    <div class="nested">c</div>
-  </div>
-  <div class="box box2">Two</div>
-  <div class="box box3">Three</div>
-  <div class="box box4">Four</div>
-  <div class="box box5">Five</div>
-</div>
-
- -
.wrapper {
-  display: grid;
-  grid-template-columns: repeat(3, 1fr);
-  grid-auto-rows: minmax(100px, auto);
-}
-.box1 {
-  grid-column-start: 1;
-  grid-column-end: 4;
-  display: contents;
-}
-
- -

{{ EmbedLiveSample('Display_Contents_After', '400', '330') }}

-
- -

This can be a way to get items nested into the grid to act as if they are part of the grid, and is a way around some of the issues that would be solved by subgrids once they are implemented. You can also use display: contents in a similar way with flexbox to enable nested items to become flex items.

- -

As you can see from this guide, CSS Grid Layout is just one part of your toolkit. Don’t be afraid to mix it with other methods of doing layout to get the different effects you need.

- -

See Also

- - - - diff --git a/files/uk/web/css/css_selectors/index.html b/files/uk/web/css/css_selectors/index.html deleted file mode 100644 index 20f89ab44f..0000000000 --- a/files/uk/web/css/css_selectors/index.html +++ /dev/null @@ -1,116 +0,0 @@ ---- -title: CSS селектори -slug: Web/CSS/CSS_Selectors -translation_of: Web/CSS/CSS_Selectors ---- -
{{CSSRef("Selectors")}}
- -

CSS селектори  означують елемнти до яких застосовується набір правил CSS.

- -

Прості селектори

- -
-
Селектор за типом (Type selector)
-
Вибирає всі елементи, що відповідають вказаному імені вузла.
- Syntax: eltname
- Example: input буде відповідати будь-якому елементу {{HTMLElement("input")}} .
-
Селектор за класом (Class selector)
-
Вибирає всі елементи, що відповідають вказаному атрибуту class.
- Syntax: .classname
- Example: .index буде відповідати будь-якому елементу, що має клас "index".
-
Селектор за ID (ID selector)
-
Вибирає елемент, відповідно до його значення атрибуту id. В документі повинен бути тільки один елемент з вказаним ID.
- Syntax: #idname
- Example: #toc буде відповідати елементу, що має ID зі значенням "toc".
-
Універсальний селектор (Universal selector)
-
Вибирає усі елементи. За бажанням, він може бути обмежений певним простором імен або всім простором імен.
- Syntax: * ns|* *|*
- Example: * буде відповідати усім елементам документу.
-
Селектор за атрибутом (Attribute selector)
-
Вибирає елементи, відповідно до його значення вказаного атрибуту.
- Syntax: [attr] [attr=value] [attr~=value] [attr|=value] [attr^=value] [attr$=value] [attr*=value]
- Example: [autoplay] буде відповідати всім елементам що мають виставлений атрибут autoplay (в будь яке значення).
-
- -

Комбінатори

- -
-
Комбінатор прилеглого елемента
-
Комбінатор + вибирає прилеглі  елементи, що мають спільного нащадка (рівноправні). Це означає, що наступний елемент слідує безпосередньо за попереднім, і в обидвох спільний предок (обидва класи знаходятся в одному старшому класі).
- Синтаксис: A + B
- Приклад:  під дію h2 + p підпадуть усі випадки, у яких елемент  {{HTMLElement("p")}} знаходиться безпосередньо після елемента  {{HTMLElement("h2")}}.
-
Загальний комбінатор прилеглих елементів
-
Комбінатор ~ обирає сусідні елементи. Це значить, що другий елемент слідує за першим (хоча і не обов'язково безпосередньо зразу після нього), і обидва елементи знаходяться в межах лдного предка.
- Синтаксис: A ~ B
- Приклад: p ~ span відповідатиме усім випадкам, коли елемент {{HTMLElement("span")}} слідує за елементом {{HTMLElement("p")}}.
-
Комбінатор прямого нащадка
-
Комбінатор > обирає усі вузли (теги одного класу), які є прямими нащадками елемента, вказзаного першим.
- Синтаксис: A > B
- Приклад: ul > li відповідатиме усім випадкам, коли елемент  {{HTMLElement("li")}} буде вкладеним прямо в елемент {{HTMLElement("ul")}} (елемент  {{HTMLElement("ul")}} складається з {{HTMLElement("li")}}, що значить, що {{HTMLElement("li")}} є його прямим нащадком.
-
Комбінатор за нащадками (Descendant combinator)
-
Комбінатор   (space) обирає всі вузли, що є нащадками першого елемента.
- Синтаксис: A B
- Приклад: div span обиратиме усі елементи {{HTMLElement("span")}}, що знаходяться всередині елемента {{HTMLElement("div")}}, хоча і необов'язково напряму (елемент {{HTMLElement("span")}} може бути всередині {{HTMLElement("table")}}, яка знаходиться в {{HTMLElement("div")}}).
-
Стовпчиковий комбінатор {{Experimental_Inline}}
-
Комбінатор || вибирає усі вузли, що належать стовпчику.
- Синтаксис: A || B
- Приклад: col || td застосовуватиметься до усіх елементів {{HTMLElement("td")}}, що потрапляють в зону застосування {{HTMLElement("col")}}.
-
- -

Псевдо-класи

- -
-
Псевдо-класи роблятть можливим вибір елементів, базуючись на інформаціїї, що не знаходиться в дереві елементів.
-
Приклад: a:visited застосовуватиметься для усіх {{HTMLElement("a")}}, що були відвідані користувачем.
-
- -

Псевдо-елементи

- -
-
Псевдо-елементи представляють собою об'єкти, що не включені до HTML.
-
Приклад: p::first-line застосовуватиметься лише до першої стрічки елементів {{HTMLElement("p")}}.
-
- -

Specifications

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
SpecificationStatusComment
{{SpecName("CSS4 Selectors")}}{{Spec2("CSS4 Selectors")}}Added the || column combinator, grid structural selectors, logical combinators, location, time-demensional, resource state, linguistic and UI pseudo-classes
{{SpecName("CSS3 Selectors")}}{{Spec2("CSS3 Selectors")}}Added the ~ general sibling combinator and tree-structural pseudo-classes.
- Made pseudo-elements use a :: double-colon prefix. Additional attribute selectors
{{SpecName("CSS2.1", "selector.html")}}{{Spec2("CSS2.1")}}Added the > child and + adjacent sibling combinators.
- Added the universal and attribute selectors.
{{SpecName("CSS1")}}{{Spec2("CSS1")}}Initial definition.
- -

See the pseudo-class and pseudo-element specification tables for details on those.

- -

Див також

- - diff --git a/files/uk/web/css/filter/index.html b/files/uk/web/css/filter/index.html deleted file mode 100644 index aca5425654..0000000000 --- a/files/uk/web/css/filter/index.html +++ /dev/null @@ -1,1184 +0,0 @@ ---- -title: filter -slug: Web/CSS/filter -translation_of: Web/CSS/filter ---- -
{{CSSRef}}{{SeeCompatTable}}
- -

Опис

- -

Властивість filter дає можливість застосувати до елементів такі графічні ефекти, як розмиття (blurring), збільшення чіткості (sharpening), зміна кольорів (color shifting). Зазвичай фільтри викорустовуються для налаштування рендерингу зображень, фонів (backgrounds) та границь (borders).

- -

У CSS стандарт включені декілька функцій, які досягають визначених ефектів. Ви можете також посилатися на SVG-фільтр за допомогою посилання(URL) на SVG filter element.

- -
Примітка: Більш старі версії браузера Windows Internet Explorer (4.0 - 9.0) підтримували нестандартний "filter", який з того часу є застарілим.
- -

{{cssinfo}}

- -

Syntax

- -
filter: url("filters.svg#filter-id");
-filter: blur(5px);
-filter: brightness(0.4);
-filter: contrast(200%);
-filter: drop-shadow(16px 16px 20px blue);
-filter: grayscale(50%);
-filter: hue-rotate(90deg);
-filter: invert(75%);
-filter: opacity(25%);
-filter: saturate(30%);
-filter: sepia(60%);
-
-/* Apply multiple filters */
-filter: contrast(175%) brightness(3%);
-
-/* Global values */
-filter: inherit;
-filter: initial;
-filter: unset;
-
- -

З функцією використовуйте наступне:

- -
filter: <filter-function> [<filter-function>]* | none
-
- -

Для посилання на SVG {{SVGElement("filter")}} елемент використовуйте наступне:

- -
filter: url(file.svg#filter-element-id)
-
- -

Формальний синтаксис

- -{{csssyntax}} - -

Приклади

- -

Приклади використання визначених функцій подаються нижче. Дивіться кожну функцію для конкретного прикладу.

- -
.mydiv { filter: grayscale(50%) }
-
-/* зробить сірим на 50% та розмиє на 10px */
-img {
-  filter: grayscale(0.5) blur(10px);
-}
- -

Приклади використання URL функції з SVG ресурсом наведені нижче.

- -
.target { filter: url(#c1); }
-
-.mydiv { filter: url(commonfilters.xml#large-blur) }
-
- -

Функції

- -

Для того, щоб використовувати CSS властивість filter, необхідно вказати значення (value) для однієї з наступних функцій. Якщо значення не є валідним, функція повертає "none". За винятком зазначених випадків, функції, які приймають значення, виражені у відсотках (наприклад, 34%), також приймають і ті значення, що виражені десятковим дробом (наприклад, 0.34).

- -

url()

- -

Функція url() приймає місцезнаходження XML-файлу, який визначає SVG-фільтр і має містити якір(anchor) до конкретного фільтр-елемента.

- -
filter: url(resources.svg#c1)
-
- -

blur()

- -

Розмиття. Застосовує гаусове (Gaussian) розмиття до вхідного зображення. Значення радіусу (‘radius’) встановлює значення стандартного відхилення до гауссової (Gaussian) функції, або на скільки пікселі екрану мають зливатися один з одним. Тому більше значення забеспечить більше розмиття. Якщо жоден параметр не вказаний, використовується значення "0". Параметр визначений, як CSS довжина, але не приймає значень у відсотках.

- -
filter: blur(5px)
-
- - - -
<svg style="position: absolute; top: -99999px" xmlns="http://www.w3.org/2000/svg">
-  <filter id="svgBlur" x="-5%" y="-5%" width="110%" height="110%">
-    <feGaussianBlur in="SourceGraphic" stdDeviation="5"/>
-  </filter>
-</svg>
- -

{{EmbedLiveSample('blur_example','100%','236px','')}}

- -

brightness()

- -

Яскравість. Застосовує лінійний множник(мультиплікатор) до вхідного зображення, щоб зробити його більш або менш яскравим. Значення "0%" створить абсолютно чорне зображення. Значення "100%" залишить зображення без змін. Інші значення є лінійними мультиплікаторами, що застосовуються до ефекту. Значення, більші за "100%", дозволяються і дають більш яскраві результати. Якщо параметр ‘amount’ не вказаний, використовується значення "1".

- -
filter: brightness(0.5)
- -
<svg style="position: absolute; top: -99999px" xmlns="http://www.w3.org/2000/svg">
- <filter id="brightness">
-    <feComponentTransfer>
-        <feFuncR type="linear" slope="[amount]"/>
-        <feFuncG type="linear" slope="[amount]"/>
-        <feFuncB type="linear" slope="[amount]"/>
-    </feComponentTransfer>
-  </filter>
-</svg>
- - - -

{{EmbedLiveSample('brightness_example','100%','231px','')}}

- -

contrast()

- -

Контрастність. Налаштовує контраст зображення. Значення "0%" створить абсолютно сіре зображення. Значення "100%" залишить зображення без змін. Значення, більші за "100%", дозволяються і дають більш контрастні результати. Якщо параметр ‘amount’ не вказаний, використовується значення "1". 

- -
filter: contrast(200%)
-
- -
<svg style="position: absolute; top: -99999px" xmlns="http://www.w3.org/2000/svg">
-  <filter id="contrast">
-    <feComponentTransfer>
-      <feFuncR type="linear" slope="[amount]" intercept="-(0.5 * [amount]) + 0.5"/>
-      <feFuncG type="linear" slope="[amount]" intercept="-(0.5 * [amount]) + 0.5"/>
-      <feFuncB type="linear" slope="[amount]" intercept="-(0.5 * [amount]) + 0.5"/>
-    </feComponentTransfer>
-  </filter>
-</svg>
-
- - - -

{{EmbedLiveSample('contrast_example','100%','203px','')}}

- -

drop-shadow()

- -

Відкидання тіні. Застосовує відкидання тіні до вхідного зображення. Це фактично розмита, зміщена версія альфа-маски вхідного зображення,  намальована певним кольором та створена під зображенням. Функція приймає параметр типу <shadow> (визначена у CSS3 Backgrounds), за винятком того, що ключове слово ‘inset’ не дозволене. Дана функція дуже схода на більш укорінену властивість {{cssxref("box-shadow")}}; різниця у тому, що у випадку з фільтрами деякі браузери забезпечують апаратне прискорення для більш високої продуктивності. Нижче наведені параметри параметра <shadow>.

- -
-
<offset-x> <offset-y> (required)
-
Ці два обов'язкові {{cssxref("<length>")}} значення вказують зміщення тіні. <offset-x> визначає горизонтальну відстань. Від’ємні значення розміщують тінь лівіше елемента. <offset-y> визначає вертикальну відстань. Від’ємні значення розміщують тінь вище елемента. Дивіться {{cssxref("<length>")}} можливі одиниці. Якщо обидва значення "0", тінь розміщується за елементом (і може створювати ефект ромиття, якщо вказані <blur-radius> та/або <spread-radius>).
-
<blur-radius> (optional)
-
Це необов'язкове третє {{cssxref("<length>")}} значення. Чим більше значення, тим більше розмиття, тим більшою і світлішою стає тінь. Від’ємні значення не дозволені. Якщо значення не визначене, воно буде "0" (межі тіні будуть чіткими).
-
<spread-radius> (optional)
-
Це необов'язкове четверте {{cssxref("<length>")}} значення. Додатні значення розширять тінь і зроблять її більшою, а від'ємні - зменшать. Якщо значення не визначено, воно буде "0" (тінь буде мати какий розмір, як зображення). 
- Примітка: Webkit та, можливо, інші браузери, не підтримують цей четвертий параметр; він не виконається, якщо його додати.
-
<color> (optional)
-
Дивіться {{cssxref("<color>")}} значення, щоб дізнатися можливі ключові слова та умовні позначення. Якщо значення не вказано, колір залежить від браузера. У Gecko (Firefox), Presto (Opera) та Trident (Internet Explorer), значення {{cssxref("color")}} властивості використовується. З іншого боку, тінь WebKit є прозорою, тому вона є марою, даремною, якщо значення <color> не вказане.
-
- -
filter: drop-shadow(16px 16px 10px black)
- -
<svg style="position: absolute; top: -999999px" xmlns="http://www.w3.org/2000/svg">
- <filter id="drop-shadow">
-    <feGaussianBlur in="SourceAlpha" stdDeviation="[radius]"/>
-    <feOffset dx="[offset-x]" dy="[offset-y]" result="offsetblur"/>
-    <feFlood flood-color="[color]"/>
-    <feComposite in2="offsetblur" operator="in"/>
-    <feMerge>
-      <feMergeNode/>
-      <feMergeNode in="SourceGraphic"/>
-    </feMerge>
-  </filter>
-</svg>
-
- - - -

{{EmbedLiveSample('shadow_example','100%','300px','')}}

- -

grayscale()

- -

Конвертує вхідне зображення у відтінках сірого. Значення ‘amount’ визначає пропорцію конвертації. Значення "100%" повністю конвертує зображення у відтінки сірого. Значення "0%" залишає зобращення без змін. Значення між "0%" та "100%" є лінійними множниками(мультиплікаторами) ефекта. Якщо парамент ‘amount’  не вказаний, використовується значення "0".

- -
filter: grayscale(100%)
- - - -

{{EmbedLiveSample('grayscale_example','100%','209px','')}}

- -

hue-rotate()

- -

Зміна відтінків. Застосовує зміну відтінків до вхідного зображення. Значення ‘angle’ визначає кількість градусів на колірному крузі (color circle), які будуть застосовані до вхідного зображення. Значення (0deg) залишає зображення без змін. Якщо параметр  ‘angle’  відсутній, використовується значення "0deg". Хоча і не існує максимального значення, ефект значень, більших за "360deg", буде обертатися навколо.

- -
filter: hue-rotate(90deg)
- - - -
<svg style="position: absolute; top: -999999px" xmlns="http://www.w3.org/2000/svg">
-  <filter id="svgHueRotate" >
-    <feColorMatrix type="hueRotate" values="[angle]" />
-  <filter />
-</svg>
- -

{{EmbedLiveSample('huerotate_example','100%','221px','')}}

- -

invert()

- -

Інвертування. Інвертує зразки (samples) у вхідному зображенні. Значення ‘amount’ визначає пропорцію конвертації. Значення "100%" інвертує зображення повністю. Значення "0%" залишає зображення без змін. Значення між "0%" та "100%" є лінійними множниками (мультиплікаторами) ефекта. Якщо параметр ‘amount’  відсутній, використовується значення "0".

- -
filter: invert(100%)
- - - -

{{EmbedLiveSample('invert_example','100%','407px','')}}

- -

opacity()

- -

Непрозорість. Застосовує прозорість до вхідного зображення. Значення ‘amount’ визначає пропорцію конвертації. Зі значенням "0%" зображення стає повністю прозорим. Значення "100%" залишає зображення без змін. Значення між "0%" та "100%" є лінійними множниками (мультиплікаторами) ефекта. Це еквівалентно множенню зразків (samples) зображення на  ‘amount’. Якщо параметр ‘amount’  відсутній, використовується значення "1". Ця функція схожа на більш укорінену властивість {{Cssxref("opacity")}}; ріниця полягає у тому,  що у випадку з фільтрами деякі браузери забезпечують апаратне прискорення для більш високої продуктивності.

- -
filter: opacity(50%)
- - - -

{{EmbedLiveSample('opacity_example','100%','210px','')}}

- -

saturate()

- -

Насичення. Робить зображення більш насиченими. Значення ‘amount’ визначає пропорцію конвертації. Зі значенням "0%" зображення стає повністю ненасиченим. Значення "100%" залишає зображення без змін. Інші значення є лінійними множниками (мультиплікаторами) ефекта. Значення, більші за "100%" дозволяються і забеспечують більш насиченими результатами. Якщо параметр ‘amount’ відсутній, використовується значення "1".

- -
filter: saturate(200%)
- - - -

{{EmbedLiveSample('saturate_example','100%','332px','')}}

- -

sepia()

- -

Сепія. Конвертує зображення до сепії. Значення ‘amount’ визначає пропорцію конвертації. Значення "100%" конвертує зображення повністю. Значення "0%" залишає зображення без змін. Значення між "0%" та "100%" є лінійними множниками (мультиплікаторами) ефекта. Якщо параметр ‘amount’ відсутній, використовується значення "0".

- -
filter: sepia(100%)
- - - -

{{EmbedLiveSample('sepia_example','100%','229px','')}}

- -

Combining functions

- -

Можна комбінувати будь-яку кількість функцій для маніпулювання рендерингом. Наступні приклади посилюють контрастність та яскравість зображення.

- -
filter: contrast(175%) brightness(103%)
- - - -

{{EmbedLiveSample('combination_example','100%','209px','')}}

- -

Specifications

- - - - - - - - - - - - - - - - -
SpecificationStatusComment
{{ SpecName('Filters 1.0', '#FilterProperty', 'filter') }}{{ Spec2('Filters 1.0') }}Initial definition
- -

Browser compatibility

- -

{{CompatibilityTable}}

- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
FeatureChromeFirefox (Gecko)Internet ExplorerOperaSafari (WebKit)
Basic support{{CompatChrome("18.0")}}{{property_prefix("-webkit")}}[1]{{CompatGeckoDesktop(35)}}[2]{{CompatNo}}[3]{{CompatOpera("15.0")}}{{property_prefix("-webkit")}}{{CompatSafari("6.0")}}{{property_prefix("-webkit")}}
On SVG Elements{{CompatNo}}[4]{{CompatGeckoDesktop(35)}}{{CompatNo}}{{CompatNo}}{{CompatNo}}
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
FeatureAndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Basic support{{CompatAndroid("4.4")}}{{property_prefix("-webkit")}}{{CompatGeckoDesktop(35)}}[2]{{CompatNo}}22.0 {{CompatVersionUnknown}}{{property_prefix("-webkit")}} -

6.0 {{CompatVersionUnknown}}{{property_prefix("-webkit")}}

-
On SVG Elements{{CompatNo}}[4]{{CompatGeckoDesktop(35)}}{{CompatNo}}{{CompatNo}}{{CompatNo}}
-
- -

[1] У Chrome 18 to 19, функція saturate() приймає тільки цілі десяткові числа та відсоткові значання. Цей баг виправлений у Chrome 20 та наступних.

- -

[2] До Firefox 34, Gecko виконував тільки {{anch("url()")}} форму властивості filter; так як формування ланцюжка (chaining) тоді не було реалізовано, було дозволено тільки одне url() (або коли layout.css.filters.enabled pref було встановлене як false).

- -

Функціональні значення filter контролюються layout.css.filters.enabled pref і був доступним, але заборонений за замовчуванням у Firefox 34.

- -

[3] Internet Explorer з 4.0 по 9.0 виконував нестандартну властивіст filter. Синтаксис сильно відрізняється і не був тут задокументований.

- -

[4] У даний момент Blink не виконує дану властивість(feature). Дивіться bug 109224.

- -

See also

- - diff --git a/files/uk/web/css/flex-grow/index.html b/files/uk/web/css/flex-grow/index.html deleted file mode 100644 index 8c70a17578..0000000000 --- a/files/uk/web/css/flex-grow/index.html +++ /dev/null @@ -1,194 +0,0 @@ ---- -title: flex-grow -slug: Web/CSS/flex-grow -translation_of: Web/CSS/flex-grow ---- -
{{CSSRef}}
- -

Опис

- -

Властивість flex-grow CSS визначає яку частину вільного простору може зайняти дочірній flex елемент. Ця властивість встановлюється в одиницях відносних до інших контейнерів.

- -

{{cssinfo}}

- -

Можете більш детальніше довідатся як користуватись властивостями flex з наступної статті Using CSS flexible boxes

- -

Синтаксис

- -
/* <number> values */
-flex-grow: 3;
-flex-grow: 0.6;
-
-/* Global values */
-flex-grow: inherit;
-flex-grow: initial;
-flex-grow: unset;
-
- -

Значення

- -
-
<number>
-
Дивись {{cssxref("<number>")}}. Значення менші за 0 є недійсними.
-
- -

Formal syntax

- -{{csssyntax}} - -

Приклад

- -

HTML

- -
-
<h4>This is a Flex-Grow</h4>
-<h5>A,B,C and F are flex-grow:1 . D and E are flex-grow:2 .</h5>
-<div id="content">
-  <div class="box" style="background-color:red;">A</div>
-  <div class="box" style="background-color:lightblue;">B</div>
-  <div class="box" style="background-color:yellow;">C</div>
-  <div class="box1" style="background-color:brown;">D</div>
-  <div class="box1" style="background-color:lightgreen;">E</div>
-  <div class="box" style="background-color:brown;">F</div>
-</div>
-
- -

CSS

- -
#content {
-  -ms-box-orient: horizontal;
-  display: -webkit-box;
-  display: -moz-box;
-  display: -ms-flexbox;
-  display: -moz-flex;
-  display: -webkit-flex;
-  display: flex;
-
-  -webkit-justify-content: space-around;
-  justify-content: space-around;
-  -webkit-flex-flow: row wrap;
-  flex-flow: row wrap;
-  -webkit-align-items: stretch;
-  align-items: stretch;
-}
-
-.box {
-  flex-grow: 1;
-  border: 3px solid rgba(0,0,0,.2);
-}
-
-.box1 {
-  flex-grow: 2;
-  border: 3px solid rgba(0,0,0,.2);
-}
-
-
- -

Результат

- -

{{EmbedLiveSample('Example', '750px', '400px', '', 'Web/CSS/flex-grow')}}

- -

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

- - - - - - - - - - - - - - - - -
SpecificationStatusComment
{{SpecName('CSS3 Flexbox','#flex-grow','flex-grow')}}{{Spec2('CSS3 Flexbox')}}Initial definition
- -

Підтримка браузерів

- -

{{CompatibilityTable}}

- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FeatureFirefox (Gecko)ChromeEdgeInternet ExplorerOperaSafari
Базова підтримка{{CompatGeckoDesktop("18.0")}}[1]21.0{{property_prefix("-webkit")}}{{CompatVersionUnknown}}{{property_prefix("-webkit")}}
- {{CompatVersionUnknown}}
1112.106.1{{property_prefix("-webkit")}}
< 0 animate{{CompatGeckoDesktop("32.0")}}[2]49.0{{CompatUnknown}}{{CompatUnknown}}{{CompatNo}}{{CompatNo}}
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FeatureFirefox Mobile (Gecko)AndroidEdgeIE PhoneOpera MobileSafari Mobile
Базова підтримка{{CompatGeckoMobile("18.0")}}[1]{{CompatUnknown}}{{CompatVersionUnknown}}{{property_prefix("-webkit")}}
- {{CompatVersionUnknown}}
{{CompatNo}}12.10{{CompatNo}}
< 0 animate{{CompatGeckoDesktop("32.0")}}[2]{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}{{CompatNo}}{{CompatNo}}
-
- -

[1] Firefox підтримує лише однострочні flexbox конструкції до версії Firefox 27. Щоб активувати підтримку flexbox властивостей, для Firefox 18 та 19, користувачу потрібно змінити параметр layout.css.flexbox.enabled на true у файлі налаштувань about:config.

- -

В додаток до непрефіксної підтримки, Gecko 48.0 {{geckoRelease("48.0")}} додана підтримка для -webkit префіксних варіацій властивостей для підтримки веб-сумісності, для цього потрібно змінити властивість layout.css.prefixes.webkit на true, яка за замовченням встановлена - false. Але з релізу Gecko 49.0 {{geckoRelease("49.0")}} ця властивість набуває значення true за замовченням.

- -

[2] До того як вийшла версія Firefox 32, Gecko не був в змозі анімувати знаяення які починалися чи закінчувалися на 0(SpecDemo).

- -

Дивись також

- - diff --git a/files/uk/web/css/flex/index.html b/files/uk/web/css/flex/index.html deleted file mode 100644 index f2205b145d..0000000000 --- a/files/uk/web/css/flex/index.html +++ /dev/null @@ -1,209 +0,0 @@ ---- -title: flex -slug: Web/CSS/flex -tags: - - CSS - - CSS Flexible Boxes - - CSS Властивість - - flexbox -translation_of: Web/CSS/flex ---- -
{{CSSRef}}
- -

Загальний огляд

- -

CSS параметр flex є скороченим записом властивості, котра визначає здатність flex елемента змінювати свої розміри аби заповнити наявний простір. Flex елементи можна розтягнути аби використати увесь наявний простір пропорційно до вказаного параметра flex-grow, або flex-shrink аби запобігти виходу за межі батьківського контейнера.

- -

{{cssinfo}}

- -

Перегляньте Використання гнучких CSS контейнерів для більш детальної інформації та опису властивостей.

- -

Синтаксис

- -
/* 0 0 auto */
-flex: none;
-
-/* Одне значення, ціле число: flex-grow (flex-basis змінюється на 0) */
-flex: 2;
-
-/* Одне значення, width/height: flex-basis */
-flex: 10em;
-flex: 30px;
-flex: auto;
-flex: content;
-
-/* Два значення: flex-grow | flex-basis */
-flex: 1 30px;
-
-/* Два значення: flex-grow | flex-shrink (flex-basis змінюється на 0) */
-flex: 2 2;
-
-/* Три значення: flex-grow | flex-shrink | flex-basis */
-flex: 2 2 10%;
-
-/* Глобальні значення */
-flex: inherit;
-flex: initial;
-flex: unset;
-
- -

Значення

- -
-
<'flex-grow'>
-
Визначає ширину flex елемента відносно ширин всіх сусідніх елементів. Перегляньте {{cssxref("<number>")}} задля детального опису. Від'ємні значення вважаються невірними. Приймає значення 1, коли воно не вказується явно.
-
<'flex-shrink'>
-
Визначає flex-shrink flex елемента. Перегляньте {{cssxref("<number>")}} задля детального опису. Від'ємні значення вважаються невірними. Приймає значення 1, коли воно не вказується явно.
-
<'flex-basis'>
-
Визначає  базис flex елемента. Може приймати будь-яке значення, з тих, що можуть приймати параметри width і height. Значення 0 має мати одиницю виміру, аби уникнути трактування його, як значення гнучкості. Приймає значення 0%, коли воно не вказується явно.
-
none
-
Ключове слово, котре по значенню рівне 0 0 auto.
-
-

Формальний синтаксис

-
-
- -{{csssyntax}} - -

Приклад

- -
#flex-container {
-	display: -webkit-flex;
-	display: flex;
-	-webkit-flex-direction: row;
-	flex-direction: row;
-}
-
-#flex-container > .flex-item {
-	-webkit-flex: auto;
-	flex: auto;
-}
-
-#flex-container > .raw-item {
-	width: 5rem;
-}
-
- -
<div id="flex-container">
-    <div class="flex-item" id="flex">Flex box (click to toggle raw box)</div>
-    <div class="raw-item" id="raw">Raw box</div>
-</div>
-
- - - -

Результат

- -

{{EmbedLiveSample('Example','100%','60')}}

- -

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

- - - - - - - - - - - - - - - - -
СпецифікаціяСтанКоментар
{{SpecName('CSS3 Flexbox', '#flex-property', 'flex')}}{{Spec2('CSS3 Flexbox')}}Загальне визначення
- -

Сумісність із браузерами

- -

{{CompatibilityTable()}}

- -
- - - - - - - - - - - - - - - - - - - -
ПідтримкаFirefox (Gecko)ChromeInternet ExplorerOperaSafari
Базова підтримка{{CompatGeckoDesktop("18.0")}}[1]
- {{CompatGeckoDesktop("20.0")}}
- {{CompatGeckoDesktop("28.0")}}[2]
21.0{{property_prefix("-webkit")}}
- 29.0
10.0{{property_prefix("-ms")}}[3]
- 11.0[3]
12.10 -

6.1{{property_prefix("-webkit")}}
- 9.0

-
-
- -
- - - - - - - - - - - - - - - - - - - -
ПідтримкаFirefox Mobile (Gecko)AndroidIE PhoneOpera MobileSafari Mobile
Базова підтримка{{CompatUnknown}}4.41112.107.1{{property_prefix("-webkit")}}
-
- -

[1] В Gecko 18.0 {{geckoRelease("18.0")}} та 19.0 {{geckoRelease("19.0")}} підтримка flexbox прихована за налаштуванням about:config пунктом layout.css.flexbox.enabled, котрий по замовчуванню - false

- -

[2] Багатостроковий flexbox підтримується починаючи з Gecko 28.0 {{geckoRelease("28.0")}}.

- -

В додаток до підтримки непрефіксованого flexbox, у Gecko 48.0 {{geckoRelease("48.0")}} додано підтримку -webkit префіксованої версії властивості з огляду на веб-сумісність з налаштуванням layout.css.prefixes.webkit, котре по замовчуванню дорівнює false. Починаючи з версії Gecko 49.0 {{geckoRelease("49.0")}} це налаштування дорівнює true.

- -

[3] Internet Explorer 10-11 (але не 12+) ігнорує вживання calc() у частині flex синтаксису, що відповідає за властивість flex-basis. Це можна обійти використанням не сокроченого, а повного запису цієї властивості. Перегляньте Flexbug #8 задля більш детального опису. Визначення flex зі значенням без одиниці виміру у частині, що відповідає за flex-basis вважається синтаксично не вірною у цих версіях, а тому її буде проігноровано. Виправити це можна - завжди додаючи одиницю виміру у частині властивості, що відповідає за flex-basis, скороченого запису flex. Перегляньте Flexbug #4 задля більш детільного опису.

- -

Також варто переглянути

- - diff --git a/files/uk/web/css/font-smooth/index.html b/files/uk/web/css/font-smooth/index.html deleted file mode 100644 index 97344e55bf..0000000000 --- a/files/uk/web/css/font-smooth/index.html +++ /dev/null @@ -1,85 +0,0 @@ ---- -title: font-smooth -slug: Web/CSS/font-smooth -translation_of: Web/CSS/font-smooth ---- -
{{ CSSRef }} {{ Non-standard_header }}
- -

font-smooth CSS властивість контролює застосування антиалайзингу коли відбувається рендеринг шрифта.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
{{ Xref_cssinitial() }}auto
Застосовується довсіх елементів і згенерованого контенту
{{ Xref_cssinherited() }}yes
Відсоткивідносно розмірів шрифта батьківського елемента
Media{{ Xref_cssvisual() }}
{{ Xref_csscomputed() }}як зазначено в специфікації
- -

Синтаксис

- -
/* Keyword values */
-font-smooth: auto;
-font-smooth: never;
-font-smooth: always;
-
-/* <length> value */
-font-smooth: 2em;
-
- -
-

WebKit реалізує подібну властивість, але з різними значеннями: -webkit-font-smoothing. Це працює тільки на Mac OS X/macOS.

- - -
- -
-

Firefox реалізує подібну властивість, але з різними значеннями: -moz-osx-font-smoothing. Це працює тільки на Mac OS X/macOS.

- - -
- -

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

- -

В ранніх версіях згладжування (2002) шрифтів CSS3 Fonts було присутнє, але на даний момент font-smooth його було видалено і ця специфікація не відповідає стандартам.

- -

Сумісність з браузерами

- - - -

{{Compat("css.properties.font-smooth")}}

- -

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

- - diff --git a/files/uk/web/css/font-weight/index.html b/files/uk/web/css/font-weight/index.html deleted file mode 100644 index b65007bb13..0000000000 --- a/files/uk/web/css/font-weight/index.html +++ /dev/null @@ -1,271 +0,0 @@ ---- -title: font-weight -slug: Web/CSS/font-weight -translation_of: Web/CSS/font-weight ---- -
{{CSSRef}}
- -

The font-weight CSS property specifies the weight (or boldness) of the font. The font weights available to you will depend on the {{cssxref("font-family")}} you are using. Some fonts are only available in normal and bold.

- -
{{EmbedInteractiveExample("pages/css/font-weight.html")}}
- - - -

Syntax

- -
/* Keyword values */
-font-weight: normal;
-font-weight: bold;
-
-/* Keyword values relative to the parent */
-font-weight: lighter;
-font-weight: bolder;
-
-/* Numeric keyword values */
-font-weight: 100;
-font-weight: 200;
-font-weight: 300;
-font-weight: 400;
-font-weight: 500;
-font-weight: 600;
-font-weight: 700;
-font-weight: 800;
-font-weight: 900;
-
-/* Global values */
-font-weight: inherit;
-font-weight: initial;
-font-weight: unset;
-
- -

The font-weight property is specified using a single keyword value from the list below.

- -

Values

- -
-
normal
-
Normal font weight. Same as 400.
-
bold
-
Bold font weight. Same as 700.
-
lighter
-
One font weight lighter than the parent element (among the available weights of the font).
-
bolder
-
One font weight heavier than the parent element (among the available weights of the font).
-
100, 200, 300, 400, 500, 600, 700, 800, 900
-
Numeric font weights for fonts that provide more than just normal and bold.
-
- -

Fallback weights

- -

If the exact weight given is unavailable, then the following heuristic is used to determine the weight actually rendered:

- - - -

This means that for fonts that provide only normal and bold100-500 are normal, and 600-900 are bold.

- -

Meaning of relative weights

- -

When lighter or bolder is specified, the following chart shows how the absolute font weight of the element is determined:

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Inherited valuebolderlighter
100400100
200400100
300400100
400700100
500700100
600900400
700900400
800900700
900900700
- -

Common weight name mapping

- -

The numerical values (100 to 900) roughly correspond to the following common weight names:

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ValueCommon weight name
100Thin (Hairline)
200Extra Light (Ultra Light)
300Light
400Normal (Regular)
500Medium
600Semi Bold (Demi Bold)
700Bold
800Extra Bold (Ultra Bold)
900Black (Heavy)
- -

Interpolation

- -

A font-weight value is interpolated via discrete steps (multiples of 100). The interpolation happens in real number space and is converted to an integer by rounding to the nearest multiple of 100, with values halfway between multiples of 100 rounded towards positive infinity.

- -

Formal syntax

- -{{csssyntax}} - -

Examples

- -

HTML

- -
<p>
-  Alice was beginning to get very tired of sitting by her sister on the
-  bank, and of having nothing to do: once or twice she had peeped into the
-  book her sister was reading, but it had no pictures or conversations in
-  it, 'and what is the use of a book,' thought Alice 'without pictures or
-  conversations?'
-</p>
-
-<div>I'm heavy<br/>
-  <span>I'm lighter</span>
-</div>
-
- -

CSS

- -
/* Set paragraph text to be bold. */
-p {
-  font-weight: bold;
-}
-
-/* Set div text to two steps heavier than
-   normal but less than a standard bold. */
-div {
- font-weight: 600;
-}
-
-/* Set span text to be one step lighter
-   than its parent. */
-span {
-  font-weight: lighter;
-}
- -

Result

- -

{{EmbedLiveSample("Examples","400","300")}}

- -

Specifications

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
SpecificationStatusComment
{{SpecName('CSS3 Fonts', '#font-weight-prop', 'font-weight')}}{{Spec2('CSS3 Fonts')}}No change.
{{SpecName('CSS3 Transitions', '#animatable-css', 'font-weight')}}{{Spec2('CSS3 Transitions')}}Defines font-weight as animatable.
{{SpecName('CSS2.1', 'fonts.html#propdef-font-weight', 'font-weight')}}{{Spec2('CSS2.1')}}No change.
{{SpecName('CSS1', '#font-weight', 'font-weight')}}{{Spec2('CSS1')}}Initial definition.
- -

{{cssinfo}}

- -

Browser compatibility

- - - -

{{Compat("css.properties.font-weight")}}

diff --git a/files/uk/web/css/grid-template-areas/index.html b/files/uk/web/css/grid-template-areas/index.html deleted file mode 100644 index 472a754d14..0000000000 --- a/files/uk/web/css/grid-template-areas/index.html +++ /dev/null @@ -1,181 +0,0 @@ ---- -title: grid-template-areas -slug: Web/CSS/grid-template-areas -translation_of: Web/CSS/grid-template-areas ---- -

grid-template-areas CSS властивість, що визначає іменовані {{glossary("grid areas")}}.

- -
{{EmbedInteractiveExample("pages/css/grid-template-areas.html")}}
- - - -

Ці області не відносяться до певного грід-елемента, але можуть посилатися з властивостей грід-розташування{{cssxref("grid-row-start")}}, {{cssxref("grid-row-end")}}, {{cssxref("grid-column-start")}}, {{cssxref("grid-column-end")}}, та їх скорочень {{cssxref("grid-row")}}, {{cssxref("grid-column")}}, і {{cssxref("grid-area")}}.

- -

Syntax

- -
/* Keyword value */
-grid-template-areas: none;
-
-/* <string> values */
-grid-template-areas: "a b";
-grid-template-areas: "a b b"
-                     "a c d";
-
-/* Global values */
-grid-template-areas: inherit;
-grid-template-areas: initial;
-grid-template-areas: unset;
-
- -

Values

- -
-
none
-
Грід-контейнер не визначає жодні іменовані грід-області.
-
{{cssxref("<string>")}}+
-
Ряд створюється для кожного окремого рядка, а колонка для кожної клітинки рядка. Декілька іменованих клітинок у рядках та поміж ними створюють одну іменовану грід-область, що об'єднує відповідні клітинки. Оголошення непридатне, якщо ці клітинки утворюють прямокутник.
-
- -

Formal syntax

- -{{csssyntax}} - -

Example

- -

HTML

- -
<section id="page">
-  <header>Header</header>
-  <nav>Navigation</nav>
-  <main>Main area</main>
-  <footer>Footer</footer>
-</section>
- -

CSS

- -
#page {
-  display: grid;
-  width: 100%;
-  height: 250px;
-  grid-template-areas: "head head"
-                       "nav  main"
-                       "nav  foot";
-  grid-template-rows: 50px 1fr 30px;
-  grid-template-columns: 150px 1fr;
-}
-
-#page > header {
-  grid-area: head;
-  background-color: #8ca0ff;
-}
-
-#page > nav {
-  grid-area: nav;
-  background-color: #ffa08c;
-}
-
-#page > main {
-  grid-area: main;
-  background-color: #ffff64;
-}
-
-#page > footer {
-  grid-area: foot;
-  background-color: #8cffa0;
-}
-
- -

Result

- -

{{EmbedLiveSample("Example", "100%", "250px")}}

- -

Specifications

- - - - - - - - - - - - - - - - -
SpecificationStatusComment
{{SpecName("CSS3 Grid", "#propdef-grid-template-areas", "grid-template-areas")}}{{Spec2("CSS3 Grid")}}Initial definition
- -

{{cssinfo}}

- -

Browser compatibility

- - - -

{{Compat("css.properties.grid-template-areas")}}

- -

See also

- - - - diff --git a/files/uk/web/css/index.html b/files/uk/web/css/index.html deleted file mode 100644 index 50e7a47f9c..0000000000 --- a/files/uk/web/css/index.html +++ /dev/null @@ -1,92 +0,0 @@ ---- -title: CSS -slug: Web/CSS -tags: - - CSS - - CSS3 - - Layout - - Reference - - Веб - - Дизайн - - Стиль - - ЦСС - - каскадна - - оформлення - - сайтів - - сторінок - - таблиця -translation_of: Web/CSS ---- -

Каскадні таблиці стилів (CSS) - це мова стилів, яка використовується для опису представлення документу, написаного на HTML чи XML (включаючи XML діалекти такі, як SVG або XHTML). CSS описує як елементи повинні відображатися на екрані, на папері, при озвученні, або на інших пристроях.

- -

CSS є одною з основних мов відкритої мережі і має стандартизовану W3C специфікацію. Розроблена по рівнях, CSS1 в даний час застаріла, CSS2.1 є рекомендованою, і CSS3, яка тепер розділена на більш дрібні модулі та розвивається шляхом стандартизації.

- -
- - -
-
-

Посібники

- -

Наша CSS сфера навчання має декілька модулів, які дозволяють вивчити CSS з нуля — знання мови не вимагається.

- -
-
Вступ в CSS
-
Цей модуль дозволяє вам почати вивчення з базових понять як CSS працює, включаючи селектори і параметри, написання правил CSS, застосування CSS до HTML, як вказати довжину, колір та інші одиниці виміру в CSS, каскади і успадкування, основи блочної моделі та відлагоджування CSS.
-
Стилізація тексту
-
В даному модулі ми розглянемо основи стилізації тексту, включаючи налаштування шрифтів, товщини, курсиву, відстані між рядками і буквами, а також застосування тіней та інших можливостей стилізації тексту. Ми розглянемо в даному модулі використання власних шрифтів на вашій веб-сторінці, і стилізацію списків і посилань.
-
Стилізація блоків
-
Далі ми розглянемо стилізацію блоків, один з базових кроків у напрямку розбивання веб-сторінки на блоки. У данаму модулі ми підсумуємо блокову модель і тоді розглянемо методи контролю блоків, застосовуючи внутрішні відступи (padding), рамки (borders) і зовнішні відступи, застосування власних заливок фону, картинок та інших можливостей, і такої можливості, як падіння тіней і фільтрів на блоках.
-
Макети CSS
-
До цього моменту ми вже розглянули базові поняття CSS, як стилізувати текст, я як стилізувати і маніпулювати блоками, щоб ваш контент поміщався в середину даних блоків. Тепер час розглянути розташування ваших блоків у правильному місці, по відношенню до точки огляду, і відносно один одного. Ми розкрили необхідні передумови, тому тепер ми можемо заглибитися в шаблони CSS детальніше, подивитися на налаштування для різних дисплеїв, традиційні методи шаблонів, включаючи плавання елементів по сторінці (float) і позиціонування (positioning), і нові сучасні інструменти для шаблонів такі, як флексбокс (flexbox).
-
-
- -
-

Посилання

- - - -

Інструменти для CSS розробки

- - -
-
-
- -

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

- - diff --git a/files/uk/web/css/layout_cookbook/index.html b/files/uk/web/css/layout_cookbook/index.html deleted file mode 100644 index 0af6191a71..0000000000 --- a/files/uk/web/css/layout_cookbook/index.html +++ /dev/null @@ -1,81 +0,0 @@ ---- -title: Кулінарна книга з CSS розмітки -slug: Web/CSS/Layout_cookbook -translation_of: Web/CSS/Layout_cookbook -original_slug: Web/CSS/Розмітка_кулінарна-книга ---- -
{{CSSRef}}
- -

The CSS layout cookbook aims to bring together recipes for common layout patterns, things you might need to implement in your own sites. In addition to providing code you can use as a starting point in your projects, these recipes highlight the different ways layout specifications can be used, and the choices you can make as a developer.

- -
-

Note: If you are new to CSS layout then you might first like to take a look at our CSS layout learning module, as this will give you the basic grounding you need to make use of the recipes here.

-
- -

The Recipes

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
RecipeDescriptionLayout Methods
Media objectsA two-column box with an image on one side and descriptive text on the other, e.g. a facebook post or tweet.CSS Grid, {{cssxref("float")}} fallback, {{cssxref("fit-content")}} sizing
ColumnsWhen to choose multi-column layout, flexbox or grid for your columns.CSS Grid, Multicol, Flexbox
Center an elementHow to center an item horizontally and vertically.Flexbox, Box Alignment
Sticky footersCreating a footer which sits at the bottom of the container or viewport when the content is shorter. CSS Grid, Flexbox
Split navigationA navigation pattern where some links are visually separated from the others.Flexbox, {{cssxref("margin")}}
Breadcrumb navigationCreating a list of links to allow the visitor to navigate back up through the page hierarchy.Flexbox
List group with badgesA list of items with a badge to display a count.Flexbox, Box Alignment
PaginationLinks to pages of content (such as search results).Flexbox, Box Alignment
CardA card component, which displays in a grid of cards.Grid Layout
Grid wrapperFor aligning grid content within a central wrapper, while also allowing items to break out.CSS Grid
- -

Contribute a Recipe

- -

As with all of MDN we would love you to contribute a recipe in the same format as the ones shown above. See this page for a template and guidelines for writing your own example.

diff --git a/files/uk/web/css/layout_mode/index.html b/files/uk/web/css/layout_mode/index.html deleted file mode 100644 index 504d11adc7..0000000000 --- a/files/uk/web/css/layout_mode/index.html +++ /dev/null @@ -1,31 +0,0 @@ ---- -title: Схема компонування -slug: Web/CSS/Layout_mode -tags: - - CSS - - Компонування - - Розмітка - - Розташування -translation_of: Web/CSS/Layout_mode -original_slug: Web/CSS/Схема_компонування ---- -
Схема компонування (layout mode) в CSS являє собою алгоритм, який визначає розташування та розміри елементів залежно від того, як вони взаємодіють із сусідніми та батьківськими елементами. Існує декілька таких схем:
- - - -
-

Зауваження: Не всі властивості CSS застосовні до всіх схем компонування. Більшість із них вживаються разом з однією-двома схемами і жодним чином не діють, якщо відповідний елемент компонується за іншою схемою.

-
- -

Див. також

- - diff --git a/files/uk/web/css/linear-gradient()/index.html b/files/uk/web/css/linear-gradient()/index.html deleted file mode 100644 index cf11a60ebc..0000000000 --- a/files/uk/web/css/linear-gradient()/index.html +++ /dev/null @@ -1,208 +0,0 @@ ---- -title: linear-gradient() -slug: Web/CSS/linear-gradient() -translation_of: Web/CSS/linear-gradient() ---- -
{{CSSRef}}
- -

linear-gradient() CSS функція створює зображення, що складається з прогресивного переходу між двома або більше кольорами по прямій лінії. Резултатом буде об`єкт типу {{CSSxRef("<gradient>")}} , що є спеціальним видом {{CSSxRef("<image>")}}.

- -
{{EmbedInteractiveExample("pages/css/function-linear-gradient.html")}}
- - - -

Як і будь-який градієнт, лінійний градієнт не має внутрішніх розмірів; тобто він не має природного або бажаного розміру, а також кращого співвідношення. Його розмір буде відповідати розміру елемента, до якого він застосовується.

- -

Щоб створити лінійний градієнт, який повторюється так, щоб заповнити його контейнер, скористайтеся функцією {{CSSxRef("repeating-linear-gradient")}}.

- -

Оскільки <gradient> належить до типу даних <image>вони можуть використовуватися лише там, де можна використовувати <image>. З цієї причини linear-gradient() не працюватиме там де застосовуються такі властивості як {{CSSxRef("background-color")}} і інших властивостях, що використовують тип даних  {{CSSxRef("<color>")}}.

- -

Композиція лінійного градієнту

- -

Лінійний градієнт визначається віссю - градієнтною лінією та двома або більше точками зупинки кольорів. Кожна точка на осі - виразний колір; щоб створити плавний градієнт, функція linear-gradient() малює серію кольорових ліній, перпендикулярних лінії градієнта, кожна з яких відповідає кольору точки, де вона перетинає лінію градієнта.

- -

linear-gradient.png

- -

Лінія градієнта визначається центром коробки, що містить зображення градієнта, і кутом. Кольори градієнта визначаються двома або більше точками: початковою точкою, кінцевою точкою та між ними необов’язковими кольоровими точками зупинки.

- -

Початковою точкою є місце на лінії градієнта, де починається перший колір. Кінцевою точкою є точка, в якій закінчується останній колір. Кожна з цих двох точок визначається перетином лінії градієнта з перпендикулярною лінією, що проходить від кута коробки, який знаходиться в одному квадраті. Кінцеву точку можна просто зрозуміти як симетричну точку відліку. Ці дещо складні визначення призводять до цікавого ефекту, який іноді називають магічними кутами: кути, найближчі до початкової та кінцевої точок, мають той же колір, що і їхні відповідні початкові або кінцеві точки.

- -

Налаштування градієнтів

- -

Додавши більше точок зупинки кольорів у лінії градієнта, ви можете створити модифікований перехід між декількома кольорами. Позицію зупинки кольору можна чітко визначити, використовуючи {{CSSxRef("<length>")}} або {{CSSxRef("<percentage>")}}. Якщо ви не вказали розташування кольору, він розміщується на півдорозі між тим, що йому передує, і тим, що слідує за ним. Наступні два градієнти рівнозначні.

- -
linear-gradient(red, orange, yellow, green, blue);
-linear-gradient(red 0%, orange 25%, yellow 50%, green 75%, blue 100%);
- -

By default, colors transition smoothly from the color at one color stop to the color at the subsequent color stop, with the midpoint between the colors being the half way point between the color transition. You can move this midpoint to any position between two color stops by adding an unlabelled % color hint between the two colors to indicate where the middle of the color transition should be. The following example is solid red from the start to the 10% mark and solid blue from 90% to the end. Between 10% and 90% the color transitions from red to blue, however the midpoint of the transition is at the 30% mark rather than 50% as would have happened without the 30% color hint.

- -
linear-gradient(red 10%, 30%, blue 90%);
- -

Якщо дві або більше кольорових зупинки знаходяться в одному місці, переходом буде суцільна лінія між першим і останнім кольорами, задекларованими в цьому місці.  

- -

Кольорові зупинки повинні бути вказані у порядку зростання. Подальші зупинки кольорів з меншим значенням замінять значення попередньої зупинки кольору, створюючи жорсткий перехід. Наступні зміни від червоного до жовтого на позначці 30%, а потім переходи від жовтого до синього понад 35% градієнта

- -
linear-gradient(red 40%, yellow 30%, blue 65%);
-
- -

Допускається багатопозиційна зупинка кольору. Колір можна оголосити двома суміжними зупинками кольорів, задекларувавши обидві позиції в CSS. Наступні три градієнти еквівалентні:

- -
linear-gradient(red 0%, orange 10%, orange 30%, yellow 50%, yellow 70%, green 90%, green 100%);
-linear-gradient(red, orange 10% 30%, yellow 50% 70%, green 90%);
-linear-gradient(red 0%, orange 10% 30%, yellow 50% 70%, green 90% 100%);
- -

За замовчуванням, якщо немає кольору із зупинкою 0%, перший заявлений колір буде в цій точці. Аналогічно, останній колір буде продовжуватись до позначки 100%, або буде на позначці 100%, якщо на останній зупинці не було оголошено жодної довжини.

- -

Синтаксис

- -
/* A gradient tilted 45 degrees,
-   starting blue and finishing red */
-linear-gradient(45deg, blue, red);
-
-/* A gradient going from the bottom right to the top left corner,
-   starting blue and finishing red */
-linear-gradient(to left top, blue, red);
-
-/* Color stop: A gradient going from the bottom to top,
-   starting blue, turning green at 40% of its length,
-   and finishing red */
-linear-gradient(0deg, blue, green 40%, red);
-
-/* Color hint: A gradient going from the left to right,
-   starting red, getting to the midpoint color
-   10% of the way across the length of the gradient,
-   taking the rest of the 90% of the length to change to blue */
-linear-gradient(.25turn, red, 10%, blue);
-
-/* Multi-position color stop: A gradient tilted 45 degrees,
-   with a red bottom-left half and a blue top-right half,
-   with a hard line where the gradient changes from red to blue */
-linear-gradient(45deg, red 0 50%, blue 50% 100%);
- -

Values

- -
-
<side-or-corner>
-
Позиція стартової точки градієнта. Якщо її вказано починається зі слова to і до двох ключових слів: одне вказує горизонтальну сторону (left or right), а інше вертикальну сторону (top or bottom). Порядок бічних ключових слів не має значення. Якщо не вказано, він за замовчуванням буде to bottom .
-
Значення to top, to bottom, to left, і to right еквівалентні 0deg, 180deg, 270deg, і 90deg, відповідно. Інші значення конвертуються в значення кутів.
-
{{CSSxRef("<angle>")}}
-
Кут нахилу лінії градієнта . Значення 0deg еквівалентне to top; зростаючі значення обертаються за годинниковою стрілкою .
-
<linear-color-stop>
-
Кольорові зупинки {{CSSxRef("<color>")}} значення, з подальшим одним або двома опціональними положеннями точок зупинки, ( кожен з яких є або {{CSSxRef("<percentage>")}} або {{CSSxRef("<length>")}} по осі градієнта ).
-
<color-hint>
-
The color-hint is an interpolation hint defining how the gradient progresses between adjacent color stops. The length defines at which point between two color stops the gradient color should reach the midpoint of the color transition. If omitted, the midpoint of the color transition is the midpoint between two color stops.
-
-
-

Примітка: Rendering of color stops in CSS gradients follows the same rules as color stops in SVG gradients.

-
-
-
- -

Formal syntax

- -
linear-gradient(
-  [ <angle> | to <side-or-corner> ,]? <color-stop-list> )
-  \---------------------------------/ \----------------------------/
-    Definition of the gradient line        List of color stops
-
-where <side-or-corner> = [ left | right ] || [ top | bottom ]
-  and <color-stop-list> = [ <linear-color-stop> [, <color-hint>? ]? ]#, <linear-color-stop>
-  and <linear-color-stop> = <color> [ <color-stop-length> ]?
-  and <color-stop-length> = [ <percentage> | <length> ]{1,2}
-  and <color-hint> = [ <percentage> | <length> ]
- -

Приклади

- -

Градієнт під кутом 45 градусів

- - - -
body {
-  background: linear-gradient(45deg, red, blue);
-}
- -

{{EmbedLiveSample("Градієнт_під_кутом_45_градусів", 120, 120)}}

- -

Gradient that starts at 60% of the gradient line

- - - -
body {
-  background: linear-gradient(135deg, orange, orange 60%, cyan);
-}
- -

{{EmbedLiveSample("Gradient_that_starts_at_60_of_the_gradient_line", 120, 120)}}

- -

Градієнт з багатопозиційними точками зупинки

- -

У цьому прикладі використовуються багатопозиційні кольорові зупинки, причому сусідні кольори мають однакове значення стоп кольору, створюючи смугастий ефект.

- - - -
body {
-  background: linear-gradient(to right,
-     red 20%, orange 20% 40%, yellow 40% 60%, green 60% 80%, blue 80%);
-}
- -

{{EmbedLiveSample("Градієнт_з_багатопозиційними_точками_зупинки", 120, 120)}}

- -
-

Примітка: Please see Using CSS gradients for more examples.

-
- -

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

- - - - - - - - - - - - - - - - - - - - - -
SpecificationStatusComment
{{SpecName('CSS4 Images', '#color-stop-syntax', 'Gradient Color-Stops')}}{{Spec2('CSS4 Images')}}Adds interpolation hints.
{{SpecName('CSS3 Images', '#linear-gradients', 'linear-gradient()')}}{{Spec2('CSS3 Images')}}Initial definition.
- -

Сумісність з браузерами

- - - -
{{Compat("css.types.image.gradient.linear-gradient")}}
- -

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

- - diff --git a/files/uk/web/css/mozilla_extensions/index.html b/files/uk/web/css/mozilla_extensions/index.html deleted file mode 100644 index 649ee1de1a..0000000000 --- a/files/uk/web/css/mozilla_extensions/index.html +++ /dev/null @@ -1,680 +0,0 @@ ---- -title: CSS-розширення для Mozilla -slug: Web/CSS/Mozilla_Extensions -tags: - - CSS-розширення для Mozilla - - 'CSS: розширення Mozilla' - - нестандартні властивості - - нестандартні властивості CSS для Mozilla -translation_of: Web/CSS/Mozilla_Extensions ---- -
{{CSSRef}}
- -
- -

У таких додатках Mozilla, як Firefox, підтримується ряд спеціальних розширень Mozilla до CSS, включаючи властивості, значення, псевдо-елементи і псевдо-класи, at-правила і медіа-запити. Ці розширення мають префікс-moz-.

- -

Властивості і псевдокласи тільки для Mozilla (уникайте використання на веб-сайтах)

- -
-

Нотаток: Ці властивості і псевдокласи працюватимуть тільки в додатках Mozilla, таких як Firefox, і не працюють на стандартних технологічних схемах. Деякі з них можуть застосовуватися тільки до елементів XUL.

-
- -
-

B

- - - -

C–I

- - - -

O

- - - -

S–Z

- - -
- -

Колись патентовані властивості, які на даний час є стандартними

- -
-

Нотаток: Даби максимізувати сумісність вашого CSS, ви повинні використовувати непрефіксние стандартні властивості, а не префіксні, перераховані нижче. Як тільки задану властивість стандартизовано і реалізовано без префікса, префиксная версія, як правило, через деякий час видаляється.

-
- -
- -
- -

Значення властивостей

- -

Глобальні значення

- -
- -
- -

{{CSSxRef("-moz-appearance")}}

- -
- -
- -

{{CSSxRef("background-image")}}

- -
- -
- -

{{CSSxRef("border-color")}}

- -
- -
- -

{{CSSxRef("border-style")}} and {{CSSxRef("outline-style")}}

- -
- -
- -

{{CSSxRef("<color>")}} keywords

- -
- -
- -

{{CSSxRef("display")}}

- -
- -
- -

{{CSSxRef("empty-cells")}}

- -
- -
- -

{{CSSxRef("font")}}

- -
- -
- -

{{CSSxRef("font-family")}}

- -
- -
- -

{{CSSxRef("image-rendering")}}

- -
- -
- -

{{CSSxRef("<length>")}}

- -
- -
- -

{{CSSxRef("list-style-type")}}

- -
- -
- -

{{CSSxRef("overflow")}}

- -
- -
- -

{{CSSxRef("text-align")}}

- -
- -
- -

{{CSSxRef("text-decoration")}}

- -
- -
- -

{{CSSxRef("-moz-user-select")}}

- -
- -
- -

{{CSSxRef("width")}}, {{CSSxRef("min-width")}}, and {{CSSxRef("max-width")}}

- -
- -
- -

Псевдоелементи та псевдокласи

- -
- -
- -

At-правила

- -
- -
- -

Компоненти медіа запитів

- -
- -
- -

Інше

- -
- -
- -

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

- - diff --git a/files/uk/web/css/order/index.html b/files/uk/web/css/order/index.html deleted file mode 100644 index 44839c5c2b..0000000000 --- a/files/uk/web/css/order/index.html +++ /dev/null @@ -1,170 +0,0 @@ ---- -title: order -slug: Web/CSS/order -tags: - - CSS - - CSS Flexible Boxes - - Порядок -translation_of: Web/CSS/order ---- -
{{CSSRef}}
- -

Загальний огляд

- -

CSS параметр order визначає порядок розташування flex елементів відносно їхнього батьківського flex контейнера. Елементи розташовуються у порядку зростання значення order. Елементи з однаковим значенням параметра order розташовуються в такому порядку, в якому вони розташовані в основному коді.

- -
-

Примітка: параметр order лише впливає на візуальний порядок елементів і не впливає на їх логічний порядок або порядок табуляції. order не повинен використовуватися на невізуальних носіях, таких як голосові читалки.

-
- -

{{cssinfo}}

- -

Дивіться Використання CSS flexible boxes для більш детальної інформації, а також опису інших параметрів.

- -

Синтаксис

- -
/* Числові значення включаючи від'ємні числа */
-order: 5;
-order: -5;
-
-/* Глобальні значення */
-order: inherit;
-order: initial;
-order: unset;
-
- -

Значення

- -
-
<integer>
-
Відображає порядковий номер групи, до якої flex елемент був присвоєний.
-
- -

Офіційний синтаксис

- -{{csssyntax}} - -

Приклади

- -

Тут є базовий уривок HTML:

- -
<!DOCTYPE html>
-<header>...</header>
-<div id='main'>
-   <article>Article</article>
-   <nav>Nav</nav>
-   <aside>Aside</aside>
-</div>
-<footer>...</footer>
- -

Наступний CSS код повинен створити класичний шаблон з двома бічними панелями, які оточують блок з контентом. Flexible Box Layout Module автоматично створює блоки з однаковими вертикальними розмірами і буде займати стільки горизонтального простору, скільки буде доступно.

- -
#main { display: flex;  text-align:center; }
-#main > article { flex:1;        order: 2; }
-#main > nav     { width: 200px;  order: 1; }
-#main > aside   { width: 200px;  order: 3; }
- -

Результат

- -

{{ EmbedLiveSample('Examples' ,'','','','Web/CSS/order') }}

- -

 

- -

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

- - - - - - - - - - - - - - - - -
СпецифікаціяСтатусКоментар
{{SpecName('CSS3 Flexbox', '#order-property', 'order')}}{{Spec2('CSS3 Flexbox')}}Початкове визначення
- -

Сумісність із браузерами

- -

{{CompatibilityTable}}

- -
- - - - - - - - - - - - - - - - - - - - - -
ОсобливістьChromeEdgeFirefox (Gecko)Internet ExplorerOperaSafari
Базова підтримка{{CompatChrome(21.0)}}{{property_prefix("-webkit")}}
- 29
{{CompatVersionUnknown}}{{property_prefix("-webkit")}}
- {{CompatVersionUnknown}}
{{CompatGeckoDesktop("18.0")}}[1]
- {{CompatGeckoDesktop("20.0")}}[2]
-

10.0{{property_prefix("-ms")}}[3]
- 11

-
12.107 {{property_prefix("-webkit")}}
- 9
-
- -
- - - - - - - - - - - - - - - - - - - - - - - -
ОсобливістьAndroidChrome for AndroidEdgeFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Базова підтримка{{CompatUnknown}}{{CompatUnknown}}{{CompatVersionUnknown}}{{property_prefix("-webkit")}}
- {{CompatVersionUnknown}}
{{CompatGeckoMobile("18.0")}}[1]
- {{CompatGeckoMobile("20.0")}}[2]
{{CompatUnknown}}12.107 {{property_prefix("-webkit")}}
- 9
-
- -

[1] Щоб активувати підтримку Flexbox для Firefox 18 або 19, користувач повинен змінити about:config preference layout.css.flexbox.enabled на true. Багаторядкові flexible boxes підтримуються з Firefox 28.

- -

Firefox на даний час неправильно змінює порядок табуляції елементів. Дивитися {{bug("812687")}}.

- -

[2] На додаток до підтримки без префікса, Gecko 48.0 {{geckoRelease("48.0")}} добавила підтримку для -webkit префіксної версії даного параметра, for web compatibility reasons behind the preference layout.css.prefixes.webkit, defaulting to false. Since Gecko 49.0 {{geckoRelease("49.0")}} the preference defaults to true.

- -

[3] В Internet Explorer 10, flexible контейнер декларуєтсья з використанням префікса '-ms' display:-ms-flexbox, а не display:flex. Даний параметр реалізований під нестандартним іменем -ms-flex-order.

- -

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

- - diff --git a/files/uk/web/css/position/index.html b/files/uk/web/css/position/index.html deleted file mode 100644 index 2d057ef9cc..0000000000 --- a/files/uk/web/css/position/index.html +++ /dev/null @@ -1,461 +0,0 @@ ---- -title: position -slug: Web/CSS/position -tags: - - CSS - - CSS-властивість - - Розміщення -translation_of: Web/CSS/position ---- -
{{CSSRef}}
- -

CSS-властивість position вказує, як елемент розміщено в документі. А властивості {{Cssxref("top")}}, {{Cssxref("right")}}, {{Cssxref("bottom")}}, та {{Cssxref("left")}} визначають остаточне положення елемента.

- -
/* Keyword values */
-position: static;
-position: relative;
-position: absolute;
-position: fixed;
-position: sticky;
-
-/* Global values */
-position: inherit;
-position: initial;
-position: unset;
-
- -
- - - -{{EmbedLiveSample("position", 1200, 300, "", "", "example-outcome-frame")}}
- -

{{cssinfo}}

- -

Види розміщення

- - - -

Most of the time, absolutely positioned elements that have {{Cssxref("height")}} and {{Cssxref("width")}} set to auto are sized so as to fit their contents. However, non-replaced absolutely positioned elements can be made to fill the available vertical space by specifying both {{Cssxref("top")}} and {{Cssxref("bottom")}} and leaving {{Cssxref("height")}} unspecified (that is, auto). They can likewise be made to fill the available horizontal space by specifying both {{Cssxref("left")}} and {{Cssxref("right")}} and leaving {{Cssxref("width")}} as auto.

- -

Except for the case just described of absolutely positioned elements filling the available space:

- - - -

Синтаксис

- -

Значення властивості position може бути одним із ключових слів, що їх перелік наведено нижче.

- -

Значення

- -
-
static
-
The element is positioned according to the normal flow of the document. The {{cssxref("top")}}, {{cssxref("right")}}, {{cssxref("bottom")}}, {{cssxref("left")}}, and {{cssxref("z-index")}} properties have no effect. This is the default value.
-
relative
-
The element is positioned according to the normal flow of the document, and then offset relative to itself based on the values of top, right, bottom, and left. The offset does not affect the position of any other elements; thus, the space given for the element in the page layout is the same as if position were static. This value creates a new stacking context when the value of z-index is not auto. The effect of relative on table-*-group, table-row, table-column, table-cell, and table-caption elements is undefined.
-
absolute
-
The element is removed from the normal document flow; no space is created for the element in the page layout. Instead, it is positioned relative to its closest positioned ancestor if any; otherwise, it is placed relative to the initial containing block. Its final position is determined by the values of top, right, bottom, and left. This value creates a new stacking context when the value of z-index is not auto. Absolutely positioned boxes can have margins, and they do not collapse with any other margins.
-
fixed
-
The element is removed from the normal document flow; no space is created for the element in the page layout. Instead, it is positioned relative to the screen's viewport and doesn't move when scrolled. Its final position is determined by the values of top, right, bottom, and left. This value always creates a new stacking context. When an ancestor has the transform property set to something other than none, that ancestor is used as the container instead of the viewport (see CSS Transforms Spec). In printed documents, the element is placed in the same position on every page.
-
- -
-
sticky {{experimental_inline}}
-
The element is positioned according to the normal flow of the document, and then offset relative to its flow root and containing block based on the values of top, right, bottom, and left. The offset does not affect the position of any other elements. This value always creates a new stacking context. The effect of sticky on table-related elements is the same as relative. Note that sticky, by specification, will not work inside element with overflow: hidden or auto. (ref: Github issue on W3C CSSWG)
-
- -

Формальний синтаксис

- -{{csssyntax}} - -

Приклади

- -

Відносне розміщення

- -

Relatively positioned elements are offset a given amount from their normal position within the document, but without the offset affecting other elements. In the example below, note how the other elements are placed as if "Two" were taking up the space of its normal location.

- -

HTML

- -
<div class="box" id="one">One</div>
-<div class="box" id="two">Two</div>
-<div class="box" id="three">Three</div>
-<div class="box" id="four">Four</div>
-
- -

CSS

- -
.box {
-  display: inline-block;
-  width: 100px;
-  height: 100px;
-  background: red;
-  color: white;
-}
-
-#two {
-  position: relative;
-  top: 20px;
-  left: 20px;
-  background: blue;
-}
-
- -

{{ EmbedLiveSample('Relative_positioning', '600px', '200px') }}

- -

Абсолютне розміщення

- -

Elements that are relatively positioned remain in the normal flow of the document. In contrast, an element that is absolutely positioned is taken out of the flow; thus, other elements are positioned as if it did not exist. The absolutely positioned element is positioned relative to its nearest positioned ancestor (i.e., the nearest ancestor that is not static). If a positioned ancestor doesn't exist, the initial container is used. In the example below, box "Two" has no positioned ancestor, so it is positioned relative to the the <body> of the document.

- -

HTML

- -
<div class="box" id="one">One</div>
-<div class="box" id="two">Two</div>
-<div class="box" id="three">Three</div>
-<div class="box" id="four">Four</div>
- -

CSS

- -
.box {
-  display: inline-block;
-  width: 100px;
-  height: 100px;
-  background: red;
-  color: white;
-}
-
-#two {
-  position: absolute;
-  top: 20px;
-  left: 20px;
-  background: blue;
-}
- -

{{ EmbedLiveSample('Absolute_positioning', '800px', '200px') }}

- -

Нерухоме розміщення

- -

Fixed positioning is similar to absolute positioning, with the exception that the element's containing block is the viewport. This can be used to create a floating element that stays in the same position regardless of scrolling. In the example below, box "One" is fixed at 80 pixels from the top of the page and 10 pixels from the left. Even after scrolling, it remains in the same place relative to the viewport.

- -

HTML

- -
<div class="outer">
-  <p>
-    Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam congue tortor eget pulvinar lobortis.
-    Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Nam ac dolor augue.
-    Pellentesque mi mi, laoreet et dolor sit amet, ultrices varius risus. Nam vitae iaculis elit.
-    Aliquam mollis interdum libero. Sed sodales placerat egestas. Vestibulum ut arcu aliquam purus viverra dictum vel sit amet mi.
-    Duis nisl mauris, aliquam sit amet luctus eget, dapibus in enim. Sed velit augue, pretium a sem aliquam, congue porttitor tortor.
-    Sed tempor nisl a lorem consequat, id maximus erat aliquet. Sed sagittis porta libero sed condimentum.
-    Aliquam finibus lectus nec ante congue rutrum. Curabitur quam quam, accumsan id ultrices ultrices, tempor et tellus.
-  </p>
-  <p>
-    Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam congue tortor eget pulvinar lobortis.
-    Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Nam ac dolor augue.
-    Pellentesque mi mi, laoreet et dolor sit amet, ultrices varius risus. Nam vitae iaculis elit.
-    Aliquam mollis interdum libero. Sed sodales placerat egestas. Vestibulum ut arcu aliquam purus viverra dictum vel sit amet mi.
-    Duis nisl mauris, aliquam sit amet luctus eget, dapibus in enim. Sed velit augue, pretium a sem aliquam, congue porttitor tortor.
-    Sed tempor nisl a lorem consequat, id maximus erat aliquet. Sed sagittis porta libero sed condimentum.
-    Aliquam finibus lectus nec ante congue rutrum. Curabitur quam quam, accumsan id ultrices ultrices, tempor et tellus.
-  </p>
-  <div class="box" id="one">One</div>
-</div>
-
- -

CSS

- -
.box {
-  width: 100px;
-  height: 100px;
-  background: red;
-  color: white;
-}
-
-#one {
-  position: fixed;
-  top: 80px;
-  left: 10px;
-  background: blue;
-}
-
-.outer {
-  width: 500px;
-  height: 300px;
-  overflow: scroll;
-  padding-left: 150px;
-}
-
- -

{{ EmbedLiveSample('Fixed_positioning', '800px', '300px') }}

- -

«Липке» розміщення

- -

Sticky positioning can be thought of as a hybrid of relative and fixed positioning. A stickily positioned element is treated as relatively positioned until it crosses a specified threshold, at which point it is treated as fixed. For instance...

- -
#one { position: sticky; top: 10px; }
- -

...would position the element with id one relatively until the viewport were scrolled such that the element would be less than 10 pixels from the top. Beyond that threshold, the element would be fixed to 10 pixels from the top.

- -
A common use for sticky positioning is for the headings in an alphabetized list. The "B" heading will appear just below the items that begin with "A" until they are scrolled offscreen. Rather than sliding offscreen with the rest of the content, the "B" heading will then remain fixed to the top of the viewport until all the "B" items have scrolled offscreen, at which point it will be covered up by the "C" heading, and so on.
- -
 
- -
You must specify a threshold with at least one of top, right, bottom, or left for sticky positioning to behave as expected. Otherwise, it will be indistinguishable from relative positioning.
- -
 
- -

HTML

- -
<dl>
-  <div>
-    <dt>A</dt>
-    <dd>Andrew W.K.</dd>
-    <dd>Apparat</dd>
-    <dd>Arcade Fire</dd>
-    <dd>At The Drive-In</dd>
-    <dd>Aziz Ansari</dd>
-  </div>
-  <div>
-    <dt>C</dt>
-    <dd>Chromeo</dd>
-    <dd>Common</dd>
-    <dd>Converge</dd>
-    <dd>Crystal Castles</dd>
-    <dd>Cursive</dd>
-  </div>
-  <div>
-    <dt>E</dt>
-    <dd>Explosions In The Sky</dd>
-  </div>
-  <div>
-    <dt>T</dt>
-    <dd>Ted Leo &amp; The Pharmacists</dd>
-    <dd>T-Pain</dd>
-    <dd>Thrice</dd>
-    <dd>TV On The Radio</dd>
-    <dd>Two Gallants</dd>
-  </div>
-</dl>
-
- -

CSS

- -
* {
-  box-sizing: border-box;
-}
-
-dl > div {
-  background: #FFF;
-  padding: 24px 0 0 0;
-}
-
-dt {
-  background: #B8C1C8;
-  border-bottom: 1px solid #989EA4;
-  border-top: 1px solid #717D85;
-  color: #FFF;
-  font: bold 18px/21px Helvetica, Arial, sans-serif;
-  margin: 0;
-  padding: 2px 0 0 12px;
-  position: -webkit-sticky;
-  position: sticky;
-  top: -1px;
-}
-
-dd {
-  font: bold 20px/45px Helvetica, Arial, sans-serif;
-  margin: 0;
-  padding: 0 0 0 12px;
-  white-space: nowrap;
-}
-
-dd + dd {
-  border-top: 1px solid #CCC;
-}
-
- -

{{ EmbedLiveSample('Sticky_positioning', '500px', '300px') }}

- - - -

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

- - - - - - - - - - - - - - - - - - - - - -
SpecificationStatusComment
{{SpecName('CSS2.1', 'visuren.html#propdef-position', 'position')}}{{Spec2('CSS2.1')}} 
{{SpecName('CSS3 Positioning','#position-property','position')}}{{Spec2('CSS3 Positioning')}}Adds sticky property value.
- -

Підтримка веб-переглядачами

- -
{{CompatibilityTable}}
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FeatureChromeEdgeFirefox (Gecko)Internet ExplorerOperaSafari (WebKit)
Basic support{{CompatChrome(1)}}{{CompatVersionUnknown}}1.0 (1.0) [1]4.0 [3]4.01.0 (85)
fixed value{{CompatChrome(1)}}{{CompatVersionUnknown}}1.0 (1.0) [4]7.04.01.0 (85)
sticky value{{CompatChrome(56)}}{{CompatUnknown}} [5]32 (32.0) [2]{{CompatNo}}{{CompatVersionUnknown}}6.1 {{ property_prefix("-webkit-") }}
-
- -
- - - - - - - - - - - - - - - - - - - - - - - -
FeatureAndroid WebviewChrome for AndroidEdgeFirefox Mobile (Gecko)IE PhoneOpera MobileSafari Mobile
Basic support{{CompatChrome(1)}}{{CompatChrome(1)}}{{CompatVersionUnknown}}1.0 (1.0) [1]{{CompatUnknown}}{{CompatVersionUnknown}}7.0 {{ property_prefix("-webkit-") }}
-
- -

[1] Since Firefox 30, Gecko allows {{HTMLElement("tr")}}, {{HTMLElement("thead")}}, and  {{HTMLElement("tfoot")}} elements with a position: relative; style to act as absolute positioning containers. This means that a position: absolute; styled element inside the table can be positioned relative to these elements. In other browsers and in older versions of Firefox, setting position: relative; on a table row or row group has no effect. Firefox helps developers transition to the new behavior and detect any rendering issues it may cause on their sites by printing a warning to the JavaScript console if you use this feature: Relative positioning of table rows and row groups is now supported. This site may need to be updated because it may depend on this feature having no effect.

- -

[2] In Firefox 26 to Firefox 31 (inclusive), sticky positioning only works when the about:config preference layout.css.sticky.enabled is set to true. From Firefox 27 to 31, true is the default value for Nightly and Aurora versions of the browser. The preference has been removed in Firefox 48.

- -

[3] In Internet Explorer, fixed positioning doesn't work if the document is in quirks mode.

- -

[4] Prior to Firefox 44, position: fixed didn't create a stacking context in most cases. The specification, and Gecko implementation, have been modified to mimic Chrome and Safari's long-time behavior.

- -

[5] Sticky positioning is in preview for Edge.

diff --git a/files/uk/web/css/reference/index.html b/files/uk/web/css/reference/index.html deleted file mode 100644 index 1eb6730f98..0000000000 --- a/files/uk/web/css/reference/index.html +++ /dev/null @@ -1,189 +0,0 @@ ---- -title: CSS довідник -slug: Web/CSS/Reference -translation_of: Web/CSS/Reference -original_slug: Web/CSS/Довідник ---- -

This CSS Reference shows the basic syntax of a CSS rule; lists all standard CSS properties, pseudo-classes and pseudo-elements, @-rules, units, and selectors, all together in alphabetical order, as well as just the selectors by type; and allows you to quickly access detailed information for each of them. It not only lists the CSS 1 and CSS 2.1 properties, but also is a CSS3 reference that links to any CSS3 property and concept standardized, or already stabilized.  Also included is a brief DOM-CSS / CSSOM reference.

- -

Note that CSS rule-definitions are entirely (ASCII) text-based, whereas DOM-CSS / CSSOM, the rule-management system, is object-based.

- -

See also Mozilla CSS Extensions for Gecko-specific properties prefixed with -moz; and WebKit CSS Extensions for WebKit-specific properties. See Vendor-prefixed CSS Property Overview by Peter Beverloo for all prefixed properties.

- -

Basic rule syntax

- -

Be warned that any syntax error in a rule definition will invalidate the entire rule.

- -

Style rules

- -
selectorlist { property: value; [more property:value; pairs] }
-
-...where selectorlist is: selector[:pseudo-class] [::pseudo-element] [, more selectorlists]
-
-See selector, pseudo-element, pseudo-class lists below.
-
- -

Examples

- -
strong { color: red;}
-div.menu-bar li:hover > ul { display: block; }
-
- -

More about examples: #1, #2

- -

@rules

- -

As these have so many different structure-formats, see the desired At-rule for syntax.

- -

Keyword index

- -
{{CSS_Ref}}
- -
-
-

Selectors

- -
    -
  • Basic Selectors - -
  • -
  • Combinators    (more info) - -
  • -
  • Pseudo-elements    (more info) -
      -
    • {{ Cssxref("::after") }}
    • -
    • {{ Cssxref("::before") }}
    • -
    • {{ Cssxref("::first-letter") }}
    • -
    • {{ Cssxref("::first-line") }}
    • -
    • {{ Cssxref("::selection") }}
    • -
    • {{ Cssxref("::backdrop") }}
    • -
    • {{ Cssxref("::placeholder") }} {{experimental_inline}}
    • -
    • {{ Cssxref("::marker") }} {{experimental_inline}}
    • -
    • {{ Cssxref("::spelling-error") }} {{experimental_inline}}
    • -
    • {{ Cssxref("::grammar-error") }} {{experimental_inline}}
    • -
    -
  • -
  • Standard pseudo-classes    (more info) -
    -
      -
    • {{ Cssxref(":active") }}
    • -
    • {{ cssxref(':any')}}
    • -
    • {{ Cssxref(":checked") }}
    • -
    • {{ Cssxref(":default") }}
    • -
    • {{ Cssxref(":dir", ":dir()")}}
    • -
    • {{ Cssxref(":disabled") }}
    • -
    • {{ Cssxref(":empty") }}
    • -
    • {{ Cssxref(":enabled") }}
    • -
    • {{ Cssxref(":first") }}
    • -
    • {{ Cssxref(":first-child") }}
    • -
    • {{ Cssxref(":first-of-type") }}
    • -
    • {{ Cssxref(":fullscreen") }}
    • -
    • {{ Cssxref(":focus") }}
    • -
    • {{ Cssxref(":hover") }}
    • -
    • {{ Cssxref(":indeterminate") }}
    • -
    • {{ Cssxref(":in-range") }}
    • -
    • {{ Cssxref(":invalid") }}
    • -
    • {{ Cssxref(":lang", ":lang()") }}
    • -
    • {{ Cssxref(":last-child") }}
    • -
    • {{ Cssxref(":last-of-type") }}
    • -
    • {{ Cssxref(":left") }}
    • -
    • {{ Cssxref(":link") }}
    • -
    • {{ Cssxref(":not", ":not()") }}
    • -
    • {{ Cssxref(":nth-child", ":nth-child()") }}
    • -
    • {{ Cssxref(":nth-last-child", ":nth-last-child()") }}
    • -
    • {{ Cssxref(":nth-last-of-type", ":nth-last-of-type()") }}
    • -
    • {{ Cssxref(":nth-of-type", ":nth-of-type()") }}
    • -
    • {{ Cssxref(":only-child") }}
    • -
    • {{ Cssxref(":only-of-type") }}
    • -
    • {{ Cssxref(":optional") }}
    • -
    • {{ Cssxref(":out-of-range") }}
    • -
    • {{ Cssxref(":read-only") }}
    • -
    • {{ Cssxref(":read-write") }}
    • -
    • {{ Cssxref(":required") }}
    • -
    • {{ Cssxref(":right") }}
    • -
    • {{ Cssxref(":root") }}
    • -
    • {{ Cssxref(":scope") }}
    • -
    • {{ Cssxref(":target") }}
    • -
    • {{ Cssxref(":valid") }}
    • -
    • {{ Cssxref(":visited") }}
    • -
    -
    -
  • -
- -

A complete list of selectors in the Selectors Level 3 specification.

- -

CSS3 Tutorials

- -

These small how-to pages describe new technologies appeared in CSS3, or in CSS2.1 but with low support until recently:

- - - -

Concepts

- - - -

DOM-CSS / CSSOM

- -

Major object types:

- - - -

Important methods:

- -
    -
  • {{domxref("CSSStyleSheet.insertRule")}}
  • -
  • {{domxref("CSSStyleSheet.deleteRule")}}
  • -
-
-
diff --git a/files/uk/web/css/resize/index.html b/files/uk/web/css/resize/index.html deleted file mode 100644 index 7a11fcc18c..0000000000 --- a/files/uk/web/css/resize/index.html +++ /dev/null @@ -1,212 +0,0 @@ ---- -title: resize -slug: Web/CSS/resize -tags: - - CSS - - CSS Властивість - - Зміна розміру - - Розмір -translation_of: Web/CSS/resize ---- -
{{CSSRef}}
- -

Зведення

- -

The resize CSS property lets you control the resizability of an element.

- -

{{cssinfo}}

- -

Синтаксис

- -
/* Keyword values */
-resize: none;
-resize: both;
-resize: horizontal;
-resize: vertical;
-resize: block;
-resize: inline;
-
-/* Global values */
-resize: inherit;
-resize: initial;
-resize: unset;
-
- -

Значення

- -
-
none
-
The element offers no user-controllable method for resizing the element.
-
both
-
The element displays a mechanism for allowing the user to resize the element, which may be resized both horizontally and vertically.
-
horizontal
-
The element displays a mechanism for allowing the user to resize the element, which may only be resized horizontally.
-
vertical
-
The element displays a mechanism for allowing the user to resize the element, which may only be resized vertically.
-
block {{experimental_inline}}
-
Depending on the {{cssxref("writing-mode")}} and {{cssxref("direction")}} value, the element displays a mechanism for allowing the user to resize the element either horizontally or vertically in block direction.
-
inline {{experimental_inline}}
-
Depending on the {{cssxref("writing-mode")}} and {{cssxref("direction")}} value, the element displays a mechanism for allowing the user to resize the element either horizontally or vertically in inline direction.
-
- -
Note: resize does not apply to blocks for which the {{cssxref("overflow")}} property is set to visible.
- -

Formal syntax

- -{{csssyntax}} - -

Examples

- -

Disabling resizability of textareas

- -

CSS

- -

By default, {{HTMLElement("textarea")}} elements are resizable in {{gecko("2.0")}} (Firefox 4). You may override this behavior with the CSS shown below:

- -
textarea.example {
-  resize: none; /* disables resizability */
-}
-
- -

HTML

- -
<textarea class="example">Type some text here.</textarea>
- -

Result

- -

{{EmbedLiveSample("Disabling_resizability_of_textareas","200","100")}}

- -

Using resize with arbitrary elements

- -

You can use the resize property to make any element resizable. In the example below, a resizable {{HTMLElement("div")}} box contains a resizable paragraph ({{HTMLElement("p")}} element):

- -

CSS

- -
.resizable {
-  resize: both;
-  overflow: scroll;
-  border: 1px solid black;
-}
-
-div {
-  height: 300px;
-  width: 300px;
-}
-
-p {
-  height: 200px;
-  width: 200px;
-}
-
- -

HTML

- -
<div class="resizable">
-  <p class="resizable">
-    This paragraph is resizable, because the CSS resize property is set to 'both' on this
-    element.
-  </p>
-</div>
-
- -

Result

- -

{{EmbedLiveSample("Using_resize_with_arbitrary_elements","450","450")}}

- -

Specifications

- - - - - - - - - - - - - - - - - - - - - -
SpecificationStatusComment
{{SpecName('CSS Logical Properties', '#resize', 'resize')}}{{Spec2('CSS Logical Properties')}}Adds the values block and inline.
{{SpecName('CSS3 Basic UI', '#resize', 'resize')}}{{Spec2('CSS3 Basic UI')}}Initial definition
- -

Browser compatibility

- -
{{CompatibilityTable}}
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
FeatureChromeFirefox (Gecko)Internet ExplorerOperaSafari (WebKit)
Basic support (on {{HTMLElement("textarea")}})1.0{{CompatGeckoDesktop("2.0")}}{{property_prefix("-moz")}}{{CompatNo}}12.13.0 (522)
On any block-level and replaced element, table cell, and inline block element (unless {{cssxref("overflow")}} is visible)4.0{{CompatGeckoDesktop("5.0")}}[1]{{CompatNo}}154.0
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
FeatureAndroidFirefox Mobile (Gecko)IE PhoneOpera MobileSafari Mobile
Basic support (on {{HTMLElement("textarea")}}){{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}
On any block-level and replaced element, table cell, and inline block element (unless {{cssxref("overflow")}} is visible){{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}
-
- -

[1] resize doesn't have any effect on {{HTMLElement("iframe")}} (cf. {{bug(680823)}})

- -

See also

- - diff --git a/files/uk/web/css/visual_formatting_model/index.html b/files/uk/web/css/visual_formatting_model/index.html deleted file mode 100644 index 521725152a..0000000000 --- a/files/uk/web/css/visual_formatting_model/index.html +++ /dev/null @@ -1,226 +0,0 @@ ---- -title: Модель візуального формування -slug: Web/CSS/Visual_formatting_model -tags: - - CSS - - NeedsUpdate - - Коробчаста модель CSS -translation_of: Web/CSS/Visual_formatting_model -original_slug: Web/CSS/Модель_візуального_формування ---- -

Модель візуального форматування (visual formatting model) у CSS являє собою алгоритм, що обробляє документ та подає його на візуальному носії. Ця модель є основним поняттям CSS.

- -

Кожен елемент в документі зазнає перетворення згідно з моделлю візуального формування і породжує нуль (жодного), один або кілька прямокутників відповідно до {{cssxref("CSS_Box_Model/Introduction_to_the_CSS_box_model", "коробчастої моделі")}} CSS. Компонування кожного такого прямокутника визначається низкою чинників:

- - - -

Відповідно до моделі, прямокутник розміщується й малюється відносно краю блока, всередині якого він міститься. Зазвичай прямокутник утворює такий блок для своїх нащадків. Втім, розмір прямокутника не обмежено розмірами блока, що його містить; коли компонування прямокутника передбачає вихід за межі блока, це зветься {{cssxref("overflow", "переповненням")}}.

- -

Утворення прямокутників

- -

Генерація блоків, це частина візуального форматування CSS, що створює прямокутники з елементів документу. Сгенеровані блоки є різних типів, що вплиає на те, як виконується візуальне формування. Тип згенерованого блоку залежить від значення CSS {{ cssxref("display") }}.

- -

Block-level elements and block boxes

- -

Елемент  називається блочним, коли його вираховане значення  {{ cssxref("display") }} CSS property is: block, list-item, or table. Елемент рівня блоку візуально форматується, як блок (наприклад абзац), приздачений для вертикальної компановки.

- -

Each block-level box participates in a block formatting context. Each block-level element generates at least one block-level box, called the principal block-level box. Some elements, like a list-item element, generating further boxes to handle bullets and other typographic elements introducing the list item, may generate more boxes. Most generate only the principal, block-level box.

- -

The principal block-level box contains descendant-generated boxes and generated content. It is also the box involved in the positioning scheme.

- -

venn_blocks.pngA block-level box may also be a block container box. A block container box is a box that contains only other block-level boxes, or creates an inline formatting context, thus containing only inline boxes.

- -

It is important to note that the notions of a block-level box and block container box are disjoined. The first, describes how the box behaves with its parents and sibling. The second, how it interacts with its descendants. Some block-level boxes, like tables, aren't block container boxes. Reciprocally, some block container boxes, like non-replaced inline blocks and non-replaced table cells, aren't block-level boxes.

- -

Block-level boxes that also are block container boxes are called block boxes.

- -

Anonymous block boxes

- -

In some cases, the visual formatting algorithm needs to add supplementary boxes. Because CSS selectors cannot style or name these boxes, they are called anonymous boxes.

- -

Because selectors do not work with anonymous boxes, they cannot be styled via a stylesheet. This means that all inheritable CSS properties have the inherit value, and all non-inheritable CSS properties, have the initial value.

- -

Block containing boxes contain only inline-level boxes, or only block-level boxes. But often the document contains a mix of both. In that case, anonymous block boxes are created around adjacent inline-level boxes.

- -

Example

- -

If we take the following HTML code (with default styling applied to it, that is {{ HTMLElement("div") }} and {{ HTMLElement("p") }} elements have display:block :

- -
<div>Some inline text <p>followed by a paragraph</p> followed by more inline text.</div>
- -

Two anonymous block boxes are created: one for the text before the paragraph (Some inline text), and another for the text after it (followed by more inline text). This builds the following block structure:

- -

anonymous_block-level_boxes.png

- -

Leading to:

- -
Some inline text
-followed by a paragraph
-followed by more inline text.
-
- -

Unlike the {{ HTMLElement("p") }} element's box, Web developers cannot control the style of the two anonymous boxes. Inheritable properties take the value from the {{ HTMLElement("div") }}'s property value, like {{ cssxref("color") }} to define the color of the text, and set the others to the initial value. For example, they won't have a specific {{ cssxref("background-color") }}, it is always transparent, the initial value for that property, and thus the background of the <div> is visible. A specific background color can be applied to the <p> box. Similarly, the two anonymous boxes always use the same color for their text.

- -

Another case that leads to the creation of anonymous block boxes, is an inline box that contains one or several block boxes. In that case, the box containing the block box is split into two inline boxes: one before, and one after the block box. All the inline boxes before the block box are then enclosed into an anonymous block box, so are the inline boxes following the block box. Therefore, the block box becomes the sibling of the two anonymous block boxes containing the inline elements.

- -

If there are several block boxes, without inline content in-between, the anonymous block boxes are created before, and after the set of boxes.

- -

Example

- -

If we take the following HTML code, with {{ HTMLElement("p") }} have display:inline and {{ HTMLElement("span") }} have display:block :

- -
<p>Some <em>inline</em> text <span>followed by a paragraph</span> followed by more inline text.</p>
- -

Two anonymous block boxes are created, one for the text before the span Element (Some inline text) and one for the text after it (followed by more inline text), which gives the following block structure:

- -

- -

Which leads to:

- -
Some inline text
-followed by a paragraph
-followed by more inline text.
-
- -

Inline-level elements and inline boxes

- -

An element is said to be inline-level when the calculated value of its {{ cssxref("display") }} CSS property is: inline, inline-block or inline-table. Visually, it doesn't constitute blocks of contents, but is distributed in lines with other inline-level content. Typically, the content of a paragraph with different formatting, like emphasis or images, is made from inline-level elements.

- -

venn_inlines.png

- -
-

This diagram uses outdated terminology; see note below. Besides that, it is incorrect because the yellow ellipsis on the right side is per definition either identical to the one on the left side, or bigger than that (it could be a mathematical superset), because the spec says "Inline-level elements generate inline-level boxes, which are boxes that participate in an inline formatting context", see CSS 2.2, chapter 9.2.2

-
- -

Inline-level elements generate inline-level boxes that are defined as boxes participating to an inline formatting context. Inline boxes are both inline-level boxes and boxes, whose contents participate in their container's inline formatting context. This is the case, for example, for all non-replaced boxes with display:inline. Inline-level boxes, whose contents do not participate in an inline formatting context, are called atomic inline-level boxes. These boxes, generated by replaced inline-level elements or by elements with a calculated {{ cssxref("display") }} value of inline-block or inline-table, are never split into several boxes, as is possible with inline boxes.

- -
Note: Initially, atomic inline-level boxes were called atomic inline boxes. This was unfortunate, as they are not inline boxes. This was corrected in an erratum to the spec. Nevertheless, you can harmlessly read atomic inline-level box each time you meet atomic inline box in the literature, as this is only a name change.
- -
Atomic inline boxes cannot be split into several lines in an inline formatting context. -
-
<style>
-  span {
-    display:inline; /* default value*/
-  }
-</style>
-<div style="width:20em;">
-   The text in the span <span>can be split in several
-   lines as it</span> is an inline box.
-</div>
-
- -

which leads to:

- -
The text in the span can be split into several lines as it is an inline box.
- -
<style>
-  span {
-    display:inline-block;
-  }
-</style>
-<div style="width:20em;">
-   The text in the span <span>cannot be split in several
-   lines as it</span> is an inline-block box.
-</div>
-
- -

which leads to:

- -
The text in the span cannot be split into several lines as it is an inline-block box.
-
-
- -

Anonymous inline boxes

- -

As for block boxes, there are a few cases where inline boxes are created automatically by the CSS engine. These inline boxes are also anonymous as they cannot be named by selectors; they inherit the value of all inheritable properties, setting it to initial for all others.

- -

The most common case where an anonymous inline box is created, is when some text is found as a direct child of a block box creating an inline formatting context. In that case, this text is included in the largest possible anonymous inline box. Also, space content, which would be removed by the behavior set in the {{ cssxref("white-space") }} CSS property, does not generate anonymous inline boxes because they would end empty.

- -
Example TBD
- -

Other types of boxes

- -

Line boxes

- -

Line boxes are generated by the inline formatting context to represent a line of text. Inside a block box, a line box extends from one border of the box to the other. When there are floats, the line box starts at the rightmost border of the left floats and ends at the leftmost border of the right floats.

- -

These boxes are technical, and Web authors do not usually have to bother with them.

- -

Run-in boxes

- -

Run-in boxes, defined using display:run-in, are boxes that are either block boxes or inline boxes, depending on the type of the following box. They can be used to create a title that runs inside its first paragraph when possible.

- -
Note: Run-in boxes were removed from the CSS 2.1 standard, as they were insufficiently specified to allow for interoperable implementation. They may reappear in CSS3, but meanwhile, are considered experimental. They should not be used in production.
- -

Model-induced boxes

- -

Besides the inline and block formatting contexts, CSS specifies several additional content models that may be applied to elements. These additional models, used to describe specific layouts, may define additional box types:

- - - -

Positioning schemes

- -

Once boxes are generated, the CSS engine needs to position them on the layout. To do that, it uses one of the following algorithms:

- - - -

Normal flow

- -

In the normal flow, boxes are laid out one after the other. In a block formatting context, they are laid out vertically; in an inline formatting context, they are laid out horizontally. The normal flow is triggered when the CSS {{ cssxref("position") }} is set to the value static or relative, and if the CSS {{ cssxref("float") }} is set to the value none.

- -

Example

- -
When in the normal flow, in a block formatting context, boxes are laid vertically one after the other out:
-
-[image]
-
-When in the normal flow, in an inline formatting context, boxes are laid horizontally one after the other out:
-
-[image]
- -

There are two sub-cases of the normal flow: static positioning and relative positioning:

- - - -

Floats

- -

In the float positioning scheme, specific boxes (called floating boxes or simply floats) are positioned at the beginning, or end of the current line. This leads to the property that text (and more generally anything within the normal flow) flows along the edge of the floating boxes, except if told differently by the {{ cssxref("clear") }} CSS property.

- -

The float positioning scheme for a box is selected, by setting the {{ cssxref("float") }} CSS property on that box to a value different than none and {{ cssxref("position") }} to static or relative. If {{ cssxref("float") }} is set to left, the float is positioned at the beginning of the line box. If set to right, the float is positioned at the end of the line box. In either case, the line box is shrunk to fit alongside the float.

- -

[image]

- -

Absolute positioning

- -

In the absolute positioning scheme, boxes are entirely removed from the flow and don't interact with it at all. They are positioned relative to their containing block using the {{ cssxref("top") }}, {{ cssxref("bottom") }}, {{ cssxref("left") }} and {{ cssxref("right") }} CSS properties.

- -

An element is absolutely positioned if the {{ cssxref("position") }} is set to absolute or fixed.

- -

With a fixed positioned element, the containing block is the viewport. The position of the element is absolute within the viewport. Scrolling does not change the position of the element.

- -

Див. також

- - diff --git a/files/uk/web/css/z-index/index.html b/files/uk/web/css/z-index/index.html deleted file mode 100644 index 364b1044a2..0000000000 --- a/files/uk/web/css/z-index/index.html +++ /dev/null @@ -1,134 +0,0 @@ ---- -title: z-index -slug: Web/CSS/z-index -translation_of: Web/CSS/z-index ---- -
{{CSSRef}}
- -

CSS властивість z-index встановлює порядок осі Z спозицйонованого елементу, його нащадків або елементів з властивістю flex. Елементи з більшим z-index перекривають такі, в яких ця величина менша.

- -
{{EmbedInteractiveExample("pages/css/z-index.html")}}
- - - -

В спозицйонованому елементі (такому, в якому властивість position є будь-якою окрім static) властивість z-index вказує:

- -
    -
  1. Рівень накладання елемента в поточному контексті накладання.
  2. -
  3. Чи створює цей елемент локальний контекст накладання.
  4. -
- -

Синтаксис

- -
/* Властивість, зазначена ключовим словом */
-z-index: auto;
-
-/* Цифрові значення <integer> */
-z-index: 0;
-z-index: 3;
-z-index: 289;
-z-index: -1; /* Цифри менше нуля зменьшують приорітет */
-
-/* Глобальні значення */
-z-index: inherit;
-z-index: initial;
-z-index: unset;
-
- -

Властивість z-index вказується або ключовим словом auto або цифрою <integer>.

- -

Вартості

- -
-
auto
-
Контейнер не визначає нового локального контексту накладання. Рівень накладання створеного контейнеру в поточному контексті накладання є такий самий як і батьківський.
-
<integer>
-
{{cssxref("<integer>")}} вказує рівень накладання створеного контейнеру в поточному контексті накладання. Контейнер також створює локальний контекст накладання в якому його рівень накладання дорівнює 0. Це означає що вартість z-index елементів-нащадків не порівнюється з z-index елементів поза цим елементем.
-
- -

Формальний синтаксис

- -
auto | {{cssxref("<integer>")}}
- -

Приклади

- -

HTML

- -
<div class="dashed-box">Коробка з пунктиром
-  <span class="gold-box">Золота коробка</span>
-  <span class="green-box">Зелена коробка</span>
-</div>
-
- -

CSS

- -
.dashed-box {
-  position: relative;
-  z-index: 1;
-  border: dashed;
-  height: 8em;
-  margin-bottom: 1em;
-  margin-top: 2em;
-}
-.gold-box {
-  position: absolute;
-  z-index: 3; /* розташуй .gold-box над .green-box та .dashed-box */
-  background: gold;
-  width: 80%;
-  left: 60px;
-  top: 3em;
-}
-.green-box {
-  position: absolute;
-  z-index: 2; /* розташуй .green-box над .dashed-box */
-  background: lightgreen;
-  width: 20%;
-  left: 65%;
-  top: -25px;
-  height: 7em;
-  opacity: 0.9;
-}
-
- -

Результат

- -

{{ EmbedLiveSample('Examples', '550', '200', '') }}

- -

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

- - - - - - - - - - - - - - - - - - - - - -
СпецифікаціяСтатусКоментар
{{SpecName('CSS3 Transitions', '#animatable-css', 'поводження анімації z-index')}}{{Spec2('CSS3 Transitions')}}Означає z-index як такий, який можна анімувати.
{{SpecName('CSS2.1', 'visuren.html#z-index', 'z-index')}}{{Spec2('CSS2.1')}}Початкове визначення
- -

{{cssinfo}}

- -

Браузерна сумісність

- - - -

{{Compat("css.properties.z-index")}}

- -

Дивись також

- - diff --git a/files/uk/web/events/index.html b/files/uk/web/events/index.html deleted file mode 100644 index ff23bb9e4c..0000000000 --- a/files/uk/web/events/index.html +++ /dev/null @@ -1,2310 +0,0 @@ ---- -title: Event reference -slug: Web/Events -tags: - - NeedsTranslation - - TopicStub - - events -translation_of: Web/Events ---- -

DOM Events are sent to notify code of interesting things that have taken place. Each event is represented by an object which is based on the {{domxref("Event")}} interface, and may have additional custom fields and/or functions used to get additional information about what happened. Events can represent everything from basic user interactions to automated notifications of things happening in the rendering model.

- -

This article offers a list of events that can be sent; some are standard events defined in official specifications, while others are events used internally by specific browsers; for example, Mozilla-specific events are listed so that add-ons can use them to interact with the browser.

- -

Standard events

- -

These events are defined in official Web specifications, and should be common across browsers. Each event is listed along with the interface representing the object sent to recipients of the event (so you can find information about what data is provided with each event) as well as a link to the specification or specifications that define the event.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Event NameEvent TypeSpecificationFired when...
{{event("abort")}}{{domxref("UIEvent")}}DOM L3The loading of a resource has been aborted.
abort{{domxref("ProgressEvent")}}Progress and XMLHttpRequestProgression has been terminated (not due to an error).
abort{{domxref("Event")}}IndexedDBA transaction has been aborted.
{{event("afterprint")}}{{gecko_minversion_inline("6")}}{{domxref("Event")}}HTML5The associated document has started printing or the print preview has been closed.
{{event("animationend")}}{{domxref("AnimationEvent")}}CSS AnimationsA CSS animation has completed.
{{event("animationiteration")}}{{domxref("AnimationEvent")}}CSS AnimationsA CSS animation is repeated.
{{event("animationstart")}}{{domxref("AnimationEvent")}}CSS AnimationsA CSS animation has started.
{{event("audioprocess")}}{{domxref("AudioProcessingEvent")}}{{SpecName('Web Audio API', '#AudioProcessingEvent', 'audioprocess')}}The input buffer of a {{domxref("ScriptProcessorNode")}} is ready to be processed.
{{event("audioend")}}{{domxref("Event")}}{{SpecName('Web Speech API')}}The user agent has finished capturing audio for speech recognition.
{{event("audiostart")}}{{domxref("Event")}}{{SpecName('Web Speech API')}}The user agent has started to capture audio for speech recognition.
{{event("beforeprint")}} {{gecko_minversion_inline("6")}}{{domxref("Event")}}HTML5The associated document is about to be printed or previewed for printing.
{{event("beforeunload")}}{{domxref("BeforeUnloadEvent")}}HTML5  
{{event("beginEvent")}}{{domxref("TimeEvent")}}SVGA SMIL animation element begins.
blocked IndexedDBAn open connection to a database is blocking a versionchange transaction on the same database.
{{event("blur")}}{{domxref("FocusEvent")}}DOM L3An element has lost focus (does not bubble).
{{event("boundary")}}{{domxref("SpeechSynthesisEvent")}}{{SpecName('Web Speech API')}}The spoken utterance reaches a word or sentence boundary
{{event("cached")}}{{domxref("Event")}}OfflineThe resources listed in the manifest have been downloaded, and the application is now cached.
{{event("canplay")}}{{domxref("Event")}}HTML5 mediaThe user agent can play the media, but estimates that not enough data has been loaded to play the media up to its end without having to stop for further buffering of content.
{{event("canplaythrough")}}{{domxref("Event")}}HTML5 mediaThe user agent can play the media, and estimates that enough data has been loaded to play the media up to its end without having to stop for further buffering of content.
{{event("change")}}{{domxref("Event")}}DOM L2, HTML5The change event is fired for {{HTMLElement("input")}}, {{HTMLElement("select")}}, and {{HTMLElement("textarea")}} elements when a change to the element's value is committed by the user.
{{event("chargingchange")}}{{domxref("Event")}}Battery statusThe battery begins or stops charging.
{{event("chargingtimechange")}}{{domxref("Event")}}Battery statusThe chargingTime attribute has been updated.
{{event("checking")}}{{domxref("Event")}}OfflineThe user agent is checking for an update, or attempting to download the cache manifest for the first time.
{{event("click")}}{{domxref("MouseEvent")}}DOM L3A pointing device button has been pressed and released on an element.
close{{domxref("Event")}}WebSocketA WebSocket connection has been closed.
complete IndexedDB 
{{event("complete")}}{{domxref("OfflineAudioCompletionEvent")}}{{SpecName('Web Audio API', '#OfflineAudioCompletionEvent-section', 'OfflineAudioCompletionEvent')}}The rendering of an {{domxref("OfflineAudioContext")}} is terminated.
{{event("compositionend")}}{{gecko_minversion_inline("9")}}{{domxref("CompositionEvent")}}DOM L3The composition of a passage of text has been completed or canceled.
{{event("compositionstart")}}{{gecko_minversion_inline("9")}}{{domxref("CompositionEvent")}}DOM L3The composition of a passage of text is prepared (similar to keydown for a keyboard input, but works with other inputs such as speech recognition).
{{event("compositionupdate")}}{{gecko_minversion_inline("9")}}{{domxref("CompositionEvent")}}DOM L3A character is added to a passage of text being composed.
{{event("contextmenu")}}{{domxref("MouseEvent")}}HTML5The right button of the mouse is clicked (before the context menu is displayed).
{{event("copy")}}{{domxref("ClipboardEvent")}}ClipboardThe text selection has been added to the clipboard.
{{event("cut")}}{{domxref("ClipboardEvent")}}ClipboardThe text selection has been removed from the document and added to the clipboard.
{{event("dblclick")}}{{domxref("MouseEvent")}}DOM L3A pointing device button is clicked twice on an element.
{{event("devicelight")}}{{domxref("DeviceLightEvent")}}Ambient Light EventsFresh data is available from a light sensor.
{{event("devicemotion")}}{{domxref("DeviceMotionEvent")}}Device Orientation EventsFresh data is available from a motion sensor.
{{event("deviceorientation")}}{{domxref("DeviceOrientationEvent")}}Device Orientation EventsFresh data is available from an orientation sensor.
{{event("deviceproximity")}}{{domxref("DeviceProximityEvent")}}Proximity EventsFresh data is available from a proximity sensor (indicates an approximated distance between the device and a nearby object).
{{event("dischargingtimechange")}}{{domxref("Event")}}Battery statusThe dischargingTime attribute has been updated.
DOMActivate {{deprecated_inline}}{{domxref("UIEvent")}}DOM L3A button, link or state changing element is activated (use {{event("click")}} instead).
DOMAttributeNameChanged {{deprecated_inline}}{{domxref("MutationNameEvent")}}DOM L3 RemovedThe name of an attribute changed (use mutation observers instead).
DOMAttrModified {{deprecated_inline}}{{domxref("MutationEvent")}}DOM L3The value of an attribute has been modified (use mutation observers instead).
DOMCharacterDataModified {{deprecated_inline}}{{domxref("MutationEvent")}}DOM L3A text or another CharacterData has changed (use mutation observers instead).
{{event("DOMContentLoaded")}}{{domxref("Event")}}HTML5The document has finished loading (but not its dependent resources).
DOMElementNameChanged {{deprecated_inline}}{{domxref("MutationNameEvent")}}DOM L3 RemovedThe name of an element changed (use mutation observers instead).
DOMFocusIn {{deprecated_inline}}{{domxref("FocusEvent")}}DOM L3An element has received focus (use {{event("focus")}} or {{event("focusin")}} instead).
DOMFocusOut {{deprecated_inline}}{{domxref("FocusEvent")}}DOM L3An element has lost focus (use {{event("blur")}} or {{event("focusout")}} instead).
DOMNodeInserted {{deprecated_inline}}{{domxref("MutationEvent")}}DOM L3A node has been added as a child of another node (use mutation observers instead).
DOMNodeInsertedIntoDocument {{deprecated_inline}}{{domxref("MutationEvent")}}DOM L3A node has been inserted into the document (use mutation observers instead).
DOMNodeRemoved {{deprecated_inline}}{{domxref("MutationEvent")}}DOM L3A node has been removed from its parent node (use mutation observers instead).
DOMNodeRemovedFromDocument {{deprecated_inline}}{{domxref("MutationEvent")}}DOM L3A node has been removed from the document (use mutation observers instead).
DOMSubtreeModified {{deprecated_inline}}{{domxref("MutationEvent")}}DOM L3A change happened in the document (use mutation observers instead).
{{event("downloading")}}{{domxref("Event")}}OfflineThe user agent has found an update and is fetching it, or is downloading the resources listed by the cache manifest for the first time.
{{event("drag")}}{{domxref("DragEvent")}}HTML5An element or text selection is being dragged (every 350ms).
{{event("dragend")}}{{domxref("DragEvent")}}HTML5A drag operation is being ended (by releasing a mouse button or hitting the escape key).
{{event("dragenter")}}{{domxref("DragEvent")}}HTML5A dragged element or text selection enters a valid drop target.
{{event("dragleave")}}{{domxref("DragEvent")}}HTML5A dragged element or text selection leaves a valid drop target.
{{event("dragover")}}{{domxref("DragEvent")}}HTML5An element or text selection is being dragged over a valid drop target (every 350ms).
{{event("dragstart")}}{{domxref("DragEvent")}}HTML5The user starts dragging an element or text selection.
{{event("drop")}}{{domxref("DragEvent")}}HTML5An element is dropped on a valid drop target.
{{event("durationchange")}}{{domxref("Event")}}HTML5 mediaThe duration attribute has been updated.
{{event("emptied")}}{{domxref("Event")}}HTML5 mediaThe media has become empty; for example, this event is sent if the media has already been loaded (or partially loaded), and the load() method is called to reload it.
{{event("end_(SpeechRecognition)","end")}}{{domxref("Event")}}{{SpecName('Web Speech API')}}The speech recognition service has disconnected.
{{event("end_(SpeechSynthesis)","end")}}{{domxref("SpeechSynthesisEvent")}}{{SpecName("Web Speech API")}}The utterance has finished being spoken.
{{event("ended")}}{{domxref("Event")}}HTML5 mediaPlayback has stopped because the end of the media was reached.
{{event("ended_(Web_Audio)", "ended")}}{{domxref("Event")}}{{SpecName("Web Audio API")}} 
{{event("endEvent")}}{{domxref("TimeEvent")}}SVGA SMIL animation element ends.
{{event("error")}}{{domxref("UIEvent")}}DOM L3A resource failed to load.
{{event("error")}}{{domxref("ProgressEvent")}}Progress and XMLHttpRequestProgression has failed.
{{event("error")}}{{domxref("Event")}}OfflineAn error occurred while downloading the cache manifest or updating the content of the application.
{{event("error")}}{{domxref("Event")}}WebSocketA WebSocket connection has been closed with prejudice (some data couldn't be sent for example).
{{event("error")}}{{domxref("Event")}}Server Sent EventsAn event source connection has been failed.
{{event("error")}}{{domxref("Event")}}IndexedDBA request caused an error and failed.
{{event("error_(SpeechRecognitionError)","error")}}{{domxref("Event")}}{{SpecName('Web Speech API')}}A speech recognition error occurs.
{{event("error_(SpeechSynthesisError)","error")}}{{domxref("SpeechSynthesisErrorEvent")}}{{SpecName('Web Speech API')}}An error occurs that prevents the utterance from being succesfully spoken.
{{event("focus")}}{{domxref("FocusEvent")}}DOM L3An element has received focus (does not bubble).
{{event("focusin")}}{{domxref("FocusEvent")}}DOM L3An element is about to receive focus (bubbles).
{{event("focusout")}}{{domxref("FocusEvent")}}DOM L3An element is about to lose focus (bubbles).
{{event("fullscreenchange")}}{{domxref("Event")}}Full ScreenAn element was turned to fullscreen mode or back to normal mode.
{{event("fullscreenerror")}}{{domxref("Event")}}Full ScreenIt was impossible to switch to fullscreen mode for technical reasons or because the permission was denied.
{{event("gamepadconnected")}}{{domxref("GamepadEvent")}}GamepadA gamepad has been connected.
{{event("gamepaddisconnected")}}{{domxref("GamepadEvent")}}GamepadA gamepad has been disconnected.
{{event("gotpointercapture")}}{{domxref("PointerEvent")}}Pointer EventsElement receives pointer capture.
{{event("hashchange")}}{{domxref("HashChangeEvent")}}HTML5The fragment identifier of the URL has changed (the part of the URL after the #).
{{event("lostpointercapture")}}{{domxref("PointerEvent")}}Pointer EventsElement lost pointer capture.
{{event("input")}}{{domxref("Event")}}HTML5The value of an element changes or the content of an element with the attribute contenteditable is modified.
{{event("invalid")}}{{domxref("Event")}}HTML5A submittable element has been checked and doesn't satisfy its constraints.
{{event("keydown")}}{{domxref("KeyboardEvent")}}DOM L3A key is pressed down.
{{event("keypress")}}{{domxref("KeyboardEvent")}}DOM L3A key is pressed down and that key normally produces a character value (use input instead).
{{event("keyup")}}{{domxref("KeyboardEvent")}}DOM L3A key is released.
{{event("languagechange")}}{{domxref("Event")}}{{ SpecName('HTML5.1', '#dom-navigator-languages', 'NavigatorLanguage.languages') }} 
{{event("levelchange")}}{{domxref("Event")}}Battery statusThe level attribute has been updated.
{{event("load")}}{{domxref("UIEvent")}}DOM L3A resource and its dependent resources have finished loading.
load{{domxref("ProgressEvent")}}Progress and XMLHttpRequestProgression has been successful.
{{event("loadeddata")}}{{domxref("Event")}}HTML5 mediaThe first frame of the media has finished loading.
{{event("loadedmetadata")}}{{domxref("Event")}}HTML5 mediaThe metadata has been loaded.
{{event("loadend")}}{{domxref("ProgressEvent")}}Progress and XMLHttpRequestProgress has stopped (after "error", "abort" or "load" have been dispatched).
{{event("loadstart")}}{{domxref("ProgressEvent")}}Progress and XMLHttpRequestProgress has begun.
{{event("mark")}}{{domxref("SpeechSynthesisEvent")}}{{SpecName('Web Speech API')}}The spoken utterance reaches a named SSML "mark" tag.
message{{domxref("MessageEvent")}}WebSocketA message is received through a WebSocket.
message{{domxref("MessageEvent")}}Web WorkersA message is received from a Web Worker.
message{{domxref("MessageEvent")}}Web MessagingA message is received from a child (i)frame or a parent window.
message{{domxref("MessageEvent")}}Server Sent EventsA message is received through an event source.
{{event("message_(ServiceWorker)","message")}}{{domxref("ServiceWorkerMessageEvent")}} or {{domxref("ExtendableMessageEvent")}}, depending on context.Service WorkersA message is received from a service worker, or a message is received in a service worker from another context.
{{event("mousedown")}}{{domxref("MouseEvent")}}DOM L3A pointing device button (usually a mouse) is pressed on an element.
{{event("mouseenter")}}{{domxref("MouseEvent")}}DOM L3A pointing device is moved onto the element that has the listener attached.
{{event("mouseleave")}}{{domxref("MouseEvent")}}DOM L3A pointing device is moved off the element that has the listener attached.
{{event("mousemove")}}{{domxref("MouseEvent")}}DOM L3A pointing device is moved over an element.
{{event("mouseout")}}{{domxref("MouseEvent")}}DOM L3A pointing device is moved off the element that has the listener attached or off one of its children.
{{event("mouseover")}}{{domxref("MouseEvent")}}DOM L3A pointing device is moved onto the element that has the listener attached or onto one of its children.
{{event("mouseup")}}{{domxref("MouseEvent")}}DOM L3A pointing device button is released over an element.
{{event("nomatch")}}{{domxref("SpeechRecognitionEvent")}}{{SpecName('Web Speech API')}}The speech recognition service returns a final result with no significant recognition.
{{event("notificationclick")}}{{domxref("NotificationEvent")}}{{SpecName('Web Notifications','#dom-serviceworkerglobalscope-onnotificationclick','onnotificationclick')}}A system notification spawned by {{domxref("ServiceWorkerRegistration.showNotification()")}} has been clicked.
{{event("noupdate")}}{{domxref("Event")}}OfflineThe manifest hadn't changed.
{{event("obsolete")}}{{domxref("Event")}}OfflineThe manifest was found to have become a 404 or 410 page, so the application cache is being deleted.
{{event("offline")}}{{domxref("Event")}}HTML5 offlineThe browser has lost access to the network.
{{event("online")}}{{domxref("Event")}}HTML5 offlineThe browser has gained access to the network (but particular websites might be unreachable).
open{{domxref("Event")}}WebSocketA WebSocket connection has been established.
open{{domxref("Event")}}Server Sent EventsAn event source connection has been established.
{{event("orientationchange")}}{{domxref("Event")}}Screen OrientationThe orientation of the device (portrait/landscape) has changed
{{event("pagehide")}}{{domxref("PageTransitionEvent")}}HTML5A session history entry is being traversed from.
{{event("pageshow")}}{{domxref("PageTransitionEvent")}}HTML5A session history entry is being traversed to.
{{event("paste")}}{{domxref("ClipboardEvent")}}ClipboardData has been transfered from the system clipboard to the document.
{{event("pause")}}{{domxref("Event")}}HTML5 mediaPlayback has been paused.
{{event("pause_(SpeechSynthesis)", "pause")}}{{domxref("SpeechSynthesisEvent")}}{{SpecName('Web Speech API')}}The utterance is paused part way through.
{{event("pointercancel")}}{{domxref("PointerEvent")}}Pointer EventsThe pointer is unlikely to produce any more events.
{{event("pointerdown")}}{{domxref("PointerEvent")}}Pointer EventsThe pointer enters the active buttons state.
{{event("pointerenter")}}{{domxref("PointerEvent")}}Pointer EventsPointing device is moved inside the hit-testing boundary.
{{event("pointerleave")}}{{domxref("PointerEvent")}}Pointer EventsPointing device is moved out of the hit-testing boundary.
{{event("pointerlockchange")}}{{domxref("Event")}}Pointer LockThe pointer was locked or released.
{{event("pointerlockerror")}}{{domxref("Event")}}Pointer LockIt was impossible to lock the pointer for technical reasons or because the permission was denied.
{{event("pointermove")}}{{domxref("PointerEvent")}}Pointer EventsThe pointer changed coordinates.
{{event("pointerout")}}{{domxref("PointerEvent")}}Pointer EventsThe pointing device moved out of hit-testing boundary or leaves detectable hover range.
{{event("pointerover")}}{{domxref("PointerEvent")}}Pointer EventsThe pointing device is moved into the hit-testing boundary.
{{event("pointerup")}}{{domxref("PointerEvent")}}Pointer EventsThe pointer leaves the active buttons state.
{{event("play")}}{{domxref("Event")}}HTML5 mediaPlayback has begun.
{{event("playing")}}{{domxref("Event")}}HTML5 mediaPlayback is ready to start after having been paused or delayed due to lack of data.
{{event("popstate")}}{{domxref("PopStateEvent")}}HTML5A session history entry is being navigated to (in certain cases).
{{event("progress")}}{{domxref("ProgressEvent")}}Progress and XMLHttpRequestIn progress.
progress{{domxref("ProgressEvent")}}OfflineThe user agent is downloading resources listed by the manifest.
{{event("push")}}{{domxref("PushEvent")}}{{SpecName("Push API")}}A Service Worker has received a push message.
{{event("pushsubscriptionchange")}}{{domxref("PushEvent")}}{{SpecName("Push API")}}A PushSubscription has expired.
{{event("ratechange")}}{{domxref("Event")}}HTML5 mediaThe playback rate has changed.
{{event("readystatechange")}}{{domxref("Event")}}HTML5 and XMLHttpRequestThe readyState attribute of a document has changed.
{{event("repeatEvent")}}{{domxref("TimeEvent")}}SVGA SMIL animation element is repeated.
{{event("reset")}}{{domxref("Event")}}DOM L2, HTML5A form is reset.
{{event("resize")}}{{domxref("UIEvent")}}DOM L3The document view has been resized.
{{event("resourcetimingbufferfull")}}{{domxref("Performance")}}Resource TimingThe browser's resource timing buffer is full.
{{event("result")}}{{domxref("SpeechRecognitionEvent")}}{{SpecName('Web Speech API')}}The speech recognition service returns a result — a word or phrase has been positively recognized and this has been communicated back to the app.
{{event("resume")}}{{domxref("SpeechSynthesisEvent")}}{{SpecName('Web Speech API')}}A paused utterance is resumed.
{{event("scroll")}}{{domxref("UIEvent")}}DOM L3The document view or an element has been scrolled.
{{event("seeked")}}{{domxref("Event")}}HTML5 mediaA seek operation completed.
{{event("seeking")}}{{domxref("Event")}}HTML5 mediaA seek operation began.
{{event("select")}}{{domxref("UIEvent")}}DOM L3Some text is being selected.
{{event("selectstart")}}{{domxref("Event")}}{{ SpecName('Selection API')}}A selection just started.
{{event("selectionchange")}}{{domxref("Event")}}{{ SpecName('Selection API')}}The selection in the document has been changed.
{{event("show")}}{{domxref("MouseEvent")}}HTML5A contextmenu event was fired on/bubbled to an element that has a contextmenu attribute
{{event("soundend")}}{{domxref("Event")}}{{SpecName('Web Speech API')}}Any sound — recognisable speech or not — has stopped being detected.
{{event("soundstart")}}{{domxref("Event")}}{{SpecName('Web Speech API')}}Any sound — recognisable speech or not — has been detected.
{{event("speechend")}}{{domxref("Event")}}{{SpecName('Web Speech API')}}Speech recognised by the speech recognition service has stopped being detected.
{{event("speechstart")}}{{domxref("Event")}}{{SpecName('Web Speech API')}}Sound that is recognised by the speech recognition service as speech has been detected.
{{event("stalled")}}{{domxref("Event")}}HTML5 mediaThe user agent is trying to fetch media data, but data is unexpectedly not forthcoming.
{{event("start_(SpeechRecognition)","start")}}{{domxref("Event")}}{{SpecName('Web Speech API')}}The speech recognition service has begun listening to incoming audio with intent to recognize grammars associated with the current SpeechRecognition.
{{event("start_(SpeechSynthesis)","start")}}{{domxref("SpeechSynthesisEvent")}}{{SpecName('Web Speech API')}}The utterance has begun to be spoken.
{{event("storage")}}{{domxref("StorageEvent")}}Web StorageA storage area (localStorage or sessionStorage) has changed.
{{event("submit")}}{{domxref("Event")}}DOM L2, HTML5A form is submitted.
success{{domxref("Event")}}IndexedDBA request successfully completed.
{{event("suspend")}}{{domxref("Event")}}HTML5 mediaMedia data loading has been suspended.
{{event("SVGAbort")}}{{domxref("SVGEvent")}}SVGPage loading has been stopped before the SVG was loaded.
{{event("SVGError")}}{{domxref("SVGEvent")}}SVGAn error has occurred before the SVG was loaded.
{{event("SVGLoad")}}{{domxref("SVGEvent")}}SVGAn SVG document has been loaded and parsed.
{{event("SVGResize")}}{{domxref("SVGEvent")}}SVGAn SVG document is being resized.
{{event("SVGScroll")}}{{domxref("SVGEvent")}}SVGAn SVG document is being scrolled.
{{event("SVGUnload")}}{{domxref("SVGEvent")}}SVGAn SVG document has been removed from a window or frame.
{{event("SVGZoom")}}{{domxref("SVGZoomEvent")}}SVGAn SVG document is being zoomed.
{{event("timeout")}}{{domxref("ProgressEvent")}}XMLHttpRequest 
{{event("timeupdate")}}{{domxref("Event")}}HTML5 mediaThe time indicated by the currentTime attribute has been updated.
{{event("touchcancel")}}{{domxref("TouchEvent")}}Touch EventsA touch point has been disrupted in an implementation-specific manners (too many touch points for example).
{{event("touchend")}}{{domxref("TouchEvent")}}Touch EventsA touch point is removed from the touch surface.
{{event("touchenter")}}{{domxref("TouchEvent")}}Touch Events RemovedA touch point is moved onto the interactive area of an element.
{{event("touchleave")}}{{domxref("TouchEvent")}}Touch Events RemovedA touch point is moved off the interactive area of an element.
{{event("touchmove")}}{{domxref("TouchEvent")}}Touch EventsA touch point is moved along the touch surface.
{{event("touchstart")}}{{domxref("TouchEvent")}}Touch EventsA touch point is placed on the touch surface.
{{event("transitionend")}}{{domxref("TransitionEvent")}}CSS TransitionsA CSS transition has completed.
{{event("unload")}}{{domxref("UIEvent")}}DOM L3The document or a dependent resource is being unloaded.
{{event("updateready")}}{{domxref("Event")}}OfflineThe resources listed in the manifest have been newly redownloaded, and the script can use swapCache() to switch to the new cache.
upgradeneeded IndexedDBAn attempt was made to open a database with a version number higher than its current version. A versionchange transaction has been created.
{{event("userproximity")}}{{domxref("UserProximityEvent")}}{{SpecName("Proximity Events")}}Fresh data is available from a proximity sensor (indicates whether the nearby object is near the device or not).
{{event("voiceschanged")}}{{domxref("Event")}}{{SpecName('Web Speech API')}}The list of {{domxref("SpeechSynthesisVoice")}} objects that would be returned by the {{domxref("SpeechSynthesis.getVoices()")}} method has changed (when the {{event("voiceschanged")}} event fires.)
versionchange IndexedDBA versionchange transaction completed.
{{event("visibilitychange")}}{{domxref("Event")}}Page visibilityThe content of a tab has become visible or has been hidden.
{{event("volumechange")}}{{domxref("Event")}}HTML5 mediaThe volume has changed.
{{event("waiting")}}{{domxref("Event")}}HTML5 mediaPlayback has stopped because of a temporary lack of data.
{{event("wheel")}}{{gecko_minversion_inline("17")}}{{domxref("WheelEvent")}}DOM L3A wheel button of a pointing device is rotated in any direction.
- -

Non-standard events

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Event NameEvent TypeSpecificationFired when...
{{event("afterscriptexecute")}}{{domxref("Event")}}Mozilla SpecificA script has been executed.
{{event("beforescriptexecute")}}{{domxref("Event")}}Mozilla SpecificA script is about to be executed.
{{event("beforeinstallprompt")}}{{domxref("Event")}}Chrome specificA user is prompted to save a web site to a home screen on mobile.
{{event("cardstatechange")}} Firefox OS specificThe {{domxref("MozMobileConnection.cardState")}} property changes value.
{{event("change")}}{{domxref("DeviceStorageChangeEvent")}}Firefox OS specificThis event is triggered each time a file is created, modified or deleted on a given storage area.
{{event("connectionInfoUpdate")}} Firefox OS specificThe informations about the signal strength and the link speed have been updated.
{{event("cfstatechange")}} Firefox OS specificThe call forwarding state changes.
{{event("datachange")}} Firefox OS specificThe {{domxref("MozMobileConnection.data")}} object changes values.
{{event("dataerror")}} Firefox OS specificThe {{domxref("MozMobileConnection.data")}} object receive an error from the RIL.
{{event("DOMMouseScroll")}}{{deprecated_inline}} Mozilla specificThe wheel button of a pointing device is rotated (detail attribute is a number of lines). (use {{event("wheel")}} instead)
dragdrop {{deprecated_inline}}DragEventMozilla specificAn element is dropped (use {{event("drop")}} instead).
dragexit {{deprecated_inline}}DragEventMozilla specificA drag operation is being ended(use {{event("dragend")}} instead).
draggesture {{deprecated_inline}}DragEventMozilla specificThe user starts dragging an element or text selection (use {{event("dragstart")}} instead).
{{event("icccardlockerror")}} Firefox OS specificthe {{domxref("MozMobileConnection.unlockCardLock()")}} or {{domxref("MozMobileConnection.setCardLock()")}} methods fails.
{{event("iccinfochange")}} Firefox OS specificThe {{domxref("MozMobileConnection.iccInfo")}} object changes.
{{event("localized")}} Mozilla SpecificThe page has been localized using data-l10n-* attributes.
{{event("mousewheel")}}{{deprecated_inline}} IE inventedThe wheel button of a pointing device is rotated.
{{event("MozAudioAvailable")}}{{domxref("Event")}}Mozilla specificThe audio buffer is full and the corresponding raw samples are available.
MozBeforeResize {{obsolete_inline}} Mozilla specificA window is about to be resized.
{{event("mozbrowseractivitydone")}} Firefox OS Browser API-specificSent when some activity has been completed (complete description TBD.)
{{event("mozbrowserasyncscroll")}} Firefox OS Browser API-specificSent when the scroll position within a browser {{HTMLElement("iframe")}} changes.
{{event("mozbrowseraudioplaybackchange")}} Firefox OS Browser API-specificSent when audio starts or stops playing within the browser {{HTMLElement("iframe")}} content.
{{event("mozbrowsercaretstatechanged")}} Firefox OS Browser API-specificSent when the text selected inside the browser {{HTMLElement("iframe")}} content changes.
{{event("mozbrowserclose")}} Firefox OS Browser API-specificSent when window.close() is called within a browser {{HTMLElement("iframe")}}.
{{event("mozbrowsercontextmenu")}} Firefox OS Browser API-specificSent when a browser {{HTMLElement("iframe")}} try to open a context menu.
{{event("mozbrowserdocumentfirstpaint")}} Firefox OS Browser API-specificSent when a new paint occurs on any document in the browser {{HTMLElement("iframe")}}.
{{event("mozbrowsererror")}} Firefox OS Browser API-specificSent when an error occured while trying to load a content within a browser iframe
{{event("mozbrowserfindchange")}} Firefox OS Browser API-specificSent when a search operation is performed on the browser {{HTMLElement("iframe")}} content (see HTMLIFrameElement search methods.)
{{event("mozbrowserfirstpaint")}} Firefox OS Browser API-specificSent when the {{HTMLElement("iframe")}} paints content for the first time (this doesn't include the initial paint from about:blank.)
{{event("mozbrowsericonchange")}} Firefox OS Browser API-specificSent when the favicon of a browser iframe changes.
{{event("mozbrowserlocationchange")}} Firefox OS Browser API-specificSent when an browser iframe's location changes.
{{event("mozbrowserloadend")}} Firefox OS Browser API-specificSent when the browser iframe has finished loading all its assets.
{{event("mozbrowserloadstart")}} Firefox OS Browser API-specificSent when the browser iframe starts to load a new page.
{{event("mozbrowsermanifestchange")}} Firefox OS Browser API-specificSent when a the path to the app manifest changes, in the case of a browser {{HTMLElement("iframe")}} with an open web app embedded in it.
{{event("mozbrowsermetachange")}} Firefox OS Browser API-specificSent when a {{htmlelement("meta")}} elelment is added to, removed from or changed in the browser {{HTMLElement("iframe")}}'s content.
{{event("mozbrowseropensearch")}} Firefox OS Browser API-specificSent when a link to a search engine is found.
{{event("mozbrowseropentab")}} Firefox OS Browser API-specificSent when a new tab is opened within a browser {{HTMLElement("iframe")}} as a result of the user issuing a command to open a link target in a new tab (for example ctrl/cmd + click.)
{{event("mozbrowseropenwindow")}} Firefox OS Browser API-specificSent when {{domxref("window.open()")}} is called within a browser iframe.
{{event("mozbrowserresize")}} Firefox OS Browser API-specificSent when the browser {{HTMLElement("iframe")}}'s window size has changed.
{{event("mozbrowserscroll")}} Firefox OS Browser API-specificSent when the browser {{HTMLElement("iframe")}} content scrolls.
{{event("mozbrowserscrollareachanged")}} Firefox OS Browser API-specificSent when the available scrolling area  in the browser {{HTMLElement("iframe")}} changes. This can occur on resize and when the page size changes (while loading for example.)
{{event("mozbrowserscrollviewchange")}} Firefox OS Browser API-specificSent when asynchronous scrolling (i.e. APCZ) starts or stops.
{{event("mozbrowsersecuritychange")}} Firefox OS Browser API-specificSent when the SSL state changes within a browser iframe.
{{event("mozbrowserselectionstatechanged")}} Firefox OS Browser API-specificSent when the text selected inside the browser {{HTMLElement("iframe")}} content changes. Note that this is deprecated, and newer implementations use {{event("mozbrowsercaretstatechanged")}} instead.
{{event("mozbrowsershowmodalprompt")}} Firefox OS Browser API-specificSent when {{domxref("window.alert","alert()")}}, {{domxref("window.confirm","confirm()")}} or {{domxref("window.prompt","prompt()")}} are called within a browser iframe
{{event("mozbrowsertitlechange")}} Firefox OS Browser API-specificSent when the document.title changes within a browser iframe.
{{event("mozbrowserusernameandpasswordrequired")}} Firefox OS Browser API-specificSent when an HTTP authentification is requested.
{{event("mozbrowservisibilitychange")}} Firefox OS Browser API-specificSent when the visibility state of the current browser iframe {{HTMLElement("iframe")}} changes, for example due to a call to {{domxref("HTMLIFrameElement.setVisible","setVisible()")}}.
{{event("MozGamepadButtonDown")}} To be specifiedA gamepad button is pressed down.
{{event("MozGamepadButtonUp")}} To be specifiedA gamepad button is released.
{{event("MozMousePixelScroll")}} {{deprecated_inline}} Mozilla specificThe wheel button of a pointing device is rotated (detail attribute is a number of pixels). (use wheel instead)
{{event("MozOrientation")}} {{deprecated_inline}} Mozilla specificFresh data is available from an orientation sensor (see deviceorientation).
{{event("MozScrolledAreaChanged")}}{{domxref("UIEvent")}}Mozilla specificThe document view has been scrolled or resized.
{{event("moztimechange")}} Mozilla specificThe time of the device has been changed.
MozTouchDown {{deprecated_inline}} Mozilla specificA touch point is placed on the touch surface (use touchstart instead).
MozTouchMove {{deprecated_inline}} Mozilla specificA touch point is moved along the touch surface (use touchmove instead).
MozTouchUp {{deprecated_inline}} Mozilla specificA touch point is removed from the touch surface (use touchend instead).
{{event("alerting")}}{{domxref("CallEvent")}}To be specifiedThe correspondent is being alerted (his/her phone is ringing).
{{event("busy")}}{{domxref("CallEvent")}}To be specifiedThe line of the correspondent is busy.
{{event("callschanged")}}{{domxref("CallEvent")}}To be specifiedA call has been added or removed from the list of current calls.
onconnected {{event("connected")}}{{domxref("CallEvent")}}To be specifiedA call has been connected.
{{event("connecting")}}{{domxref("CallEvent")}}To be specifiedA call is about to connect.
{{event("delivered")}}{{domxref("SMSEvent")}}To be specifiedAn SMS has been successfully delivered.
{{event("dialing")}}{{domxref("CallEvent")}}To be specifiedThe number of a correspondent has been dialed.
{{event("disabled")}} Firefox OS specificWifi has been disabled on the device.
{{event("disconnected")}}{{domxref("CallEvent")}}To be specifiedA call has been disconnected.
{{event("disconnecting")}}{{domxref("CallEvent")}}To be specifiedA call is about to disconnect.
{{event("enabled")}} Firefox OS specificWifi has been enabled on the device.
{{event("error_(Telephony)","error")}}{{domxref("CallEvent")}}To be specifiedAn error occurred.
{{event("held")}}{{domxref("CallEvent")}}To be specifiedA call has been held.
{{event("holding")}}{{domxref("CallEvent")}}To be specifiedA call is about to be held.
{{event("incoming")}}{{domxref("CallEvent")}}To be specifiedA call is being received.
{{event("received")}}{{domxref("SMSEvent")}}To be specifiedAn SMS has been received.
{{event("resuming")}}{{domxref("CallEvent")}}To be specifiedA call is about to resume.
{{event("sent")}}{{domxref("SMSEvent")}}To be specifiedAn SMS has been sent.
{{event("statechange")}}{{domxref("CallEvent")}}To be specifiedThe state of a call has changed.
{{event("statuschange")}} Firefox OS specificThe status of the Wifi connection changed.
{{event("overflow")}}{{domxref("UIEvent")}}Mozilla specificAn element has been overflowed by its content or has been rendered for the first time in this state (only works for elements styled with overflow != visible).
{{event("smartcard-insert")}} Mozilla specificA smartcard has been inserted.
{{event("smartcard-remove")}} Mozilla specificA smartcard has been removed.
{{event("stkcommand")}} Firefox OS specificThe STK Proactive Command is issued from ICC.
{{event("stksessionend")}} Firefox OS specificThe STK Session is terminated by ICC.
text Mozilla SpecificA generic composition event occurred.
{{event("underflow")}}{{domxref("UIEvent")}}Mozilla specificAn element is no longer overflowed by its content (only works for elements styled with overflow != visible).
uploadprogress {{deprecated_inline}}{{domxref("ProgressEvent")}}Mozilla SpecificUpload is in progress (see {{event("progress")}}).
-

{{event("ussdreceived")}}

-
 Firefox OS specificA new USSD message is received
{{event("voicechange")}} Firefox OS specificThe {{domxref("MozMobileConnection.voice")}} object changes values.
- -

Mozilla-specific events

- -
-

Note: those events are never exposed to web content and can only be used in chrome content context.

-
- -

XUL events

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Event NameEvent TypeSpecificationFired when...
{{event("broadcast")}} XULAn observer noticed a change to the attributes of a watched broadcaster.
{{event("CheckboxStateChange")}} XULThe state of a checkbox has been changed either by a user action or by a script (useful for accessibility).
close XULThe close button of the window has been clicked.
{{event("command")}} XULAn element has been activated.
{{event("commandupdate")}} XULA command update occurred on a commandset element.
{{event("DOMMenuItemActive")}} XULA menu or menuitem has been hovered or highlighted.
{{event("DOMMenuItemInactive")}} XULA menu or menuitem is no longer hovered or highlighted.
{{event("popuphidden")}}PopupEventXULA menupopup, panel or tooltip has been hidden.
{{event("popuphiding")}}PopupEventXULA menupopup, panel or tooltip is about to be hidden.
{{event("popupshowing")}}PopupEventXULA menupopup, panel or tooltip is about to become visible.
{{event("popupshown")}}PopupEventXULA menupopup, panel or tooltip has become visible.
{{event("RadioStateChange")}} XULThe state of a radio has been changed either by a user action or by a script (useful for accessibility).
{{event("ValueChange")}} XULThe value of an element has changed (a progress bar for example, useful for accessibility).
- -

Add-on-specific events

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Event NameEvent TypeSpecificationFired when...
MozSwipeGesture Addons specificA touch point is swiped across the touch surface
MozMagnifyGestureStart Addons specificTwo touch points start to move away from each other.
MozMagnifyGestureUpdate Addons specificTwo touch points move away from each other (after a MozMagnifyGestureStart).
MozMagnifyGesture Addons specificTwo touch points moved away from each other (after a sequence of MozMagnifyGestureUpdate).
MozRotateGestureStart Addons specificTwo touch points start to rotate around a point.
MozRotateGestureUpdate Addons specificTwo touch points rotate around a point (after a MozRotateGestureStart).
MozRotateGesture Addons specificTwo touch points rotate around a point (after a sequence of MozRotateGestureUpdate).
MozTapGesture Addons specificTwo touch points are tapped on the touch surface.
MozPressTapGesture Addons specificA "press-tap" gesture happened on the touch surface (first finger down, second finger down, second finger up, first finger up).
MozEdgeUIGesture Addons specificA touch point is swiped across the touch surface to invoke the edge UI (Win8 only).
MozAfterPaint Addons specificContent has been repainted.
DOMPopupBlocked Addons specificA popup has been blocked
DOMWindowCreated Addons specificA window has been created.
DOMWindowClose Addons specificA window is about to be closed.
DOMTitleChanged Addons specifcThe title of a window has changed.
DOMLinkAdded Addons specifcA link has been added a document.
DOMLinkRemoved Addons specifcA link has been removed inside from a document.
DOMMetaAdded Addons specificA meta element has been added to a document.
DOMMetaRemoved Addons specificA meta element has been removed from a document.
DOMWillOpenModalDialog Addons specificA modal dialog is about to open.
DOMModalDialogClosed Addons specificA modal dialog has been closed.
DOMAutoComplete Addons specificThe content of an element has been auto-completed.
DOMFrameContentLoaded Addons specificThe frame has finished loading (but not its dependent resources).
AlertActive Addons specificA notification element is shown.
AlertClose Addons specificA notification element is closed.
fullscreen Addons specificBrowser fullscreen mode has been entered or left.
sizemodechange Addons specificWindow has entered/left fullscreen mode, or has been minimized/unminimized.
MozEnteredDomFullscreen Addons specificDOM fullscreen mode has been entered.
SSWindowClosing Addons specificThe session store will stop tracking this window.
SSTabClosing Addons specificThe session store will stop tracking this tab.
SSTabRestoring Addons specificA tab is about to be restored.
SSTabRestored Addons specificA tab has been restored.
SSWindowStateReady Addons specificA window state has switched to "ready".
SSWindowStateBusy Addons specificA window state has switched to "busy".
tabviewsearchenabled Addons specificThe search feature of Panorama has been activated
tabviewsearchdisabled Addons specificThe search feature of Panorama has been deactivated
tabviewframeinitialized Addons specificThe frame container of Panorama has been initialized
tabviewshown Addons specificThe Panorama tab has been shown
tabviewhidden Addons specificThe Panorama tab has been hidden
TabOpen Addons specificA tab has been opened.
TabClose Addons specificA tab has been closed.
TabSelect Addons specificA tab has been selected.
TabShow Addons specificA tab has been shown.
TabHide Addons specificA tab has been hidden.
TabPinned Addons specificA tab has been pinned.
TabUnpinned Addons specificA tab has been unpinned.
- -

Developer tool-specific events

- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Event NameEvent TypeSpecificationFired when...
CssRuleViewRefreshed devtools specificThe "Rules" view of the style inspector has been updated.
CssRuleViewChanged devtools specificThe "Rules" view of the style inspector has been changed.
CssRuleViewCSSLinkClicked devtools specificA link to a CSS file has been clicked in the "Rules" view of the style inspector.
- -

Categories

- -

Animation events

- -

{{event("animationend")}}, {{event("animationiteration")}}, {{event("animationstart")}}, {{event("beginEvent")}}, {{event("endEvent")}}, {{event("repeatEvent")}}

- -

Battery events

- -

{{event("chargingchange")}} {{event("chargingtimechange")}}, {{event("dischargingtimechange")}} {{event("levelchange")}}

- -

Call events

- -

{{event("alerting")}}, {{event("busy")}}, {{event("callschanged")}} {{event("cfstatechange")}}, {{event("connected")}}, {{event("connecting")}}, {{event("dialing")}}, {{event("disconnected")}}, {{event("disconnecting")}}, {{event("error_(Telephony)","error")}}, {{event("held")}}, {{event("holding")}}, {{event("incoming")}}, {{event("resuming")}}, {{event("statechange")}}, {{event("voicechange")}}

- -

CSS events

- -

CssRuleViewRefreshed, CssRuleViewChanged, CssRuleViewCSSLinkClicked, {{event("transitionend")}}

- -

Database events

- -

abort, blocked, complete, {{event("error")}} (link), success, upgradeneeded, versionchange

- -

Document events

- -

DOMLinkAdded, DOMLinkRemoved, DOMMetaAdded, DOMMetaRemoved, DOMWillOpenModalDialog, DOMModalDialogClosed, {{event("unload")}}

- -

DOM mutation events

- -

DOMAttributeNameChanged, DOMAttrModified, DOMCharacterDataModified, {{event("DOMContentLoaded")}}, DOMElementNameChanged, DOMNodeInserted, DOMNodeInsertedIntoDocument, DOMNodeRemoved, DOMNodeRemovedFromDocument, DOMSubtreeModified

- -

Drag events

- -

{{event("drag")}}, dragdrop, {{event("dragend")}}, {{event("dragenter")}}, dragexit, draggesture, {{event("dragleave")}}, {{event("dragover")}}, {{event("dragstart")}}, {{event("drop")}}

- -

Element events

- -

{{event("invalid")}}, {{event("overflow")}}, {{event("underflow")}}, DOMAutoComplete, {{event("command")}}, {{event("commandupdate")}}

- -

Focus events

- -

{{event("blur")}}, {{event("change")}}, DOMFocusIn, DOMFocusOut, {{event("focus")}}, {{event("focusin")}}, {{event("focusout")}}

- -

Form events

- -

{{event("reset")}}, {{event("submit")}}

- -

Frame events

- -

{{event("mozbrowserclose")}}, {{event("mozbrowsercontextmenu")}}, {{event("mozbrowsererror")}}, {{event("mozbrowsericonchange")}}, {{event("mozbrowserlocationchange")}}, {{event("mozbrowserloadend")}}, {{event("mozbrowserloadstart")}}, {{event("mozbrowseropenwindow")}}, {{event("mozbrowsersecuritychange")}}, {{event("mozbrowsershowmodalprompt")}} (link), {{event("mozbrowsertitlechange")}}, DOMFrameContentLoaded

- -

Input device events

- -

{{event("click")}}, {{event("contextmenu")}}, {{event("DOMMouseScroll")}}, {{event("dblclick")}}, {{event("gamepadconnected")}}, {{event("gamepaddisconnected")}}, {{event("keydown")}}, {{event("keypress")}}, {{event("keyup")}}, {{event("MozGamepadButtonDown")}}, {{event("MozGamepadButtonUp")}}, {{event("mousedown")}}, {{event("mouseenter")}}, {{event("mouseleave")}}, {{event("mousemove")}}, {{event("mouseout")}}, {{event("mouseover")}}, {{event("mouseup")}}, {{event("mousewheel")}}, {{event("MozMousePixelScroll")}}, {{event("pointerlockchange")}}, {{event("pointerlockerror")}},{{event("wheel")}}

- -

Media events

- -

{{event("audioprocess")}}, {{event("canplay")}}, {{event("canplaythrough")}}, {{event("durationchange")}}, {{event("emptied")}}, {{event("ended")}}, {{event("ended_(Web_Audio)", "ended")}}, {{event("loadeddata")}}, {{event("loadedmetadata")}}, {{event("MozAudioAvailable")}}, {{event("pause")}}, {{event("play")}}, {{event("playing")}}, {{event("ratechange")}}, {{event("seeked")}}, {{event("seeking")}}, {{event("stalled")}}, {{event("suspend")}}, {{event("timeupdate")}}, {{event("volumechange")}}, {{event("waiting")}}, {{event("complete")}}

- - - -

{{event("DOMMenuItemActive")}}, {{event("DOMMenuItemInactive")}}

- -

Network events

- -

{{event("datachange")}}, {{event("dataerror")}}, {{event("disabled")}}, {{event("enabled")}}, {{event("offline")}}, {{event("online")}}, {{event("statuschange")}}, {{event("connectionInfoUpdate")}},

- -

Notification events

- -

AlertActive, AlertClose

- -

Pointer events

- -

{{event("pointerover")}}, {{event("pointerenter")}}, {{event("pointerdown")}}, {{event("pointermove")}}, {{event("pointerup")}}, {{event("pointercancel")}}, {{event("pointerout")}}, {{event("pointerleave")}}, {{event("gotpointercapture")}}, {{event("lostpointercapture")}}

- - - -

{{event("popuphidden")}}, {{event("popuphiding")}}, {{event("popupshowing")}}, {{event("popupshown")}}, DOMPopupBlocked

- -

Printing events

- -

{{event("afterprint")}}, {{event("beforeprint")}}

- -

Progress events

- -

abort, {{event("error")}}, load, {{event("loadend")}}, {{event("loadstart")}}, {{event("progress")}}, progress, {{event("timeout")}}, uploadprogress

- -

Resource events

- -

{{event("abort")}}, {{event("cached")}}, {{event("error")}}, {{event("load")}}

- -

Script events

- -

{{event("afterscriptexecute")}}, {{event("beforescriptexecute")}}

- -

Sensor events

- -

{{event("compassneedscalibration")}}, {{event("devicelight")}}, {{event("devicemotion")}}, {{event("deviceorientation")}}, {{event("deviceproximity")}}, {{event("MozOrientation")}}, {{event("orientationchange")}}, {{event("userproximity")}}

- -

Session history events

- -

{{event("pagehide")}}, {{event("pageshow")}}, {{event("popstate")}}

- -

Smartcard events

- -

{{event("icccardlockerror")}}, {{event("iccinfochange")}}, {{event("smartcard-insert")}}, {{event("smartcard-remove")}}, {{event("stkcommand")}}, {{event("stksessionend")}}, {{event("cardstatechange")}}

- -

SMS and USSD events

- -

{{event("delivered")}}, {{event("received")}}, {{event("sent")}}, {{event("ussdreceived")}}

- -

Storage events

- -

{{event("change")}} (see {{anch("Non-standard events")}}), {{event("storage")}}

- -

SVG events

- -

{{event("SVGAbort")}}, {{event("SVGError")}}, {{event("SVGLoad")}}, {{event("SVGResize")}}, {{event("SVGScroll")}}, {{event("SVGUnload")}}, {{event("SVGZoom")}}

- -

Tab events

- -

tabviewsearchenabled, tabviewsearchdisabled, tabviewframeinitialized, tabviewshown, tabviewhidden, TabOpen, TabClose, TabSelect, TabShow, TabHide, TabPinned, TabUnpinned, SSTabClosing, SSTabRestoring, SSTabRestored, {{event("visibilitychange")}}

- -

Text events

- -

{{event("compositionend")}}, {{event("compositionstart")}}, {{event("compositionupdate")}}, {{event("copy")}}, {{event("cut")}}, {{event("paste")}}, {{event("select")}}, text

- -

Touch events

- -

MozEdgeUIGesture, MozMagnifyGesture, MozMagnifyGestureStart, MozMagnifyGestureUpdate, MozPressTapGesture, MozRotateGesture, MozRotateGestureStart, MozRotateGestureUpdate, MozSwipeGesture, MozTapGesture, MozTouchDown, MozTouchMove, MozTouchUp, {{event("touchcancel")}}, {{event("touchend")}}, {{event("touchenter")}}, {{event("touchleave")}}, {{event("touchmove")}}, {{event("touchstart")}}

- -

Update events

- -

{{event("checking")}}, {{event("downloading")}}, {{event("error")}}, {{event("noupdate")}}, {{event("obsolete")}}, {{event("updateready")}}

- -

Value change events

- -

{{event("broadcast")}}, {{event("CheckboxStateChange")}}, {{event("hashchange")}}, {{event("input")}}, {{event("RadioStateChange")}}, {{event("readystatechange")}}, {{event("ValueChange")}}

- -

View events

- -

fullscreen, {{event("fullscreenchange")}}, {{event("fullscreenerror")}}, MozEnteredDomFullscreen, {{event("MozScrolledAreaChanged")}}, {{event("resize")}}, {{event("scroll")}}, sizemodechange

- -

Websocket events

- -

close, {{event("error")}}, message, open

- -

Window events

- -

DOMWindowCreated, DOMWindowClose, DOMTitleChanged, MozBeforeResize {{obsolete_inline}}, SSWindowClosing, SSWindowStateReady, SSWindowStateBusy, close

- -

Uncategorized events

- -

{{event("beforeunload")}}, {{event("localized")}}, message, message, message, MozAfterPaint, {{event("moztimechange")}}, open, {{event("show")}}

- -

See also

- - diff --git a/files/uk/web/guide/graphics/index.html b/files/uk/web/guide/graphics/index.html deleted file mode 100644 index 1c2b45e7a9..0000000000 --- a/files/uk/web/guide/graphics/index.html +++ /dev/null @@ -1,50 +0,0 @@ ---- -title: Графіка для Web -slug: Web/Guide/Graphics -tags: - - 2D - - 3D - - Canvas - - HTML5 - - SVG - - WebGL - - WebRTC - - Веб - - Графіка -translation_of: Web/Guide/Graphics -original_slug: Web/Guide/Графіка ---- -

Сучасним сайтам і веб-додаткам потрібне відображення графіки. Статичні зображення легко зобразити використовуючи елемент {{HTMLElement("img")}}, чи налаштувати фон HTML елементів використовуючи властивість {{cssxref("background-image")}}. Ви також можете конструювати графіку на льоту, або модифікувати її після. В статтях далі сказано як це можна зробити.

- -
-
-

2D Графіка

- -
-
Canvas
-
Елемент {{HTMLElement("canvas")}} надає зручні API для малювання 2D графіки використовуючи JavaScript.
-
SVG
-
Scalable Vector Graphics (SVG) дозволяє використовувати лінії, криві, та інші геометричні фігури для рендерингу графіки. З векторів, ви можете створювати зображення які не втрачають якості при маштабуванні.
-
- -

Переглянути все...

-
- -
-

3D Графіка

- -
-
WebGL
-
Посібник для початку роботи з WebGL, API для роботи з 3D графікою в веб. Ця технологія дає вам можливість використовувати стандартний OpenGL ES в Web контенті.
-
- -

Відео

- -
-
Використання HTML5 аудіо і відео
-
Вбудовування відео і/або аудіо в веб-сторінки і керування відтворенням.
-
WebRTC
-
RTC в WebRTC означає Real-Time Communications (комунікація в реальному часі), технологія яка дозволяє передавати потокове аудіо/відео і дані між кліентами браузера (пірами).
-
-
-
diff --git a/files/uk/web/guide/html/content_categories/index.html b/files/uk/web/guide/html/content_categories/index.html deleted file mode 100644 index 4ec3c5ecbc..0000000000 --- a/files/uk/web/guide/html/content_categories/index.html +++ /dev/null @@ -1,168 +0,0 @@ ---- -title: Категорії вмісту -slug: Web/Guide/HTML/Content_categories -tags: - - Веб - - Навчальний - - ПотребуєОновлення - - Просунутий -translation_of: Web/Guide/HTML/Content_categories ---- -

Кожен елемент HTML має дотримуватись правил, що визначають який тип вмісту він може мати. Такі правила згруповано у моделі вмісту, котрі є такими самими по відношенню до кількох елементів. Кожен елемент HTML належить до жодного, одного, або кількох моделей вмісту, кожна з котрих визначає правила, котрих має дотримуватись вміст елемента у документі, написаного за допомогою HTML.

- -

Існує три типи категорій вмісту:

- - - -
-

Примітка: Більш докладне обговорення цих категорій вмісту та їх порівняльних функцій виходить за межі цієї статті; для цього ви можете прочитати відповідні частини специфікації HTML.

-
- -
Content_categories_venn.png
- -

Основні категорії вмісту

- -

Вміст метаданих

- -

Елементи, що належать до категорії вмісту метаданих, змінюють презентацію або поведінку цілого документу, налаштовують посилання на інші документи, або ж передають несуть, незалежну інформацію.

- -

Елементи, що належать до цієї категорії {{HTMLElement("base")}}, {{HTMLElement("command")}}, {{HTMLElement("link")}}, {{HTMLElement("meta")}}, {{HTMLElement("noscript")}}, {{HTMLElement("script")}}, {{HTMLElement("style")}} і {{HTMLElement("title")}}.

- -

Потоковий вміст

- -

До елементів, що належать до потокового вмісту, типовим є текстовий або ж вбудований вміст. Такими елементами є: {{HTMLElement("a")}}, {{HTMLElement("abbr")}}, {{HTMLElement("address")}}, {{HTMLElement("article")}}, {{HTMLElement("aside")}}, {{HTMLElement("audio")}}, {{HTMLElement("b")}},{{HTMLElement("bdo")}}, {{HTMLElement("bdi")}}, {{HTMLElement("blockquote")}}, {{HTMLElement("br")}}, {{HTMLElement("button")}}, {{HTMLElement("canvas")}}, {{HTMLElement("cite")}}, {{HTMLElement("code")}}, {{HTMLElement("command")}}, {{HTMLElement("data")}}, {{HTMLElement("datalist")}}, {{HTMLElement("del")}}, {{HTMLElement("details")}}, {{HTMLElement("dfn")}}, {{HTMLElement("div")}}, {{HTMLElement("dl")}}, {{HTMLElement("em")}}, {{HTMLElement("embed")}}, {{HTMLElement("fieldset")}}, {{HTMLElement("figure")}}, {{HTMLElement("footer")}}, {{HTMLElement("form")}}, {{HTMLElement("h1")}}, {{HTMLElement("h2")}}, {{HTMLElement("h3")}}, {{HTMLElement("h4")}}, {{HTMLElement("h5")}}, {{HTMLElement("h6")}}, {{HTMLElement("header")}}, {{HTMLElement("hgroup")}}, {{HTMLElement("hr")}}, {{HTMLElement("i")}}, {{HTMLElement("iframe")}}, {{HTMLElement("img")}}, {{HTMLElement("input")}}, {{HTMLElement("ins")}}, {{HTMLElement("kbd")}}, {{HTMLElement("keygen")}}, {{HTMLElement("label")}}, {{HTMLElement("main")}}, {{HTMLElement("map")}}, {{HTMLElement("mark")}}, {{MathMLElement("math")}}, {{HTMLElement("menu")}}, {{HTMLElement("meter")}}, {{HTMLElement("nav")}}, {{HTMLElement("noscript")}}, {{HTMLElement("object")}}, {{HTMLElement("ol")}}, {{HTMLElement("output")}}, {{HTMLElement("p")}}, {{HTMLElement("pre")}}, {{HTMLElement("progress")}}, {{HTMLElement("q")}}, {{HTMLElement("ruby")}}, {{HTMLElement("s")}}, {{HTMLElement("samp")}}, {{HTMLElement("script")}}, {{HTMLElement("section")}}, {{HTMLElement("select")}}, {{HTMLElement("small")}}, {{HTMLElement("span")}}, {{HTMLElement("strong")}}, {{HTMLElement("sub")}}, {{HTMLElement("sup")}}, {{SVGElement("svg")}}, {{HTMLElement("table")}}, {{HTMLElement("template")}}, {{HTMLElement("textarea")}}, {{HTMLElement("time")}}, {{HTMLElement("ul")}}, {{HTMLElement("var")}}, {{HTMLElement("video")}}, {{HTMLElement("wbr")}} і текст.

- -

Є іще кілька елементів, що належать до цієї категорії, та лише за певних умов:

- - - -

Секційний вміст

- -

Елементи, що належать до секційної моделі вмісту, створюють секцію в заданому документі, котра визначає межі елементів у {{HTMLElement("header")}}, {{HTMLElement("footer")}} і вмісту заголовків.

- -

Елементами, котрі належать цій категорії є: {{HTMLElement("article")}}, {{HTMLElement("aside")}}, {{HTMLElement("nav")}} та {{HTMLElement("section")}}. 

- -
-

Примітка:  Не сплутайте цю модель вмісту з кореневою секційною категорією, котра ізолює свій вміст від загального обрису документу.

-
- -

Вміст заголовку

- -

Контент заголовку визначає назву секції, котра явно визначена елементом секційного вмісту або ж неявно визначена самим елементом вмісту заголовку.

- -

Елементами, що належать до заданої категорії є: {{HTMLElement("h1")}}, {{HTMLElement("h2")}}, {{HTMLElement("h3")}}, {{HTMLElement("h4")}}, {{HTMLElement("h5")}}, {{HTMLElement("h6")}} та {{HTMLElement("hgroup")}}.

- -
-

Примітка: попри те, що {{HTMLElement("header")}} елемент швидше за все матиме "вміст заголовку", сам він не відноситься до елементів вмісту заголовку.

-
- -

Фразовий вміст

- -

Фразовий вміст визначає текст та розмітку, котру він вміщує. Фразовий вміст формує абзаци.

- -

Елементами, що належать до цієї категорії є {{HTMLElement("abbr")}}, {{HTMLElement("audio")}}, {{HTMLElement("b")}}, {{HTMLElement("bdo")}}, {{HTMLElement("br")}}, {{HTMLElement("button")}}, {{HTMLElement("canvas")}}, {{HTMLElement("cite")}}, {{HTMLElement("code")}}, {{HTMLElement("command")}}, {{HTMLElement("datalist")}}, {{HTMLElement("dfn")}}, {{HTMLElement("em")}}, {{HTMLElement("embed")}}, {{HTMLElement("i")}}, {{HTMLElement("iframe")}}, {{HTMLElement("img")}}, {{HTMLElement("input")}}, {{HTMLElement("kbd")}}, {{HTMLElement("keygen")}}, {{HTMLElement("label")}}, {{HTMLElement("mark")}}, {{MathMLElement("math")}}, {{HTMLElement("meter")}}, {{HTMLElement("noscript")}}, {{HTMLElement("object")}}, {{HTMLElement("output")}}, {{HTMLElement("progress")}}, {{HTMLElement("q")}}, {{HTMLElement("ruby")}}, {{HTMLElement("samp")}}, {{HTMLElement("script")}}, {{HTMLElement("select")}}, {{HTMLElement("small")}}, {{HTMLElement("span")}}, {{HTMLElement("strong")}}, {{HTMLElement("sub")}}, {{HTMLElement("sup")}}, {{SVGElement("svg")}}, {{HTMLElement("textarea")}}, {{HTMLElement("time")}}, {{HTMLElement("var")}}, {{HTMLElement("video")}}, {{HTMLElement("wbr")}} також чистий текст (в тому числі котрий складається з пробілів).

- -

Іще кілька елементів, що належать до цієї категорії, та лише за певних умов:

- - - -

Вбудований вміст

- -

Вбудований вміст імпортує інші ресурси, або ж вставляє вміст з інших мов розмітки або простору імен у документ. Елементи, що належать до цієї категорії включають: {{HTMLElement("audio")}}, {{HTMLElement("canvas")}}, {{HTMLElement("embed")}}, {{HTMLElement("iframe")}}, {{HTMLElement("img")}}, {{MathMLElement("math")}}, {{HTMLElement("object")}}, {{SVGElement("svg")}}, {{HTMLElement("video")}}.

- -

Інтерактивний вміст

- -

Інтерактивний вміст включає елементи, котрі спроектовано виключно для взаємодії з користувачем. Елементи, котрі належать до цієї категорії: {{HTMLElement("a")}}, {{HTMLElement("button")}}, {{HTMLElement("details")}}, {{HTMLElement("embed")}}, {{HTMLElement("iframe")}}, {{HTMLElement("keygen")}}, {{HTMLElement("label")}}, {{HTMLElement("select")}}, and {{HTMLElement("textarea")}}.

- -

Декотрі елементи належать до цієї категорії лише за певних обставин:

- - - -

Видимий вміст

- -

Вміст є видимим коли він не пустий і не прихований. Елементи чиєю моделлю є потоковий міст або фразовий вміст, повинні мати принаймні один вузол видимого вмісту.

- -

Вміст форм

- -

Вміст форм вміщує елементи, котрі мають власника форми, визначеного атрибутом form. Власником форми є елемент {{HTMLElement("form")}}, або ж елемент, чий ідентифікатор (id), вказано у атрибуті form.

- - - -

  Ця категорія містить кілька підкатегорій:

- -
-
listed
-
Елементи, перелічені в form.elements та fieldset.elements IDL колекціях. Містять {{HTMLElement("button")}}, {{HTMLElement("fieldset")}}, {{HTMLElement("input")}}, {{HTMLElement("keygen")}}, {{HTMLElement("object")}}, {{HTMLElement("output")}}, {{HTMLElement("select")}}, та {{HTMLElement("textarea")}}.
-
labelable
-
Елементи, що можна пов'язати з {{HTMLElement("label")}} елементами. Містять {{HTMLElement("button")}}, {{HTMLElement("input")}}, {{HTMLElement("keygen")}}, {{HTMLElement("meter")}}, {{HTMLElement("output")}}, {{HTMLElement("progress")}}, {{HTMLElement("select")}}, та {{HTMLElement("textarea")}}.
-
submittable
-
Елементи, які можуть бути використані для побудови набору даних форми, коли відправляється форма. Містять {{HTMLElement("button")}}, {{HTMLElement("input")}}, {{HTMLElement("keygen")}}, {{HTMLElement("object")}}, {{HTMLElement("select")}}, та {{HTMLElement("textarea")}}.
-
resettable
-
Елементи, які можуть бути скинуті при зміні форми. Містять {{HTMLElement("input")}}, {{HTMLElement("keygen")}}, {{HTMLElement("output")}},{{HTMLElement("select")}}, та {{HTMLElement("textarea")}}.
-
- -

Додаткові категорії

- -

Є деякі вторинні класифікації елементів, які можуть бути корисними та про які вам треба знати.

- -

Елементи підтримки скрипту

- -

Елементи підтримки скрипту є елементами, які безпосередньо не беруть участі у виводі документа. Замість цього вони виконують роль підтримки скриптів, або безпосередньо містять код, або вказувають на нього, або шляхом визначення даних, які будуть використовуватися скриптом.

- -

Елементами підтримки скрипту є:

- -

{{HTMLElement("script")}} {{HTMLElement("template")}}

- -

Прозора модель вмісту

- -

Якщо елемент має прозору модель вмісту, його вміст має бути структурований таким чином, щоб він був дійсним HTML5 кодом, навіть якщо прозорий елемент було вилучено і замінено дочірними елементами.

- -

Наприклад, {{HTMLElement("del")}} і {{HTMLELement("ins")}} елементи є прозорими:

- -
<p>We hold these truths to be <del><em>sacred &amp; undeniable</em></del> <ins>self-evident</ins>.</p>
-
- -

Навіть якщо ці елементи було вилучено, цей фрагмент як і раніше буде дійсним HTML.

- -
<p>We hold these truths to be <em>sacred &amp; undeniable</em> self-evident.</p>
-
- -

Інші моделі вмісту

- -

Секціонування кореню.

diff --git a/files/uk/web/guide/html/html5/index.html b/files/uk/web/guide/html/html5/index.html deleted file mode 100644 index 8ae6ab8dcf..0000000000 --- a/files/uk/web/guide/html/html5/index.html +++ /dev/null @@ -1,164 +0,0 @@ ---- -title: HTML5 -slug: Web/Guide/HTML/HTML5 -translation_of: Web/Guide/HTML/HTML5 ---- -

HTML5 є найновішим стандартом,що описує HTML. Цей термін представляє дві різні концепції:

- - - -

Спроектована, для використання всіма розробниками Відкритого Вебу (Open Web), ця сторінка надає посилання до численних ресурсів про HTML5 технологї, розсортованні в декілька груп, в залежності від їх функцій.

- - - -
-
-

сЕМАНТиКА

- -
-
Sections and outlines in HTML5
-
Огляд нових елементів HTML5 для структуризації контенту: {{HTMLElement("section")}}, {{HTMLElement("article")}}, {{HTMLElement("nav")}}, {{HTMLElement("header")}}, {{HTMLElement("footer")}} and {{HTMLElement("aside")}}.
-
Використання відео та аудіо в HTML5
-
Елементи {{HTMLElement("audio")}} та {{HTMLElement("video")}}  вбудовують та дозволяють керування новим мультимедійним контентом.
-
Форми в HTML5
-
Огляд вдосконалень для веб-форм в HTML5: перевірка обмежень API, декілька нових атрибутів, нові значення для атрибуту {{HTMLElement("input")}}  {{htmlattrxref("type", "input")}} а також новий елемент {{HTMLElement("output")}} .
-
Нові семантичні елементи
-
Поруч із розділами, носіями(медіа) та елементами форм, в HTML5 є численні нові елементи: {{HTMLElement("mark")}}, {{HTMLElement("figure")}}, {{HTMLElement("figcaption")}}, {{HTMLElement("data")}}, {{HTMLElement("time")}}, {{HTMLElement("output")}}, {{HTMLElement("progress")}}, або {{HTMLElement("meter")}} та {{HTMLElement("main")}}, що збільшують кількість чинних елементів HTML5.
-
Вдосконалення в {{HTMLElement("iframe")}}
-
Використовуючи атрибути {{htmlattrxref("sandbox", "iframe")}}, {{htmlattrxref("seamless", "iframe")}}, та {{htmlattrxref("srcdoc", "iframe")}}, автори зараз можуть бути певними щодо рівня безпеки та бажаної візуалізації елементу {{HTMLElement("iframe")}}.
-
MathML
-
Дозволяє безпосередньо вставлені математичні формули.
-
Знайомство з HTML5
-
У цьому розділі показано, як вказати браузеру, що ви використовуєте HTML5 у своєму веб-дизайні чи веб-програмі.
-
HTML5-сумісний парсер
-
The parser, which turns the bytes of an HTML document into a DOM, has been extended and now precisely defines the behavior to use in all cases, even when faced with invalid HTML. This leads to far greater predictability and interoperability between HTML5-compliant browsers.
-
- -

Зв'язок

- -
-
Web Sockets
-
Allows creating a permanent connection between the page and the server and to exchange non-HTML data through that means.
-
Server-sent events
-
Allows a server to push events to a client, rather than the classical paradigm where the server could send data only in response to a client's request.
-
WebRTC
-
This technology, where RTC stands for Real-Time Communication, allows connecting to other people and controlling videoconferencing directly in the browser, without the need for a plugin or an external application.
-
- -

Оффлайн та сховище

- -
-
Offline resources: The application cache
-
Firefox fully supports the HTML5 offline resource specification. Most others have offline resource support at some level.
-
Online and offline events
-
Firefox 3 supports WHATWG online and offline events, which let applications and extensions detect whether or not there's an active Internet connection, as well as to detect when the connection goes up and down.
-
WHATWG client-side session and persistent storage (aka DOM storage)
-
Client-side session and persistent storage allows web applications to store structured data on the client side.
-
IndexedDB
-
IndexedDB is a web standard for the storage of significant amounts of structured data in the browser and for high performance searches on this data using indexes.
-
Using files from web applications
-
Support for the new HTML5 File API has been added to Gecko, making it possible for web applications to access local files selected by the user. This includes support for selecting multiple files using the {{HTMLElement("input")}} of type file HTML element's new multiple attribute. There also is FileReader.
-
- -

Мультимедіа

- -
-
Using HTML5 audio and video
-
The {{HTMLElement("audio")}} and {{HTMLElement("video")}} elements embed and allow the manipulation of new multimedia content.
-
WebRTC
-
This technology, where RTC stands for Real-Time Communication, allows connecting to other people and controlling videoconferencing directly in the browser, without the need for a plugin or an external application.
-
Using the Camera API
-
Allows using, manipulating, and storing an image from the computer's camera.
-
Track and WebVTT
-
The {{HTMLElement("track")}} element allows subtitles and chapters. WebVTT is a text track format.
-
- -

3D Графіка та ефекти 

- -
-
Canvas tutorial
-
Learn about the new {{HTMLElement("canvas")}} element and how to draw graphs and other objects in Firefox.
-
HTML5 Text API for <canvas> elements
-
The HTML5 text API is now supported by {{HTMLElement("canvas")}} elements.
-
WebGL
-
WebGL brings 3D graphics to the Web by introducing an API that closely conforms to OpenGL ES 2.0 that can be used in HTML5 {{HTMLElement("canvas")}} elements.
-
SVG
-
An XML-based format of vectorial images that can directly be embedded in the HTML.
-
-
- -
-

Ефективність та Інтеграція

- -
-
Web Workers
-
Allows delegation of JavaScript evaluation to background threads, allowing these activities to prevent slowing down interactive events.
-
XMLHttpRequest level 2
-
Allows fetching asynchronously some parts of the page, allowing it to display dynamic content, varying according to the time and user actions. This is the technology behind Ajax.
-
JIT-compiling JavaScript engines
-
The new generation of JavaScript engines is much more powerful, leading to greater performance.
-
History API
-
Allows the manipulation of the browser history. This is especially useful for pages loading interactively new information.
-
The contentEditable Attribute: Transform your website to a wiki!
-
HTML5 has standardized the contentEditable attribute. Learn more about this feature.
-
Drag and drop
-
The HTML5 drag and drop API allows support for dragging and dropping items within and between web sites. This also provides a simpler API for use by extensions and Mozilla-based applications.
-
Focus management in HTML
-
The new HTML5 activeElement and hasFocus attributes are supported.
-
Web-based protocol handlers
-
You can now register web applications as protocol handlers using the navigator.registerProtocolHandler() method.
-
requestAnimationFrame
-
Allows control of animations rendering to obtain optimal performance.
-
Fullscreen API
-
Controls the usage of the whole screen for a Web page or application, without the browser UI displayed.
-
Pointer Lock API
-
Allows locking the pointer to the content, so games and similar applications don't lose focus when the pointer reaches the window limit.
-
Online and offline events
-
In order to build a good offline-capable web application, you need to know when your application is actually offline. Incidentally, you also need to know when your application has returned to an online status again.
-
- -

Доступ до пристрою

- -
-
Using the Camera API
-
Allows using, manipulating, and storing an image from the computer's camera.
-
Touch events
-
Handlers to react to events created by a user pressing touch screens.
-
Using geolocation
-
Let browsers locate the position of the user using geolocation.
-
Detecting device orientation
-
Get the information when the device on which the browser runs changes orientation. This can be used as an input device (e.g., to make games that react to the position of the device) or to adapt the layout of a page to the orientation of the screen (portrait or landscape).
-
Pointer Lock API
-
Allows locking the pointer to the content, so games and similar application don't lose focus when the pointer reaches the window limit.
-
- -

Стилі

- -

CSS has been extended to be able to style elements in a much more complex way. This is often referred as CSS3, though CSS is not a monolithic specification any more and the different modules are not all at level 3: some are at level 1 and others at level 4, with all the intermediate levels covered.

- -
-
New background styling features
-
It is now possible to put a shadow to a box, using {{cssxref("box-shadow")}} and multiple backgrounds can be set.
-
More fancy borders
-
Not only it is now possible to use images to style borders, using {{cssxref("border-image")}} and its associated longhand properties, but rounded borders are supported via the {{cssxref("border-radius")}} property.
-
Animating your style
-
Using CSS Transitions to animate between different states or using CSS Animations to animate parts of the page without a triggering event, you can now control mobile elements on your page.
-
Typography improvement
-
Authors have better control to reach better typography. They can control {{cssxref("text-overflow")}} and hyphenation, but also can add a shadow to it or control more precisely its decorations. Custom typefaces can be downloaded and applied thanks to the new {{cssxref("@font-face")}} at-rule.
-
New presentational layouts
-
In order to improve the flexibility of designs, two new layouts have been added: the CSS multi-column layouts and CSS flexible box layout.
-
-
-
diff --git a/files/uk/web/guide/html/using_html_sections_and_outlines/index.html b/files/uk/web/guide/html/using_html_sections_and_outlines/index.html deleted file mode 100644 index 756fb825b1..0000000000 --- a/files/uk/web/guide/html/using_html_sections_and_outlines/index.html +++ /dev/null @@ -1,338 +0,0 @@ ---- -title: Використання HTML-секцій та структура документу -slug: Web/Guide/HTML/Using_HTML_sections_and_outlines -translation_of: Web/Guide/HTML/Using_HTML_sections_and_outlines -original_slug: Web/Guide/HTML/Використання_HTML-секцій_та_структура_документу ---- -
-

 В перекладі наводяться терміни схема документу та алгоритм схематизації у відповідності до англійських outline та outline algorithm, оскільки на думку перекладача найбільш точно відповідають змісту, вкладеному в поняття на мові оригінлу.

- -

Також у відповідності до section та subsection використано розділ та підрозділ, так як в змісті даного документу йдеться більше про великі веб-сторінки, порівнювані із книжками.

-
- -
-

Зверніть увагу: На даний момент немає відомих реалізацій алгоритму побудови схеми документа в браузерах чи інших агентах користувачів (assistive technology user agents), проте алгоритм реалізований в  ішому програмному забезпеченні, наприклад, в засобах перевірки стандартів (conformance checkers). Therefore the outline algorithm cannot be relied upon to convey document structure to users. Автори рекомендують використовувати ранг заголовку (h1-h6) для опису структури документу.

-
- -

Специфікація HTML 5 вводить ряд нових елементів, що дозволяють веб-розробникам краще описувати структуру веб-документу використовуючи стандартну семантику. Даний документ описує ці елементи та способи їх використання для створення бажаної схеми документу.

- -

Структура документу в HTML 4

- -

Структура документу, тобто семантична структура, що знаходиться між <body> і </body>, — основа представлення сторінки. В HTML4 для опису структури документу використовується форма запису із розділів та підрозділів. Розділ визначається за допомогою елемента ({{HTMLElement("div")}}), в який включаються елементи заголовків ({{HTMLElement("h1")}}, {{HTMLElement("h2")}}, {{HTMLElement("h3")}}, {{HTMLElement("h4")}}, {{HTMLElement("h5")}}, або {{HTMLElement("h6")}}), які, власне, і слугують заголовками секцій чи підсекцій. Взаєморозміщення даних елементів утворює структуру документу та будує його схему.

- -

Таким чином наступна розмітка:

- -
-
<div class="section" id="forest-elephants" >
-  <h1>Forest elephants</h1>
-  <p>In this section, we discuss the lesser known forest elephants.
-    ...this section continues...
-  <div class="subsection" id="forest-habitat" >
-    <h2>Habitat</h2>
-    <p>Forest elephants do not live in trees but among them.
-     ...this subsection continues...
-  </div>
-</div>
-
-
- -

зводиться до наступної схеми:

- -
1. Forest elephants
-   1.1 Habitat
-
- -

Елемент {{HTMLElement("div")}} не оголошує нову секцію. Для цього достатньо наявності тегу заголовка. Таким чином фрамент:

- -
<h1>Forest elephants</h1>
-  <p>In this section, we discuss the lesser known forest elephants.
-    ...this section continues...
-  <h2>Habitat</h2>
-  <p>Forest elephants do not live in trees but among them.
-    ...this subsection continues...
-  <h2>Diet</h2>
-<h1>Mongolian gerbils</h1>
-
- -

зумовлює наступну схему:

- -
1. Forest elephants
-   1.1 Habitat
-   1.2 Diet
-2. Mongolian gerbils
-
- -

Проблеми, розв'зані за допомогою HTML5

- -

Спосіб визначення структури документу в HTML 4 та обробка її алгоритмом схематизації є досить складнм та зумовлює наступні проблеми:

- -
    -
  1. Використання елементу {{HTMLElement("div")}}  для оголошення секцій (розділів) без використання спеціальних класів (значень атрибуту class) робить неможливим застосування алгоритму схематизації ("Цей {{HTMLElement("div")}} — частина схеми сторінки, що визначає секцію чи підсекцію?" Чи "це звичайний {{HTMLElement("div")}}-елемент, використаний для стилізації?"). Іншими словами, специфікація HTML 4 дуже неточно визначає межі початку та закінчення розділів. Автоматична генерація схеми документу досить важлива, зокрема для реабілітаційних технологій, які адаптують та доносять інформацію до людей (від перекл.: як правило, з обмеженими можливостями) базуючись на структурі документу. HTML 5 усуває труднощі обробки елементу {{HTMLElement("div")}} алгоритмом схематизації, оскільки вводить новий елемент для розділів, {{HTMLElement("section")}}, HTML Section Element.
  2. -
  3. Merging several documents is hard: inclusion of a sub-document in a main document means changing the level of the HTML Headings Element so that the outline is kept. This is solved in HTML5 as the newly introduced sectioning elements ({{HTMLElement("article")}}, {{HTMLElement("section")}}, {{HTMLElement("nav")}} and {{HTMLElement("aside")}}) are always subsections of their nearest ancestor section, regardless of what sections are created by internal headings.
  4. -
  5. In HTML4, every section is part of the document outline. But documents are often not that linear. A document can have special sections containing information that is not part of, though it is related to, the main flow, like an advertisement block or an explanation box. HTML5 introduces the {{HTMLElement("aside")}} element allowing such sections to not be part of the main outline.
  6. -
  7. Again, in HTML4, because every section is part of the document outline, there is no way to have sections containing information related not to the document but to the whole site, like logos, menus, table of contents, or copyright information and legal notices. For that purpose, HTML5 introduces three new elements: {{HTMLElement("nav")}} for collections of links, such as a table of contents, {{HTMLElement("footer")}} and {{HTMLElement("header")}} for site-related information. Note that {{HTMLElement("header")}} and {{HTMLElement("footer")}} are not sectioning content like {{HTMLElement("section")}}, rather, they exist to semantically mark up parts of a section.
  8. -
- -

More generally, HTML5 brings precision to the sectioning and heading features, allowing document outlines to be predictable and used by the browser to improve the user experience.

- -

Алгоритм схематизації HTML 5

- -

Let's consider the algorithms  underlying the way HTML handles sections and outlines.

- -

Defining sections

- -

All content lying inside the {{HTMLElement("body")}} element is part of a section. Sections in HTML5 can be nested. Beside the main section, defined by the {{HTMLElement("body")}} element, section limits are defined either explicitly or implicitly. Explicitly-defined sections are the content within {{HTMLElement("body")}},  {{HTMLElement("section")}},  {{HTMLElement("article")}},  {{HTMLElement("aside")}}, and {{HTMLElement("nav")}} tags. 

- -
Each section can have its own heading hierarchy. Therefore, even a nested section can have an {{HTMLElement("h1")}}. See {{anch("Defining headings")}}
- -

Let's look at an example — here we have a document with a top level section and a footer defined. Inside the top level section we have three subsections, defined by two {{htmlelement("section")}} elements and an {{htmlelement("aside")}} element:

- -
<section>
-
-  <h1>Forest elephants</h1>
-
-  <section>
-    <h1>Introduction</h1>
-    <p>In this section, we discuss the lesser known forest elephants.</p>
-  </section>
-
-  <section>
-    <h1>Habitat</h1>
-    <p>Forest elephants do not live in trees but among them.</p>
-  </section>
-
-  <aside>
-    <p>advertising block</p>
-  </aside>
-
-</section>
-
-<footer>
-  <p>(c) 2010 The Example company</p>
-</footer>
- -

This leads to the following outline:

- -
1. Forest elephants
-   1.1 Introduction
-   1.2 Habitat
-
- -

Defining headings

- -

While the HTML Sectioning elements define the structure of the document, an outline also needs headings to be useful. The basic rule is simple: the first HTML heading element (one of {{HTMLElement("h1")}}, {{HTMLElement("h2")}}, {{HTMLElement("h3")}}, {{HTMLElement("h4")}}, {{HTMLElement("h5")}}, {{HTMLElement("h6")}}) defines the heading of the current section.

- -

The heading elements have a rank given by the number in the element name, where {{HTMLElement("h1")}} has the highest rank, and {{HTMLElement("h6")}} has the lowest rank. Relative ranking matters only within a section; the structure of the sections determines the outline, not the heading rank of the sections. For example, consider this code:

- -
<section>
-  <h1>Forest elephants</h1>
-  <p>In this section, we discuss the lesser known forest elephants.
-    ...this section continues...
-  <section>
-    <h2>Habitat</h2>
-    <p>Forest elephants do not live in trees but among them.
-        ...this subsection continues...
-  </section>
-</section>
-<section>
-  <h3>Mongolian gerbils</h3>
-  <p>In this section, we discuss the famous mongolian gerbils.
-     ...this section continues...
-</section>
- -

This creates the following outline:

- -
1. Forest elephants
-   1.1 Habitat
-2. Mongolian gerbils
- -

Note that the rank of the heading element (in the example {{HTMLElement("h1")}} for the first top-level section, {{HTMLElement("h2")}} for the subsection and {{HTMLElement("h3")}} for the second top-level section) is not important. (Any rank can be used as the heading of an explicitly-defined section, although this practice is not recommended.)

- -

Implicit sectioning

- -

Because the HTML5 Sectioning Elements aren't mandatory to define an outline, to keep compatibility with the existing web dominated by HTML4, there is a way to define sections without them. This is called implicit sectioning.

- -

The heading elements ({{HTMLElement("h1")}} to {{HTMLElement("h6")}}) define a new, implicit, section when they aren't the first heading of their parent, explicit, sections. The way this implicit section is positioned in the outline is defined by its relative rank with the previous heading in their parent section. If it is of a lower rank than the previous heading, it opens an implicit sub-section of the section. This code:

- -
<section>
-  <h1>Forest elephants</h1>
-  <p>In this section, we discuss the lesser known forest elephants.
-    ...this section continues...
-  <h3 class="implicit subsection">Habitat</h3>
-  <p>Forest elephants do not live in trees but among them.
-    ...this subsection continues...
-</section>
- -

leading to the following outline:

- -
1. Forest elephants
-   1.1 Habitat (implicitly defined by the h3 element)
-
- -

If it is of the same rank as the previous heading, it closes the previous section (which may have been explicit!) and opens a new implicit one at the same level: 

- -
<section>
-  <h1>Forest elephants</h1>
-  <p>In this section, we discuss the lesser known forest elephants.
-    ...this section continues...
-  <h1 class="implicit section">Mongolian gerbils</h1>
-  <p>Mongolian gerbils are cute little mammals.
-    ...this section continues...
-</section>
- -

leading to the following outline: 

- -
1. Forest elephants
-2. Mongolian gerbils (implicitly defined by the h1 element, which closed the previous section at the same time)
-
- -

If it is of a higher rank than the previous heading, it closes the previous section and opens a new implicit one at the higher level:

- -
<body>
-  <h1>Mammals</h1>
-  <h2>Whales</h2>
-  <p>In this section, we discuss the swimming whales.
-    ...this section continues...
-  <section>
-    <h3>Forest elephants</h3>
-    <p>In this section, we discuss the lesser known forest elephants.
-      ...this section continues...
-    <h3>Mongolian gerbils</h3>
-      <p>Hordes of gerbils have spread their range far beyond Mongolia.
-         ...this subsection continues...
-    <h2>Reptiles</h2>
-      <p>Reptiles are animals with cold blood.
-          ...this section continues...
-  </section>
-</body>
- -

leading to the following outline:

- -
1. Mammals
-   1.1 Whales (implicitly defined by the h2 element)
-   1.2 Forest elephants (explicitly defined by the section element)
-   1.3 Mongolian gerbils (implicitly defined by the h3 element, which closes the previous section at the same time)
-2. Reptiles (implicitly defined by the h2 element, which closes the previous section at the same time)
-
- -

This is not the outline that one might expect by quickly glancing at the heading tags. To make your markup human-understandable, it is a good practice to use explicit tags for opening and closing sections, and to match the heading rank to the intended section nesting level. However, this is not required by the HTML5 specification. If you find that browsers are rendering your document outline in unexpected ways, check whether you have sections that are implicitly closed by heading elements.

- -

An exception to the rule of thumb that heading rank should match the section nesting level is for sections that may be reused in multiple documents. For example, a section might be stored in a content-management system and assembled into documents at run time. In this case, a good practice is to start at {{HTMLElement("h1")}} for the top heading level of the reusable section. The nesting level of the reusable section will be determined by the section hierarchy of the document in which it appears. Explicit section tags are still helpful in this case.

- -

Sectioning roots

- -

 A sectioning root is an HTML element that can have its own outline, but the sections and headings inside it does not contribute to the outline of its ancestor. Beside {{HTMLElement("body")}} which is the logical sectioning root of a document, these are often elements that introduce external content to the page: {{HTMLElement("blockquote")}}, {{HTMLElement("details")}}, {{HTMLElement("fieldset")}}, {{HTMLElement("figure")}} and {{HTMLElement("td")}}.

- -

Example:

- -
<section>
-  <h1>Forest elephants</h1>
-  <section>
-    <h2>Introduction</h2>
-    <p>In this section, we discuss the lesser known forest elephants</p>
-  </section>
-  <section>
-    <h2>Habitat</h2>
-    <p>Forest elephants do not live in trees but among them. Let's
-       look what scientists are saying in "<cite>The Forest Elephant in Borneo</cite>":</p>
-    <blockquote>
-       <h1>Borneo</h1>
-       <p>The forest element lives in Borneo...</p>
-    </blockquote>
-  </section>
-</section>
-
- -

This example results in the following outline:

- -
1. Forest elephants
-   1.1 Introduction
-   1.2 Habitat
- -

This outline doesn't contain the internal outline of the {{HTMLElement("blockquote")}} element, which, being an external citation, is a sectioning root and isolates its internal outline.

- -

Sections outside the outline

- -

 HTML5 introduces two new elements that allow defining sections that don't belong to the main outline of a web document:

- -
    -
  1. The HTML Aside Section Element ({{HTMLElement("aside")}}) defines a section that, though related to the main element, doesn't belong to the main flow, like an explanation box or an advertisement. It has its own outline, but doesn't belong to the main one.
  2. -
  3. The HTML Navigational Section Element ({{HTMLElement("nav")}}) defines a section that contains navigation links. There can be several of them in a document, for example one with page internal links like a table of contents, and another with site navigational links. These links are not part of the main document flow and outline, and are generally not initially rendered by screen readers and similar assistive technologies.
  4. -
- -

Headers and Footers

- -

HTML5 also introduces two new elements that can be used to mark up the header and the footer of a section:

- -
    -
  1. The HTML Header Element ({{HTMLElement("header")}}) defines a page header — typically containing the logo and name of the site and possibly a horizontal menu — or section header, containing perhaps the section's heading, author name, etc. {{HTMLElement("article")}}, {{HTMLElement("section")}}, {{HTMLElement("aside")}}, and {{HTMLElement("nav")}} can have their own {{HTMLElement("header")}}. Despite its name, it is not necessarily positioned at the beginning of the page or section.
  2. -
  3. The HTML Footer Element ({{HTMLElement("footer")}}) defines a page footer — typically containing the copyright and legal notices and sometimes some links — or section footer, containing perhaps the section's publication date, license information, etc. {{HTMLElement("article")}}, {{HTMLElement("section")}}, {{HTMLElement("aside")}}, and {{HTMLElement("nav")}} can have their own {{HTMLElement("footer")}}. Despite its name, it is not necessarily positioned at the end of the page or section.
  4. -
- -

These do not create new sections in the outline, rather, they mark up content inside sections of the page.

- -

Addresses in sectioning elements

- -

The author of a document often wants to publish some contact information, such as the author's name and address. HTML4 allowed this via the {{HTMLElement("address")}} element, which has been extended in HTML5.

- -

A document can be made of different sections from different authors. A section from another author than the one of the main page is defined using the {{HTMLElement("article")}} element. Consequently, the {{HTMLElement("address")}} element is now linked to its nearest {{HTMLElement("body")}} or {{HTMLElement("article")}} ancestor.

- -

Using HTML5 elements in non-HTML5 browsers

- -

Sections and headings elements should work in most non-HTML5 browsers. Though unsupported, they don't need a special DOM interface and they only need a specific CSS styling as unknown elements are styled as display:inline by default:

- -
section, article, aside, footer, header, nav, hgroup {
-  display:block;
-}
-
- -

Of course the web developer can style them differently, but keep in mind that in a non-HTML5 browser, the default styling is different from what is expected for such elements. Also note that the {{HTMLElement("time")}} element has not been included, because the default styling for it in a non-HTML5 browser is the same as the one in an HTML5-compatible one.

- -

This method has its limitation though, as some browsers do not allow styling of unsupported elements. That is the case of the Internet Explorer (version 8 and earlier), which need a specific script to allow this:

- -
<!--[if lt IE 9]>
-  <script>
-    document.createElement("header" );
-    document.createElement("footer" );
-    document.createElement("section");
-    document.createElement("aside"  );
-    document.createElement("nav"    );
-    document.createElement("article");
-    document.createElement("hgroup" );
-    document.createElement("time"   );
-  </script>
-<![endif]-->
- -

This script means that, in the case of Internet Explorer (8 and earlier), scripting should be enabled in order to display HTML5 sectioning and headings elements properly. If not, they won't be displayed, which may be problematic as these elements are likely defining the structure of the whole page. That's why an explicit {{HTMLElement("noscript")}} element should be added for this case:

- -
<noscript>
-   <strong>Warning !</strong>
-   Because your browser does not support HTML5, some elements are simulated using JScript.
-   Unfortunately your browser has disabled scripting. Please enable it in order to display this page.
-</noscript>
- -

This leads to the following code to allow the support of the HTML5 sections and headings elements in non-HTML5 browsers, even for Internet Explorer (8 and older), with a proper fallback for the case where this latter browser is configured not to use scripting:

- -
<!--[if lt IE 9]>
-  <script>
-    document.createElement("header" );
-    document.createElement("footer" );
-    document.createElement("section");
-    document.createElement("aside"  );
-    document.createElement("nav"    );
-    document.createElement("article");
-    document.createElement("hgroup" );
-    document.createElement("time"   );
-  </script>
-  <noscript>
-     <strong>Warning !</strong>
-     Because your browser does not support HTML5, some elements are created using JavaScript.
-     Unfortunately your browser has disabled scripting. Please enable it in order to display this page.
-  </noscript>
-<![endif]-->
- -

Підсумок

- -

Нові семантичні елементи, що були введені стандартом HTML5 забезпечили можливість описувати структуру документу єдиним стандартеризованим способом. They bring a big advantage for people having HTML5 browsers and needing the structure to help them understand the page, for instance people needing the help of some assistive technology. These new semantic elements are simple to use and, with very few burdens, can be made to work also in non-HTML5 browsers. Therefore they should be used without restrictions.

- -
{{HTML5ArticleTOC()}}
diff --git a/files/uk/web/guide/index.html b/files/uk/web/guide/index.html deleted file mode 100644 index c11dfa4089..0000000000 --- a/files/uk/web/guide/index.html +++ /dev/null @@ -1,66 +0,0 @@ ---- -title: Довідник веб-розробника -slug: Web/Guide -tags: - - Guide - - Landing - - TopicStub - - Web -translation_of: Web/Guide ---- -

Ці статті нададуть Вам практичні рекомендації, що допоможуть з ефективністю використовувати специфічні технології та АРІ. 

- -
-
-
-
-
-
Довідник розробника HTML
-
Мова розмітки гіпертексту (англ. HyperText Markup Language - HTML) - основна мова майже всього веб-контенту. Більша частина того, що ти бачиш на екрані, описано, в основному, з використанням HTML.
-
Довідник розробника CSS
-
Каскадні таблиці стилів (англ. Cascading Style Sheets - CSS) - мова таблиць стилів, що використовується для опису відображення документу, написанного мовою HTML.
-
Довідник розробника з подій
-
Події відносяться як до шаблонів дизайну, які застосовують для асинхронного регулювання різних інцидентів, що виникають протягом терміну експлуатації веб-сторінки, так і для означення імен, характеристик та застосування великої кількості інцидентів різних типів.
-
Графіка в Мережі
-
Сучасні веб-сайти та додатки часто потребують відобразити графіку різної складності.
-
Путівник до Веб API
-
Список усіх Веб АРІ та що вони роблять.
-
JavaScript
-
JavaScript є потужною скриптовою мовою для створення веб-додатків.
-
Локалізація та кодування символів
-
Браузери внутрішньо обробляють текст як Unicode. Однак, спосіб представлення символів в бітовому значенні (кодування символів) використовується для передачі тексту через мережу до браузера. HTML специфікація рекомендує використання кодування UTF-8 (яке здатне відображати Unicode цілком) і не залежно від того, яке кодування було використано, вимагає від Веб-контенту оголошення цього кодування.
-
Розробка мобільного інтернету
-
Ця сторінка представляє огляд деяких з основних технік, необхідних для оформлення веб-сайтів, що будуть добре працювати на мобільних пристроях. Якщо ви шукаєте інформацію про проект Mozilla's Firefox OS, відвідайте сторінку Firefox OS.  Або ж вас може зацікавити Firefox для Android.
-
- -
-
-
- -
-
-
Оптимізація та продуктивність
-
Розробляючи сучасні веб-додатки та сайти, важливо забезпечити їх високу продуктивність. Тобто, зробити так, щоб все у них працювало швидко та ефективно. Це дозволяє їм оптимально працювати як у користувачів потужних десктопних систем та і на менш потужних мобільних пристроях. 
-
Парсування та серіалізація XML
-
Веб-платформи надають наступні об’єкти для парсування та серіалізації XML:
-
SVG-in-OpenType
-
Формат SVG-in-OpenType на даний момент працює в руках MPEG group. Як тільки ми будемо готові для ширшого затвердження, інформація з wiki.mozilla.org буде переміщена сюди, оновлена і розширена.
-
The Web Open Font Format (WOFF)
-
Відкритий формат шрифту для Веб (англ. the Web Open Font Format - WOFF) відкритий формат шрифтів, розроблений Mozilla спільно з Type Supply, LettError, та іншими організаціями.
-
Користувацький досвід
-
Якщо ви хочете, щоб користувачі повертались і використовували ваш додаток чи веб-сайт знову і знову, для вас важливо зробити досвід користування ним приємним. Тут ви зможете знайти статті, що зможуть допомогти в цьому.  
-
Використання об’єктів форм даних
-
Об’єкти FormData дозволяють вам поєднувати набір ключ/значення для відправки з використанням XMLHttpRequest (запитів). Спершу призначені для використання в надсиланні форм даних, але можуть бути використані незалежно від форм для передачі зашифрованих даних. Дані, що передаються, мають такий же формат, як і у методі форми submit(), яка була б використана для відправки даних якби кодування форми було визначено як "multipart/form-data".
-
Глоссарій
-
Дає визначення численним технічним термінам, пов’язаним з Мережею та інтернетом.
-
-
-
-
-
- -

Дивись також

- - diff --git a/files/uk/web/houdini/index.html b/files/uk/web/houdini/index.html deleted file mode 100644 index 73a9b05abb..0000000000 --- a/files/uk/web/houdini/index.html +++ /dev/null @@ -1,88 +0,0 @@ ---- -title: CSS Гудіні -slug: Web/Houdini -translation_of: Web/Houdini -original_slug: Web/Гудіні ---- -

Гудіні - це набір низькорівневих API, які надають доступ до СSS движка, даючи розробникам змогу розширити СSS підключаючись до процесу створення макету та застосування стилів в процесі роботи браузерного движка. Гудіні - набір API, які дають розробникам прямий доступ  CSS Object Model (CSSOM), дозволяючи розробникам писати код який браузер може розібрати як CSS, таким чином створюючи нові СSS властивості не чекаючи щоб вони були реалізовані в браузерах.

- -

Переваги Гудіні

- -

Гудіні дозволяє швидше змінювати стилі  ніж при використанні JavaScript .style. Браузер розбирає CSSOM, включаючи макет, процеси відмальовування і компонування, перед застосування будьяких змін знайдених в скрипті. Крім того всі ці процеси повторюються для застосування змін з JavaScript. Гудіні не очікує на завершення першого циклу рендерингу, він включений в цей цикл, створюючи відмальовані зрозумілі стилі. Гудіні надає Гудіні дозволяє швидше змінювати стилі  ніж при використанні JavaScript .style. Браузер розбирає CSSOM, включаючи макет, процеси відмальовування і компонування, перед застосування будьяких змін знайдених в скрипті. Крім того всі ці процеси повторюються для застосування змін з JavaScript. Гудіні не очікує на завершення першого циклу рендерингу, він включений в цей цикл, створюючи відмальовані зрозумілі стилі. Гудіні надає об'єктно-орієнтований API для роботи з  CSS значеннями в JavaScript.

- -

Гудіні CSS Типізована OM є a CSS Об'єктвною моделю з типами і методами,  показуючи значення як JavaScript об'єкт, це робить Гудіні бульш інтуїтивним ніж  HTMLElement.style маніпуляції. Кожний елемент і таблиця стилів мають карту стилів, до якої можна доступитись через його значення  StylePropertyMap.

- -

Особливістю СSS Гудіні є  Worklet. З ворклетами, ви можете створювати модульний CSS, це потребує однієї лінійки JavaScript для імпорту налаштовуваних компоненів: без пре-процесорів, пост-процесорів або JavaScript фреймворків.

- -
<script>
-  CSS.paintWorklet.addModule('csscomponent.js');
-</script>
-
- -

Цей доданий модуль містить registerPaint() фунцкію, яка реєструє  повністю налаштовувані ворклетів.

- -

 Функція CSS paint() включає в себе ім'я ворклета а також можливі додаткові параметри. Ворклет також має доступ до звичайних значеннь елемента, їх не потрібно передавати як параметри функції.

- -
li {
-	background-image: paint(myComponent, stroke, 10px);
-    --hilights: blue;
-    --lowlights: green;
-}
- -
-

Примітка: З великою силою приходить велика відповідальність! З Гудіні ви можете придумати свій власний макет, сітку, або реалізацію регіонів, але робити це не завжди найкраща ідея. Робоча група CSS робить багато роботи щоб упевнетись, що всі функції є продуктивними, розглядає всі можливі країні випадки і забезпечує безпеку, конфіденційність і доступність.  Коли ви почнете з СSS Гудіні, упевніться що ви дотримуєтесь цих стандартів і починайте з малого перш ніж перейти до більш амбітних проектів.

-
- -

Гудіні API

- -

Ніжче ви можете знайти посилання на основну довідку про API, які знаходяться під егідою Гудіні, а також посилання на туторіали.

- - - -
-
CSS Парсер API
-
API використовуючи  CSS парсер, для парсингу CSS-подібних мов в слабо типізовані.
-
- Для цього АPI ще не написано туторіалу чи довідки.
-
API CSS властивостей і значеннь
-
Визначає API для нових CSS властивостей. Властивості зареєстровані з цим API забезпечені синтаксисом синтаксичного аналізу, який визначає тип, поведінкою успадкування, і початкове значення.
-
- CSS Properties and Values API reference
- CSS Properties and Values API guide
-
-
CSS Typed OM
-
Перетворює CSSOM в значно типізований JavaScript перетворення може значно вплинути на продуктивність. CSS типізована ОМ виставляє CSS значення як JavaScript об'єкти та дозволяє ефективно керувати ним.
-
- CSS Typed OM reference
- CSS Typed OM guide
-
CSS Layout API 
-
-

Призначений для поліпшення розтяжності CSS, це API дозволяє розробникам створювати свої власні алгоритми компонування, такі як макет або лінії прив'язки. Це ще не доступно спочатку.

- -

Для цього АPI ще не написано туторіалу чи довідки.

-
-
CSS Painting API
-
-

Призначений для поліпшення розтяжності CSS — дозволяє розробникам писати  JavaScript функції що доволяють рисувати прямо в задній фон, границі, або зміст елементу за допомогою CSS функції paint() .
-
- CSS Painting API reference
- CSS Painting API guide

-
-
Worklets 
-
-

API для запуску скриптів на різних етапах потоку рендерингу незалежно від головного JavaScript середовища. Worklets концептуально схожі на Web Workers, і застосовуються для розширення движка рендерину.

- -


- Worklets reference

-
-
- -

Інші теми

- -

Схожі теми, які можуть юути цікаві, так як вони можуть бути використані в поєднанні з API Гудіні цікавими способами.

- -
-
Composite Scrolling and Animation 
-
diff --git a/files/uk/web/html/attributes/index.html b/files/uk/web/html/attributes/index.html deleted file mode 100644 index f7499d1bf4..0000000000 --- a/files/uk/web/html/attributes/index.html +++ /dev/null @@ -1,654 +0,0 @@ ---- -title: HTML attribute reference -slug: Web/HTML/Attributes -translation_of: Web/HTML/Attributes ---- -

Елементи в HTML можуть мати атрибути; це додаткові величини, які певним чином змінюють безпосередньо елементи або їх поведінку для отримання необхідного користувачеві ефекту.

- -

Список атрибутів

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Назва атрибутуЕлементиОпис
accept{{ HTMLElement("form") }}, {{ HTMLElement("input") }}Список типів даних, що приймає сервер, зазвичай, типів файлів.
accept-charset{{ HTMLElement("form") }}Список кодувань, які підтримуються.
accesskeyГлобальний атрибутВизначає комбінацію клавіш швидкого доступу для активації або фокусування на елементі.
action{{ HTMLElement("form") }}URI програми, яка обробляє інформацію, передану формою.
align{{ HTMLElement("applet") }}, {{ HTMLElement("caption") }}, {{ HTMLElement("col") }}, {{ HTMLElement("colgroup") }},  {{ HTMLElement("hr") }}, {{ HTMLElement("iframe") }}, {{ HTMLElement("img") }}, {{ HTMLElement("table") }}, {{ HTMLElement("tbody") }},  {{ HTMLElement("td") }},  {{ HTMLElement("tfoot") }} , {{ HTMLElement("th") }}, {{ HTMLElement("thead") }}, {{ HTMLElement("tr") }}Визначає вирівнювання елементу по горизогталі
alt{{ HTMLElement("applet") }}, {{ HTMLElement("area") }}, {{ HTMLElement("img") }}, {{ HTMLElement("input") }}Показує альтарнативний текст у разі неможливості відобразити зображення.
async{{ HTMLElement("script") }}Вказуєна те, що скрипт повинен виконуватися асинхронно.
autocomplete{{ HTMLElement("form") }}, {{ HTMLElement("input") }}Вказує чи дозволено автозаповнення полів браузером.
autofocus{{ HTMLElement("button") }}, {{ HTMLElement("input") }}, {{ HTMLElement("keygen") }}, {{ HTMLElement("select") }}, {{ HTMLElement("textarea") }}Після завантаження сторінки, відбуватиметься автоматичне фокусування на цьому елементі.
autoplay{{ HTMLElement("audio") }}, {{ HTMLElement("video") }}Відтворює аудіо чи відео одразу, коли це стає можливим.
autosave{{ HTMLElement("input") }}Попередні значення повинні зберігатися у випадному списку, щоб можна було обрати значення з різних завантажень сторніки.
bgcolor{{ HTMLElement("body") }}, {{ HTMLElement("col") }}, {{ HTMLElement("colgroup") }}, {{ HTMLElement("marquee") }}, {{ HTMLElement("table") }}, {{ HTMLElement("tbody") }}, {{ HTMLElement("tfoot") }}, {{ HTMLElement("td") }}, {{ HTMLElement("th") }}, {{ HTMLElement("tr") }} -

Визначає колір заднього фону елементу.

- -
-

Примітка: Це застарілий атрибут. Натомість краще використовувати CSS-властивість {{ Cssxref("background-color") }}.

-
-
border{{ HTMLElement("img") }}, {{ HTMLElement("object") }}, {{ HTMLElement("table") }} -

Ширина границі.

- -
-

Примітка: Це застарілий атрибут. Натомість краще використовувати CSS-властивість {{ Cssxref("border") }}.

-
-
buffered{{ HTMLElement("audio") }}, {{ HTMLElement("video") }}Містить тривалість часу буферованого медіафайлу.
challenge{{ HTMLElement("keygen") }}A challenge string that is submitted along with the public key.
charset{{ HTMLElement("meta") }}, {{ HTMLElement("script") }}Оголошує кодування символів сторінки або скрипту.
checked{{ HTMLElement("command") }}, {{ HTMLElement("input") }}Вказує чи слід перевіряти елемент при завантаженні сторінки.
cite{{ HTMLElement("blockquote") }}, {{ HTMLElement("del") }}, {{ HTMLElement("ins") }}, {{ HTMLElement("q") }}Містить URI, що вказує на джерело цитати або зміни.
classГлобальний атрибутЧасто використовують з CSS для задання стилю елементів зі спільними властивостями.
code{{ HTMLElement("applet") }}Вказує URL файла класу аплету для завантаження та виконання.
codebase{{ HTMLElement("applet") }}Цей атрибут надає абсолютну чи відносну URL директорії, де зберігаються файли .class аплету.
color{{ HTMLElement("basefont") }}, {{ HTMLElement("font") }}, {{ HTMLElement("hr") }} -

Цей атрибут задає колір тексту за назвою кольору або його кодом у шістнадцятковому форматі RRGGBB.

- -
-

Примітка: Це застарілий атрибут. Натомість краще використовувати CSS-власивість {{ Cssxref("color") }}

-
-
cols{{ HTMLElement("textarea") }}Задає кількість колонок в текстовому полі.
colspan{{ HTMLElement("td") }}, {{ HTMLElement("th") }}Цей атрибут задає кількість стовпців, яку займає одна комірка таблиці вширину.
content{{ HTMLElement("meta") }}Знаення, пов'язане з http-equiv або name залежно від контексту.
contenteditableГлобальний атрибутВказує чи можна змінювати вміст елементу.
contextmenuГлобальний атрибутВизначає ID елементу {{ HTMLElement("menu") }}, який слугуватиме контекстним меню елемента.
controls{{ HTMLElement("audio") }}, {{ HTMLElement("video") }}Вказує чи браузер відображатиме панель управління медіа користувачеві.
coords{{ HTMLElement("area") }}Набір значень, що задають координати активної області.
crossorigin{{ HTMLElement("audio") }}, {{ HTMLElement("img") }}, {{ HTMLElement("link") }}, {{ HTMLElement("script") }}, {{ HTMLElement("video") }}Визначає як елемент поводиться з запитами до різних джерел.
data{{ HTMLElement("object") }}Задає URL джерела.
data-*Глобальний атрибутДозволяє вам застосовувати до HTML-елемента користувацькі атрибути.
datetime{{ HTMLElement("del") }}, {{ HTMLElement("ins") }}, {{ HTMLElement("time") }}Вказує час та дату, пов'язані з елементтом.
default{{ HTMLElement("track") }}Indicates that the track should be enabled unless the user's preferences indicate something different.
defer{{ HTMLElement("script") }}Indicates that the script should be executed after the page has been parsed.
dirГлобальний атрибутDefines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)
dirname{{ HTMLElement("input") }}, {{ HTMLElement("textarea") }} 
disabled{{ HTMLElement("button") }}, {{ HTMLElement("command") }}, {{ HTMLElement("fieldset") }}, {{ HTMLElement("input") }}, {{ HTMLElement("keygen") }}, {{ HTMLElement("optgroup") }}, {{ HTMLElement("option") }}, {{ HTMLElement("select") }}, {{ HTMLElement("textarea") }}Вказує на можливість взаємодії користувача з елементом.
download{{ HTMLElement("a") }}, {{ HTMLElement("area") }}Вказує на те, що посилання використовується для завантаження.
draggableГлобальний атрибутВизначає чи можна перетягувати елемент.
dropzoneГлобальний атрибутВказує чи може елемент приймати перетягування на нього контенту.
enctype{{ HTMLElement("form") }}Defines the content type of the form date when the method is POST.
for{{ HTMLElement("label") }}, {{ HTMLElement("output") }}Описує елементи, які належать до цього елементу.
form{{ HTMLElement("button") }}, {{ HTMLElement("fieldset") }}, {{ HTMLElement("input") }}, {{ HTMLElement("keygen") }}, {{ HTMLElement("label") }}, {{ HTMLElement("meter") }}, {{ HTMLElement("object") }}, {{ HTMLElement("output") }}, {{ HTMLElement("progress") }}, {{ HTMLElement("select") }}, {{ HTMLElement("textarea") }}Визначає форму, яка є батьківською для цього елементу.
formaction{{ HTMLElement("input") }}, {{ HTMLElement("button") }}Indicates the action of the element, overriding the action defined in the {{ HTMLElement("form") }}.
headers{{ HTMLElement("td") }}, {{ HTMLElement("th") }}IDs of the <th> elements which applies to this element.
height{{ HTMLElement("canvas") }}, {{ HTMLElement("embed") }}, {{ HTMLElement("iframe") }}, {{ HTMLElement("img") }}, {{ HTMLElement("input") }}, {{ HTMLElement("object") }}, {{ HTMLElement("video") }} -

Задає висоту перелічених елементів. Для інших елементів краще використовувати CSS-властивість {{cssxref("height")}}.

- -
-

Примітка: У деяких випадках, зокрема для {{ HTMLElement("div") }}, це застарілий атрибут. Натомість для нього краще застосовувати CSS-властивість {{ Cssxref("height") }}.

-
-
hiddenГлобальний атрибутНе дозволяє рендеринг певного елемента, але не скасовує рендеринг дочірніх елементів, наприклад, скриптових і активних.
high{{ HTMLElement("meter") }}Вказує нижню межу верхнього діапазону.
href{{ HTMLElement("a") }}, {{ HTMLElement("area") }}, {{ HTMLElement("base") }}, {{ HTMLElement("link") }} URL посилання на певне джерело.
hreflang{{ HTMLElement("a") }}, {{ HTMLElement("area") }}, {{ HTMLElement("link") }}Вказує на мову сторінки, на яку буде перейдено за посиланням.
http-equiv{{ HTMLElement("meta") }} 
icon{{ HTMLElement("command") }}Задає картинку, яка відображає команду.
idГлобальний атрибутЧасто використовується з CSS для задання стилю конкретному елементу. Значення цього атрибути повинно бути унікальним.
integrity{{ HTMLElement("link") }}, {{ HTMLElement("script") }}  -

Додатковий рівень захисту, дає змогу браузеру ідентифікувати, чи він стягує потрібний файл.

- -

Посилання MDN

-
ismap{{ HTMLElement("img") }}Вказує на те, що зображення є частиною заображення серверної карти.
itempropГлобальний атрибут 
keytype{{ HTMLElement("keygen") }}Визначає тип генерованого ключа.
kind{{ HTMLElement("track") }}Specifies the kind of text track.
label{{ HTMLElement("track") }}Specifies a user-readable title of the text track.
langГлобальний атрибутDefines the language used in the element.
language{{ HTMLElement("script") }}Defines the script language used in the element.
list{{ HTMLElement("input") }}Identifies a list of pre-defined options to suggest to the user.
loop{{ HTMLElement("audio") }}, {{ HTMLElement("bgsound") }}, {{ HTMLElement("marquee") }}, {{ HTMLElement("video") }}Indicates whether the media should start playing from the start when it's finished.
low{{ HTMLElement("meter") }}Indicates the upper bound of the lower range.
manifest{{ HTMLElement("html") }}Specifies the URL of the document's cache manifest.
max{{ HTMLElement("input") }}, {{ HTMLElement("meter") }}, {{ HTMLElement("progress") }}Indicates the maximum value allowed.
maxlength{{ HTMLElement("input") }}, {{ HTMLElement("textarea") }}Defines the maximum number of characters allowed in the element.
media{{ HTMLElement("a") }}, {{ HTMLElement("area") }}, {{ HTMLElement("link") }}, {{ HTMLElement("source") }}, {{ HTMLElement("style") }}Specifies a hint of the media for which the linked resource was designed.
method{{ HTMLElement("form") }}Defines which HTTP method to use when submitting the form. Can be GET (default) or POST.
min{{ HTMLElement("input") }}, {{ HTMLElement("meter") }}Indicates the minimum value allowed.
multiple{{ HTMLElement("input") }}, {{ HTMLElement("select") }}Indicates whether multiple values can be entered in an input of the type email or file.
muted{{ HTMLElement("video") }}Indicates whether the audio will be initially silenced on page load.
name{{ HTMLElement("button") }}, {{ HTMLElement("form") }}, {{ HTMLElement("fieldset") }}, {{ HTMLElement("iframe") }}, {{ HTMLElement("input") }}, {{ HTMLElement("keygen") }}, {{ HTMLElement("object") }}, {{ HTMLElement("output") }}, {{ HTMLElement("select") }}, {{ HTMLElement("textarea") }}, {{ HTMLElement("map") }}, {{ HTMLElement("meta") }}, {{ HTMLElement("param") }}Name of the element. For example used by the server to identify the fields in form submits.
novalidate{{ HTMLElement("form") }}This attribute indicates that the form shouldn't be validated when submitted.
open{{ HTMLElement("details") }}Indicates whether the details will be shown on page load.
optimum{{ HTMLElement("meter") }}Indicates the optimal numeric value.
pattern{{ HTMLElement("input") }}Defines a regular expression which the element's value will be validated against.
ping{{ HTMLElement("a") }}, {{ HTMLElement("area") }} 
placeholder{{ HTMLElement("input") }}, {{ HTMLElement("textarea") }}Дає підказку користувачу про те, які дані треба вводити в поле.
poster{{ HTMLElement("video") }}URL, що відображає рамку постера під час програвання або пошуку.
preload{{ HTMLElement("audio") }}, {{ HTMLElement("video") }}Вказує, чи потребує попереднього завантаження контент або його частина.
radiogroup{{ HTMLElement("command") }} 
readonly{{ HTMLElement("input") }}, {{ HTMLElement("textarea") }}Вказує чи можна редагувати цей елемент.
rel{{ HTMLElement("a") }}, {{ HTMLElement("area") }}, {{ HTMLElement("link") }}Визнчає взаємозв'язок даного об'єкту та об'єкту посилання.
required{{ HTMLElement("input") }}, {{ HTMLElement("select") }}, {{ HTMLElement("textarea") }}Вказує чи заповнення цього елементу є обов'язковим.
reversed{{ HTMLElement("ol") }}Вказує як відображати елементи списку: у порядку зростання чи спадання.
rows{{ HTMLElement("textarea") }}Визначає кількість рядків у текстовому полі.
rowspan{{ HTMLElement("td") }}, {{ HTMLElement("th") }}Визначає кількість рядків, які займає одна комірка таблиці.
sandbox{{ HTMLElement("iframe") }} 
scope{{ HTMLElement("th") }} 
scoped{{ HTMLElement("style") }} 
seamless{{ HTMLElement("iframe") }} 
selected{{ HTMLElement("option") }}Задає значення, яке буде обрано при звантаженні сторінки.
shape{{ HTMLElement("a") }}, {{ HTMLElement("area") }} 
size{{ HTMLElement("input") }}, {{ HTMLElement("select") }}Задає ширину елементу (у пікселях). Якщо елемент є стрічкою або текстом чи паролем, то цей атрибут задає кількість символів в ширину.
sizes{{ HTMLElement("link") }}, {{ HTMLElement("img") }}, {{ HTMLElement("source") }} 
slotГлобальний атрибутВідводить елементу місце у тіньовій моделі документу.
span{{ HTMLElement("col") }}, {{ HTMLElement("colgroup") }} 
spellcheckГлобальний атрибутВказує чи дозволена для цього елемента перевірка правопису.
src{{ HTMLElement("audio") }}, {{ HTMLElement("embed") }}, {{ HTMLElement("iframe") }}, {{ HTMLElement("img") }}, {{ HTMLElement("input") }}, {{ HTMLElement("script") }}, {{ HTMLElement("source") }}, {{ HTMLElement("track") }}, {{ HTMLElement("video") }}URL вбудованого контенту.
srcdoc{{ HTMLElement("iframe") }} 
srclang{{ HTMLElement("track") }} 
srcset{{ HTMLElement("img") }} 
start{{ HTMLElement("ol") }}Задає значення початку відліку, якщо воно повинно бутит відмінним від "1".
step{{ HTMLElement("input") }} 
styleГлобальний атрибутВизначає CSS-стилі, які переписуюють попередньо задані властивості.
summary{{ HTMLElement("table") }} 
tabindexГлобальний атрибутПереписує порядок шарів сторінки за замовчуванням та встановлює свій.
target{{ HTMLElement("a") }}, {{ HTMLElement("area") }}, {{ HTMLElement("base") }}, {{ HTMLElement("form") }} 
titleГлобальний атрибутТекст, який показується при наведенні курсору на елемент.
type{{ HTMLElement("button") }}, {{ HTMLElement("input") }}, {{ HTMLElement("command") }}, {{ HTMLElement("embed") }}, {{ HTMLElement("object") }}, {{ HTMLElement("script") }}, {{ HTMLElement("source") }}, {{ HTMLElement("style") }}, {{ HTMLElement("menu") }}Визначає тип даних елементу.
usemap{{ HTMLElement("img") }},  {{ HTMLElement("input") }}, {{ HTMLElement("object") }} 
value{{ HTMLElement("button") }}, {{ HTMLElement("option") }}, {{ HTMLElement("input") }}, {{ HTMLElement("li") }}, {{ HTMLElement("meter") }}, {{ HTMLElement("progress") }}, {{ HTMLElement("param") }}Задає величину, що буде відображатись за замовчуванням після завантаження сторінки.
width{{ HTMLElement("canvas") }}, {{ HTMLElement("embed") }}, {{ HTMLElement("iframe") }}, {{ HTMLElement("img") }}, {{ HTMLElement("input") }}, {{ HTMLElement("object") }}, {{ HTMLElement("video") }} -

Задає ширину для всіх зазначених у списку елементів.

- -
-

Примітка: У інших випадках, наприклад для елементу  {{ HTMLElement("div") }}, цей атрибут застарілий, і краще використовувати CSS-властивість {{ Cssxref("width") }}.

-
-
wrap{{ HTMLElement("textarea") }}Вказує, чи потрібно додавати нові рядки до тексту.
- -

Content versus IDL attributes

- -

In HTML, most attributes have two faces: the content attribute and the IDL attribute.

- -

The content attribute is the attribute as you set it from the content (the HTML code) and you can set it or get it via {{domxref("element.setAttribute()")}} or {{domxref("element.getAttribute()")}}. The content attribute is always a string even when the expected value should be an integer. For example, to set an {{HTMLElement("input")}} element's maxlength to 42 using the content attribute, you have to call setAttribute("maxlength", "42") on that element.

- -

The IDL attribute is also known as a JavaScript property. These are the attributes you can read or set using JavaScript properties like element.foo. The IDL attribute is always going to use (but might transform) the underlying content attribute to return a value when you get it and is going to save something in the content attribute when you set it. In other words, the IDL attributes, in essence, reflect the content attributes.

- -

Most of the time, IDL attributes will return their values as they are really used. For example, the default type for {{HTMLElement("input")}} elements is "text", so if you set input.type="foobar", the <input> element will be of type text (in the appearance and the behavior) but the "type" content attribute's value will be "foobar". However, the type IDL attribute will return the string "text".

- -

IDL attributes are not always strings; for example, input.maxlength is a number (a signed long). When using IDL attributes, you read or set values of the desired type, so input.maxlength is always going to return a number and when you set input.maxlength ,it wants a number. If you pass another type, it is automatically converted to a number as specified by the standard JavaScript rules for type conversion.

- -

IDL attributes can reflect other types such as unsigned long, URLs, booleans, etc. Unfortunately, there are no clear rules and the way IDL attributes behave in conjunction with their corresponding content attributes depends on the attribute. Most of the time, it will follow the rules laid out in the specification, but sometimes it doesn't. HTML specifications try to make this as developer-friendly as possible, but for various reasons (mostly historical), some attributes  behave oddly (select.size, for example) and you should read the specifications to understand how exactly they behave.

- -

Також читай

- - diff --git a/files/uk/web/html/block-level_elements/index.html b/files/uk/web/html/block-level_elements/index.html deleted file mode 100644 index 2e1b9eef0f..0000000000 --- a/files/uk/web/html/block-level_elements/index.html +++ /dev/null @@ -1,133 +0,0 @@ ---- -title: Блокові елементи -slug: Web/HTML/Block-level_elements -tags: - - HTML - - HTML5 -translation_of: Web/HTML/Block-level_elements ---- -

В HTML (Hypertext Markup Language — мові гіпертекстової розмітки) елементи зазвичай бувають або блокові, або рядкові. Блокові елементи, або блок-елементи, займають всю ширину батьківського блока (контейнера), утворюючи таким чином блок. У цій статті пояснюється, як це працює. 

- -

Браузери зазвичай відображають кожний блоковий елемент з нового рядка. Це можна уявити як стопку блоків, у якій всі блоки розміщуються над або один під одним. 

- -
-

Блокові елементи завжди починаються з нового рядка та займають всю доступну ширину (розтягуються ліворуч та праворуч настільки, наскільки це дозволяє ширина вікна браузера).

-
- -

Приклади нижче показують, як працюють блокові елементи: 

- -

Блокові елементи

- -

HTML

- -
<p>Цей параграф є блоковим елементом; колір його бекграунду змінений, щоб показати батьківський елемент параграфа.</p>
- -

CSS

- -
p { background-color: #8ABB55; }
-
- -

{{ EmbedLiveSample('Block-level_Example') }}

- -

Застосування

- - - -

Блокові проти рядкових

- -

Є кілька ключових відмінностей між блоковими і рядковими елементами:

- -
-
Форматування
-
Типово, блоковий елемент починається з нового рядка, тоді як рядковий елемент може починатися будь-де в рядку. 
-
Модель контенту
-
Зазвичай блокові елементи можуть містити в собі рядкові елементи, а також інші блокові елементи. Ця структурна відмінність відображає ідею, що блокові елементи утворюють "більші" структури, ніж рядкові елементи.
-
- -

Розрізнення "блокові елементи vs. рядкові елементи" вживається в специфікаціях HTML до версії 4.01. В HTML5 це протиставлення заміщене більш складними поняттями категорій контенту. Блокові елементи здебільшого відповідають категорії flow content (розміщення контенту) в HTML5, тоді як рядкові — категорії phrasing content (текст і його розмітка), з декількома додатковими категоріями.

- -

Елементи

- -

Нижче подається повний перелік усіх блокових елементів HTML (технічно, у нових елементів, представлених у HTML5, "блоковість" вже не визначається). 

- -
-
-
{{ HTMLElement("address") }}
-
Контактна інформація.
-
{{ HTMLElement("article") }} {{ HTMLVersionInline(5) }}
-
Вміст статті.
-
{{ HTMLElement("aside") }} {{ HTMLVersionInline(5) }}
-
Бічний контент.
-
{{ HTMLElement("blockquote") }}
-
Довга блок-цитата.
-
{{ HTMLElement("canvas") }} {{ HTMLVersionInline(5) }}
-
Канва для малюнків.
-
{{ HTMLElement("dd") }}
-
Описує термін в переліку визначень.
-
{{ HTMLElement("div") }}
-
Поділ документа.
-
{{ HTMLElement("dl") }}
-
Перелік визначень.
-
{{ HTMLElement("dt") }}
-
Термін в переліку визначень.
-
{{ HTMLElement("fieldset") }}
-
Лейбл (назва) для набору полів.
-
- -
-
{{ HTMLElement("figcaption") }} {{ HTMLVersionInline(5) }}
-
Підпис зображення.
-
{{ HTMLElement("figure") }} {{ HTMLVersionInline(5) }}
-
Групує медіаконтент з підписом (див. {{ HTMLElement("figcaption") }}).
-
{{ HTMLElement("footer") }} {{ HTMLVersionInline(5) }}
-
Секція або футер сторінки. 
-
{{ HTMLElement("form") }}
-
Форма введення.
-
{{ HTMLElement("h1") }}, {{ HTMLElement("h2") }}, {{ HTMLElement("h3") }}, {{ HTMLElement("h4") }}, {{ HTMLElement("h5") }}, {{ HTMLElement("h6") }}
-
Заголовки рівнів 1-6.
-
{{ HTMLElement("header") }} {{ HTMLVersionInline(5) }}
-
Секція або хедер сторінки.
-
{{ HTMLElement("hgroup") }} {{ HTMLVersionInline(5) }}
-
Групує контент хедера.
-
{{ HTMLElement("hr") }}
-
Горизонтальна роздільна лінія.
-
{{ HTMLElement("li") }}
-
Пункт переліку.
-
{{ HTMLElement("main") }}
-
Містить основний контент, унікальний для цього документу.
-
{{ HTMLElement("nav") }}
-
Містить навігацію посилань. 
-
- -
-
{{ HTMLElement("noscript") }}
-
Контент, який буде відображатися, якщо скрипт не підтримується або вимкнений. 
-
{{ HTMLElement("ol") }}
-
Нумерований список (перелік).
-
{{ HTMLElement("output") }} {{ HTMLVersionInline(5) }}
-
Вихідні дані форми.
-
{{ HTMLElement("p") }}
-
Параграф.
-
{{ HTMLElement("pre") }}
-
Попередньо відформатований текст.
-
{{ HTMLElement("section") }} {{ HTMLVersionInline(5) }}
-
Секція веб-сторінки.
-
{{ HTMLElement("table") }}
-
Таблиця.
-
{{ HTMLElement("tfoot") }}
-
Футер таблиці.
-
{{ HTMLElement("ul") }}
-
Ненумерований список (перелік).
-
{{ HTMLElement("video") }} {{ HTMLVersionInline(5) }}
-
Відеоплеєр.
-
-
- -


- Також дивися:

- - diff --git a/files/uk/web/html/element/header/index.html b/files/uk/web/html/element/header/index.html deleted file mode 100644 index 15b51b687c..0000000000 --- a/files/uk/web/html/element/header/index.html +++ /dev/null @@ -1,146 +0,0 @@ ---- -title:
-slug: Web/HTML/Element/header -tags: - - HTML - - HTML елементи -translation_of: Web/HTML/Element/header -original_slug: Web/HTML/Елемент/Заголовок ---- -
{{HTMLRef}}
- -

HTML <header> елемент представляє групу вступних або навігаційних елементів. Він може містити елементи заголовків, а також інші елементи, такі як логотип, форма пошуку та інше.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Content categoriesFlow content, palpable content.
Permitted contentFlow content, but with no <header> or {{HTMLElement("footer")}} descendant.
Tag omission{{no_tag_omission}}
Permitted parentsAny element that accepts flow content. Note that a <header> element must not be a descendant of an {{HTMLElement("address")}}, {{HTMLElement("footer")}} or another {{HTMLElement("header")}} element.
Permitted ARIA roles{{ARIARole("group")}}, {{ARIARole("presentation")}}
DOM interface{{domxref("HTMLElement")}}
- -

Зауваження до використання

- -

The <header> element is not sectioning content and therefore does not introduce a new section in the outline. That said, a header element is intended to usually contain the surrounding section's heading (an h1h6 element), but this is not required.

- -

Атрибути

- -

This element only includes the global attributes.

- -

Приклад

- -
<header>
-  <h1>Main Page Title</h1>
-  <img src="mdn-logo-sm.png" alt="MDN logo">
-</header>
-
- -

Main Page Title

- -

MDN

- -

Specifications

- - - - - - - - - - - - - - - - - - - - - -
SpecificationStatusComment
{{SpecName('HTML WHATWG', 'semantics.html#the-header-element', '<header>')}}{{Spec2('HTML WHATWG')}} 
{{SpecName('HTML5 W3C', 'sections.html#the-header-element', '<header>')}}{{Spec2('HTML5 W3C')}} 
- -

Browser compatibility

- -

{{CompatibilityTable}}

- -
- - - - - - - - - - - - - - - - - - - - - -
FeatureChromeEdgeFirefox (Gecko)Internet ExplorerOperaSafari
Basic support5{{CompatVersionUnknown}}{{CompatGeckoDesktop("2.0")}}9.011.104.1
-
- -
- - - - - - - - - - - - - - - - - - - - - -
FeatureAndroidEdgeFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Basic support2.2{{CompatVersionUnknown}}{{CompatGeckoMobile("2.0")}}9.011.05.0
-
- -

See also

- - diff --git a/files/uk/web/html/element/html/index.html b/files/uk/web/html/element/html/index.html deleted file mode 100644 index 5aac366c84..0000000000 --- a/files/uk/web/html/element/html/index.html +++ /dev/null @@ -1,170 +0,0 @@ ---- -title: -slug: Web/HTML/Element/html -tags: - - Корінь - - Структура -translation_of: Web/HTML/Element/html -original_slug: Web/HTML/Елемент/html ---- -

{{HTMLRef}}

- -

HTML-елемент <html> являє собою корінь HTML-документа. Решта елементів мають бути його нащадками.

- -

Оскільки <html> є першим (за винятком коментарів) елементом документа, він зветься кореневим елементом. І хоча цей тег може бути відсутнім для {{glossary("HTML")}}, в {{glossary("XHTML")}} він має бути відкритий і закритий явно.

- - - - - - - - - - - - - - - - - - - - - - - - -
Категорії вмістуВідсутні.
Дозволений вмістОдин елемент {{HTMLElement("head")}} та один (наступний за ним) елемент {{HTMLElement("body")}}.
Обов'язковість тегів -

Початковий тег можна опустити, якщо перша річ всередині елементу <html> — не коментар. Кінцевий тег можна опустити тоді, коли одразу після елементу <html> немає коментаря, і він містить елемент {{HTMLElement("body")}}, що має або вміст (непустий), або початковий тег.

-
Дозволені пращуриЯк кореневий елемент документа, або як піддокумент складного документа там, де це дозволено.
Інтерфейс DOM{{domxref("HTMLHtmlElement")}}
- -

Атрибути

- -

Цей елемент має глобальні атрибути.

- -
-
{{htmlattrdef("manifest")}} {{obsolete_inline}}
-
Вказує URI manifest-файлу, що позначає ресурси, які підлягають локальному кешуванню. Детальніше див. Using the application cache.
-
{{htmlattrdef("version")}} {{obsolete_inline}}
-
Вказує версію HTML {{glossary("DTD", "Document Type Definition")}}  цього документа. Цей атрибут визнано застарілим, вживайте !DOCTYPE замість нього.
-
{{htmlattrdef("xmlns")}} 
-
Вказує простір імен (XML) документа. Типове значення "http://www.w3.org/1999/xhtml". Для XHTML то обов'язковий атрибут, а для HTML може бути відсутнім.
-
- -

Приклад

- -
-

Використаний в прикладі  {{glossary("DOCTYPE")}} вказує на {{glossary("HTML5")}}.

-
- -
<!DOCTYPE html>
-<html>
-  <head>...</head>
-  <body>...</body>
-</html>
-
- -

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

- - - - - - - - - - - - - - - - - - - - - - - - - - -
SpecificationStatusComment
{{SpecName('HTML WHATWG', 'semantics.html#the-html-element', '<html>')}}{{Spec2('HTML WHATWG')}} 
{{SpecName('HTML5 W3C', 'semantics.html#the-html-element', '<html>')}}{{Spec2('HTML5 W3C')}}Додано підтримку атрибута manifest (згодом визнаний застарілим).
- Атрибут version визнано застарілим.
{{SpecName('HTML4.01', 'struct/global.html#h-7.3', '<html>')}}{{Spec2('HTML4.01')}}Атрибут version визнано застарілим.
- -

Підтримка браузерами

- -

{{CompatibilityTable}}

- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
FeatureChromeFirefox (Gecko)Internet ExplorerOperaSafari (WebKit)
Basic support1.0{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
manifest{{CompatVersionUnknown}}{{CompatGeckoDesktop("1.9")}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
FeatureAndroidFirefox Mobile (Gecko)IE PhoneOpera MobileSafari Mobile
Basic support{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
manifest{{CompatVersionUnknown}}{{CompatGeckoMobile("1.9")}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
-
- -

Див. також

- - diff --git a/files/uk/web/html/element/iframe/index.html b/files/uk/web/html/element/iframe/index.html deleted file mode 100644 index df56027e84..0000000000 --- a/files/uk/web/html/element/iframe/index.html +++ /dev/null @@ -1,261 +0,0 @@ ---- -title: '