Fred Tingaud 16f6c0aecf
Inline adoc when include has no additional value (#1940)
Inline adoc files when they are included exactly once.

Also fix language tags because this inlining gives us better information
on what language the code is written in.
2023-05-25 14:18:12 +02:00

56 lines
1.3 KiB
Plaintext

== Why is this an issue?
The use of DOM attributes that are only supported by specific browsers can doom your website to obsolescence as the browser market shifts or the vendor that introduced the extension abandons it. Instead, it's always best to stick to standard attributes so that your site works for as broad a cross section of users as possible.
This rule raises an issue when ``++innerText++`` is used.
=== Noncompliant code example
[source,javascript]
----
function setData(element) {
element.innerText = "Hello World!"; // Noncompliant
}
----
=== Compliant solution
[source,javascript]
----
function setData(element) {
element.textContent = "Hello World!";
}
----
ifdef::env-github,rspecator-view[]
'''
== Implementation Specification
(visible only on this page)
=== Message
Remove this use of "innerText".
'''
== Comments And Links
(visible only on this page)
=== on 7 Apr 2015, 08:06:43 Linda Martin wrote:
\[~ann.campbell.2] Is the ``++inner.Text++`` - with the "." - in the description a typo ? Or does it refers to something else ? Just want to be sure I'm not removing meaning that I'm not aware of.
=== on 9 Apr 2015, 12:00:42 Ann Campbell wrote:
\[~linda.martin] I would describe that as less a "typo" and more a "brain fart" :-)
Fixed.
=== on 19 May 2015, 15:53:37 Linda Martin wrote:
Haha! Reviewe.
endif::env-github,rspecator-view[]