惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

The Register - Security
The Register - Security
云风的 BLOG
云风的 BLOG
U
Unit 42
F
Fortinet All Blogs
The GitHub Blog
The GitHub Blog
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
D
Docker
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
S
Secure Thoughts
Hacker News: Ask HN
Hacker News: Ask HN
Vercel News
Vercel News
S
Security @ Cisco Blogs
GbyAI
GbyAI
Stack Overflow Blog
Stack Overflow Blog
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
I
Intezer
MongoDB | Blog
MongoDB | Blog
AI
AI
MyScale Blog
MyScale Blog
Engineering at Meta
Engineering at Meta
Y
Y Combinator Blog
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
P
Proofpoint News Feed
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
W
WeLiveSecurity
博客园 - 叶小钗
S
SegmentFault 最新的问题
N
News | PayPal Newsroom
WordPress大学
WordPress大学
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
D
DataBreaches.Net
小众软件
小众软件
Microsoft Azure Blog
Microsoft Azure Blog
Spread Privacy
Spread Privacy
H
Help Net Security
美团技术团队
博客园 - 司徒正美
T
Threat Research - Cisco Blogs
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
K
Kaspersky official blog
Application and Cybersecurity Blog
Application and Cybersecurity Blog
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
V
Vulnerabilities – Threatpost
TaoSecurity Blog
TaoSecurity Blog
N
Netflix TechBlog - Medium
L
Lohrmann on Cybersecurity
J
Java Code Geeks
量子位
Martin Fowler
Martin Fowler
博客园_首页

博客园 - 令狐葱★

【备忘】12306购票必杀技 Github上最受关注的前端大牛,快来膜拜吧! Javascript知识点:IIFE - 立即调用函数 那些开源程序中让人叹为观止的代码 - 3 保持元素纵横比 那些开源程序中让人叹为观止的代码 - 2 单例模式 那些开源程序中让人叹为观止的代码 - 1 浏览器特性判断 浏览器中F5和CTRL F5的行为区别 CR, LF, CR/LF区别与关系 利用 jQuery 克隆 Object Chrome下Failed to load resource问题居然是由于AdBlock WordPress在线安装插件 jQuery中的.height()、.innerHeight()和.outerHeight() jQuery中的attr()和prop() jQuery中的事件绑定函数.bind()、.live()、on()和.delegate() Javascript全局变量和delete jQuery中$.proxy()的原理和使用 Javascript基类对象原型中有数组的情况 必须关注的25位知名JavaScript开发者 大坑贴:CSS浏览器兼容性问题及bug汇总
实现ECMAScript 5中的Object.create()函数和Object.getPrototypeOf() 函数
令狐葱★ · 2013-04-26 · via 博客园 - 令狐葱★
function clone(proto) {
    function Dummy() { }
 
    Dummy.prototype             = proto;
    Dummy.prototype.constructor = Dummy;
 
    return new Dummy(); //等价于Object.create(Person);
}
 
var me = clone(Person);

function proto(object) {
    return !object?                null
         : '__proto__' in object?  object.__proto__
         : /* not exposed? */      object.constructor.prototype
}

  更多可以参考这个教程

posted @ 2013-04-26 13:14  令狐葱★  阅读(348)  评论(0)    收藏  举报