aboutsummaryrefslogtreecommitdiff
path: root/files/ru/orphaned/web/api/element/currentstyle/index.html
diff options
context:
space:
mode:
authorMDN <actions@users.noreply.github.com>2021-06-08 00:58:25 +0000
committerMDN <actions@users.noreply.github.com>2021-06-08 00:58:25 +0000
commit5e990a17012ff5ed90ae1559a11bbe4bc74c887a (patch)
treecb5001d2192bc027272aca437d6aa42cbe34212b /files/ru/orphaned/web/api/element/currentstyle/index.html
parent30628708e318da59965b7c8e0d7fec0d47680909 (diff)
downloadtranslated-content-5e990a17012ff5ed90ae1559a11bbe4bc74c887a.tar.gz
translated-content-5e990a17012ff5ed90ae1559a11bbe4bc74c887a.tar.bz2
translated-content-5e990a17012ff5ed90ae1559a11bbe4bc74c887a.zip
[CRON] sync translated content
Diffstat (limited to 'files/ru/orphaned/web/api/element/currentstyle/index.html')
-rw-r--r--files/ru/orphaned/web/api/element/currentstyle/index.html51
1 files changed, 51 insertions, 0 deletions
diff --git a/files/ru/orphaned/web/api/element/currentstyle/index.html b/files/ru/orphaned/web/api/element/currentstyle/index.html
new file mode 100644
index 0000000000..f98340d418
--- /dev/null
+++ b/files/ru/orphaned/web/api/element/currentstyle/index.html
@@ -0,0 +1,51 @@
+---
+title: Element.currentStyle
+slug: orphaned/Web/API/Element/currentStyle
+tags:
+ - API
+ - NeedsExample
+ - Non-standard
+ - Property
+translation_of: Web/API/Element/currentStyle
+original_slug: Web/API/Element/currentStyle
+---
+<p>{{Non-standard_header}}</p>
+
+<p class="summary"><span class="seoSummary"><strong><code>Element.currentStyle</code></strong> является собственностью, похожей на стандартизированную {{DOMxRef("window.getComputedStyle()")}} method.</span> Он доступен в старых версиях Microsoft Internet Explorer. Однако, он возвращает единицы, установленные в CSS в то время как <code>window.getComputedStyle()</code>возвращает значения в пикселях.</p>
+
+<h2 id="Polyfill">Polyfill</h2>
+
+<div class="note">
+<p>Эта polyfill возвращает значения в пикселях и, скорее всего, будет довольно медленным, так как оно должно называться {{domxref("window.getComputedStyle()")}} каждый раз, когда читается его значение.</p>
+</div>
+
+<pre class="brush: js">/* Любое авторское право посвящено Общественному достоянию.
+ * http://creativecommons.org/publicdomain/zero/1.0/ */
+
+if (!("currentStyle" in Element.prototype)) {
+  Object.defineProperty(Element.prototype, "currentStyle", {
+    get: function() {
+      return window.getComputedStyle(this);
+    }
+  });
+}
+</pre>
+
+<h2 id="Спецификации">Спецификации</h2>
+
+<p>Не входит ни в какие спецификации.</p>
+
+<p>Microsoft <a href="https://web.archive.org/web/20150629144515/https://msdn.microsoft.com/en-us/library/ms535231(v=vs.85).aspx">had a description on MSDN</a>.</p>
+
+<h2 id="Browser_Compatibility" name="Browser_Compatibility">Совместимость с браузерами</h2>
+
+<p>{{Compat("api.Element.currentStyle")}}</p>
+
+<h2 id="Смотрите_также">Смотрите также</h2>
+
+<ul>
+ <li>{{DOMxRef("Element.runtimeStyle")}}</li>
+ <li>{{DOMxRef("window.getComputedStyle()")}}</li>
+</ul>
+
+<div>{{APIRef("DOM")}}</div>