Как получить текстовое содержимое псевдоэлемента :: before?

В этом примере содержимое псевдоэлемента :: before является не статическим значением, а счетчиком. Я хочу получить текущее значение «2» вместо общей формулы «счетчик (itemcounter)».

// Expected value is 2 instead of counter(itemcounter).
alert(window.getComputedStyle(document.querySelector('li:nth-child(2)'), '::before').getPropertyValue('content'));
ul {
  counter-reset: itemcounter;
  list-style-type: none;
}
li {
  line-height: 20px;
  margin-bottom: 10px
}
li::before {
  background: #000;
  border-radius: 10px;
  color: #fff;
  counter-increment: itemcounter;
  content: counter(itemcounter);
  display: block;
  float: left;
  font-family: sans-serif;
  font-weight: 700;
  font-size: 14px;
  height: 20px;
  line-height: 20px;
  margin-right: 5px;
  text-align: center;
  width: 20px;
}
<ul>
  <li>First item</li>
  <li>Second item</li>
  <li>Third item</li>
</ul>


person Tamás Bolvári    schedule 10.10.2015    source источник
comment
Тогда я отмечу это как дубликат, спасибо.   -  person Tamás Bolvári    schedule 11.10.2015