2024-02-21 13:48:07 +01:00
|
|
|
include::../common/rule.adoc[tag=header]
|
2023-11-09 17:24:44 +01:00
|
|
|
|
|
|
|
=== Code examples
|
|
|
|
|
|
|
|
==== Noncompliant code example
|
|
|
|
|
|
|
|
[source,javascript,diff-id=1,diff-type=noncompliant]
|
|
|
|
----
|
|
|
|
function MyInput() {
|
|
|
|
return <input type="text" autocomplete="foo" />; // Noncompliant
|
|
|
|
}
|
|
|
|
----
|
|
|
|
|
|
|
|
==== Compliant solution
|
|
|
|
|
|
|
|
[source,javascript,diff-id=1,diff-type=compliant]
|
|
|
|
----
|
|
|
|
function MyInput() {
|
|
|
|
return <input type="text" autocomplete="name" />;
|
|
|
|
}
|
|
|
|
----
|
|
|
|
|
2024-02-21 13:48:07 +01:00
|
|
|
include::../common/rule.adoc[tag=footer]
|