javascript中部分不能使用call apply调用来重写的构造函数
| This tests if TypeError is thrown or not when we call a constructor as a normal function. | |
| On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". | |
| PASS ArrayBuffer() threw exception TypeError: Constructor ArrayBuffer requires 'new'. | |
| SKIP AudioContext is not implemented. | |
| PASS FormData() threw exception TypeError: Failed to construct 'DOMFormData': Please use the 'new' operator, this DOM object constructor cannot be called as a function.. | |
| PASS DataView() threw exception TypeError: Constructor DataView requires 'new'. | |
| PASS EventSource() threw exception TypeError: Failed to construct 'EventSource': Please use the 'new' operator, this DOM object constructor cannot be called as a function.. | |
| PASS FileReader() threw exception TypeError: Failed to construct 'FileReader': Please use the 'new' operator, this DOM object constructor cannot be called as a function.. | |
| PASS Float32Array() threw exception TypeError: Constructor Float32Array requires 'new'. | |
| PASS Float64Array() threw exception TypeError: Constructor Float64Array requires 'new'. | |
| PASS Audio() threw exception TypeError: Failed to construct 'HTMLAudioElement': Please use the 'new' operator, this DOM object constructor cannot be called as a function.. | |
| PASS Image() threw exception TypeError: DOM object constructor cannot be called as a function.. | |
| PASS Option() threw exception TypeError: Failed to construct 'HTMLOptionElement': Please use the 'new' operator, this DOM object constructor cannot be called as a function.. | |
| PASS Int16Array() threw exception TypeError: Constructor Int16Array requires 'new'. | |
| PASS Int32Array() threw exception TypeError: Constructor Int32Array requires 'new'. | |
| PASS Int8Array() threw exception TypeError: Constructor Int8Array requires 'new'. | |
| PASS MessageChannel() threw exception TypeError: Failed to construct 'MessageChannel': Please use the 'new' operator, this DOM object constructor cannot be called as a function.. | |
| PASS SharedWorker() threw exception TypeError: Failed to construct 'SharedWorker': Please use the 'new' operator, this DOM object constructor cannot be called as a function.. | |
| PASS Uint16Array() threw exception TypeError: Constructor Uint16Array requires 'new'. | |
| PASS Uint32Array() threw exception TypeError: Constructor Uint32Array requires 'new'. | |
| PASS Uint8Array() threw exception TypeError: Constructor Uint8Array requires 'new'. | |
| PASS WebKitCSSMatrix() threw exception TypeError: Failed to construct 'CSSMatrix': Please use the 'new' operator, this DOM object constructor cannot be called as a function.. | |
| PASS WebKitPoint() threw exception TypeError: Failed to construct 'DOMPoint': Please use the 'new' operator, this DOM object constructor cannot be called as a function.. | |
| PASS WebSocket() threw exception TypeError: Failed to construct 'WebSocket': Please use the 'new' operator, this DOM object constructor cannot be called as a function.. | |
| PASS Worker() threw exception TypeError: Failed to construct 'Worker': Please use the 'new' operator, this DOM object constructor cannot be called as a function.. | |
| PASS XMLHttpRequest() threw exception TypeError: Failed to construct 'XMLHttpRequest': Please use the 'new' operator, this DOM object constructor cannot be called as a function.. | |
| PASS XSLTProcessor() threw exception TypeError: Failed to construct 'XSLTProcessor': Please use the 'new' operator, this DOM object constructor cannot be called as a function.. | |
| PASS successfullyParsed is true | |
| TEST COMPLETE |
javascript中部分不能使用call apply调用来重写的构造函数的更多相关文章
- Javascript中call函数和apply函数的使用
Javascript 中call函数和apply的使用: Javascript中的call函数和apply函数是对执行上下文进行切换,是将一个函数从当前执行的上下文切换到另一个对象中执行,例如: so ...
- Javascript 中的 call 和 apply
发表于 2012年02月1日 by 愚人码头 原文链接:http://www.css88.com/archives/4431 JavaScript 中通过call或者apply用来代替另一个对象调 ...
- javascript中call函数与apply
javascript中的call方法使当前对象可以调用另一个对象的方法,即改变this的指向内容 var first_object = { num: 42 }; var second_object = ...
- Javascript中函数的四种调用方式
一.Javascript中函数的几个基本知识点: 1.函数的名字只是一个指向函数的指针,所以即使在不同的执行环境,即不同对象调用这个函数,这个函数指向的仍然是同一个函数. 2.函数中有两个特殊的内部属 ...
- javascript 中caller,callee,call,apply 的概念[转载]
在提到上述的概念之前,首先想说说javascript中函数的隐含参数:arguments Arguments : 该对象代表正在执行的函数和调用它的函数的参数. [function.]argument ...
- 理解和运用javascript中的call及apply
call是为了改变函数上下文context而存在的,换言之,就是改变函数内部this的指向.因为javascript存在[定义时上下文],[运行时上下文]及[上下文]是可以改变的.例如:var fun ...
- javascript 中的call和apply
一.作用及应用场景 call和apply是Function的方法,他的第一个参数是this,第二个是Function的参数.call 和 apply 都是为了改变某个函数运行时的 context 即上 ...
- JavaScript中的call()、apply()与bind():
关于call()与apply(): 在JavaScript中,每个函数都有call与apply(),这两个函数都是用来改变函数体内this的指向,并调用相关的参数. 看一个例子: 定义一个animal ...
- 理解JavaScript中的call和apply方法
call方法 总的来说call()有这几种作用:1.可以借用另一个对象的方法.2.改变this的指向(重要).3.将arguments数组化.下面详细介绍这三种作用: 1.可以借用另一个对象的方法:当 ...
随机推荐
- 关于IE调试模式下才能显示效果
要去除console.log() 低版本IE 没有开启调试模式 console.log()会导致报错
- Ubuntu Linux---控制用户权限:root特权/sudo
借了本<Ubuntu Linux指南>开始学学乌邦图吧,熟悉之后再下个红帽来玩玩,现在说说我们一直提到的root,但是在Linux中,这个root有所不同...大多数Linux系统都为一个 ...
- php正则贪婪匹配与非贪婪匹配一些例子
http://www.111cn.net/phper/210/55600.htm 贪婪模式匹配的原则是: 在可匹配也可不匹配的情况下, 优先匹配,直到不能匹配成功的情况下,记录备选状态,并把匹配控制交 ...
- FFMPEG高级编程第一篇:环境搭建及编译
前段时间在翻看电脑里面资料时,发现了以前做的在嵌入式硬件上面运行以ffmepg为基础,以嵌入式硬件解码的多媒体播放工作,发现都快忘记完了.今日得闲整理温习了一下ffmpeg在嵌入式上的运用,这里给大家 ...
- java多线程总结四:volatile、synchronized示例
1.synchronized保证同步 先看一个生成偶数的类 <span style="font-size:16px;">package demo.thread; /** ...
- 第27条:使用“class-continuation分类”隐藏实现细节
Objective-C动态消息系统(参见第11条)的工作方式决定了其不可能实现真正的私有方法或私有实例变量. 匿名分类的特点: 与普通的分类不同,它必须定义在其所接续的那个类的实现文件里. 唯一能声明 ...
- iOS-深复制(mutableCopy)与浅复制(copy)
浅复制:只复制指向对象的指针,而不复制引用对象本身.对于浅复制来说,A和A_copy指向的是同一个内存资源,复制的只是一个指针,对象本身资源还是只有一份(对象引用计数+1),那如果我们对A_copy执 ...
- .Net规则引擎Biztalk,Workflow和CKRule的比较
微软的规则引擎 很多朋友会问,.Net平台有没有规则引擎?像Java就有很多的规则引擎,Drools,ILog都做得非常好,但.Net好像还没有哦.很多知道规则引擎,但不知道.Net的朋友都烦这个 ...
- Server Error The server encountered an error and could not complete your request. 新建站点模版失败
500 Server Error Error: Server Error The server encountered an error and could not complete your req ...
- TLF相关资料
1\(转)http://blog.csdn.net/hu36978/article/details/5796165 TFL 一般先创建TextFlow 通过控制flowComposer属性来控制文本 ...