<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>takahashikzn</author_name>
  <author_url>https://blog.hatena.ne.jp/takahashikzn/</author_url>
  <blog_title>R42日記</blog_title>
  <blog_url>https://takahashikzn.root42.jp/</blog_url>
  <categories>
    <anon>Javascript</anon>
  </categories>
  <description>いま知ったのですが、Javascriptでは、new演算子のオーバーロード的な芸当が使えます。 但し条件があって、『コンストラクタを関数として評価した結果が数値、文字列、真偽値、null、undefined以外のみ』です。 仕様的にはこれ。 http://www.ecma-international.org/ecma-262/5.1/#sec-13.2.2 具体的な検証コードは以下。 function Foo() { return 1; // &quot;a&quot;やtrueなどでも同じ } // 1を表示（当たり前） alert(Foo()); // [object Object]を表示 alert(new…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Ftakahashikzn.root42.jp%2Fentry%2F20130103%2F1357221043&quot; title=&quot; new演算子のオーバーロード？ - R42日記&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>2013-01-03 22:50:43</published>
  <title> new演算子のオーバーロード？</title>
  <type>rich</type>
  <url>https://takahashikzn.root42.jp/entry/20130103/1357221043</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
