Closed
Bug 1253925
Opened 9 years ago
Closed 9 years ago
CamelCase must be used in example
Categories
(Developer Documentation Graveyard :: JavaScript, defect, P5)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: anthropophagite, Unassigned)
References
()
Details
:: Developer Documentation Request
Request Type: Correction
Gecko Version: unspecified
Technical Contact:
:: Details
I'm talking abour Russian-language help page. It has the following example HTML:
<article
id="electriccars"
data-columns="3"
data-indexnumber="12314"
data-parent="cars">
...
</article>
and corresponding Javascript:
var article = document.querySelector('#electriccars'),
data = article.dataset;
// data.columns -> "3"
// data.indexnumber -> "12314"
// data.parent -> "cars"
In the same time English-language one (https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Using_data_attributes) has this code with a minor but important difference (note the "index-number" in HTML and "indexNumber" in Javascript):
<article
id="electriccars"
data-columns="3"
data-index-number="12314"
data-parent="cars">
...
</article>
var article = document.getElementById('electriccars');
article.dataset.columns // "3"
article.dataset.indexNumber // "12314"
article.dataset.parent // "cars"
I'm sure this point ("index-number" in HTML becomes "indexNumber" in Javascript) must be properly pronounced in Russian version.
Hello Evgeniy, I edited the page to fix the example.
Thanks for reporting! :)
Status: UNCONFIRMED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•