<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>amachang</author_name>
  <author_url>https://blog.hatena.ne.jp/amachang/</author_url>
  <blog_title>IT戦記</blog_title>
  <blog_url>https://amachang.hatenablog.com/</blog_url>
  <categories>
    <anon>JavaScript</anon>
  </categories>
  <description>JavaScript でオブジェクトを作って、関連する HTML 上の要素にアタッチするような手法がよく用いられていますが。 その際にどのような方法で要素を取得していますか？僕は prototype.js の document.getElementsByClassName を使ってクラスを抽出してアタッチしています。しかし、このメソッドはかなり重い。。。ためしに、以下のような id ベースで複数の要素を抽出するメソッドを作ってベンチマークをとってみました。 document.getElementsByIdPrefix = function(idPrefix) { var children = …</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Famachang.hatenablog.com%2Fentry%2F20060208%2F1139379764&quot; title=&quot;prototype.js の document.getElementsByClassName は重い - IT戦記&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2006-02-08 15:22:44</published>
  <title>prototype.js の document.getElementsByClassName は重い</title>
  <type>rich</type>
  <url>https://amachang.hatenablog.com/entry/20060208/1139379764</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
