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

https://chromium.googlesource.com/chromium/blink/+/8fefa5dc50de232902601612bf6429f08779abc9/LayoutTests/fast/dom/call-a-constructor-as-a-function-expected.txt

javascript中部分不能使用call apply调用来重写的构造函数的更多相关文章

  1. Javascript中call函数和apply函数的使用

    Javascript 中call函数和apply的使用: Javascript中的call函数和apply函数是对执行上下文进行切换,是将一个函数从当前执行的上下文切换到另一个对象中执行,例如: so ...

  2. Javascript 中的 call 和 apply

    发表于 2012年02月1日 by 愚人码头   原文链接:http://www.css88.com/archives/4431 JavaScript 中通过call或者apply用来代替另一个对象调 ...

  3. javascript中call函数与apply

    javascript中的call方法使当前对象可以调用另一个对象的方法,即改变this的指向内容 var first_object = { num: 42 }; var second_object = ...

  4. Javascript中函数的四种调用方式

    一.Javascript中函数的几个基本知识点: 1.函数的名字只是一个指向函数的指针,所以即使在不同的执行环境,即不同对象调用这个函数,这个函数指向的仍然是同一个函数. 2.函数中有两个特殊的内部属 ...

  5. javascript 中caller,callee,call,apply 的概念[转载]

    在提到上述的概念之前,首先想说说javascript中函数的隐含参数:arguments Arguments : 该对象代表正在执行的函数和调用它的函数的参数. [function.]argument ...

  6. 理解和运用javascript中的call及apply

    call是为了改变函数上下文context而存在的,换言之,就是改变函数内部this的指向.因为javascript存在[定义时上下文],[运行时上下文]及[上下文]是可以改变的.例如:var fun ...

  7. javascript 中的call和apply

    一.作用及应用场景 call和apply是Function的方法,他的第一个参数是this,第二个是Function的参数.call 和 apply 都是为了改变某个函数运行时的 context 即上 ...

  8. JavaScript中的call()、apply()与bind():

    关于call()与apply(): 在JavaScript中,每个函数都有call与apply(),这两个函数都是用来改变函数体内this的指向,并调用相关的参数. 看一个例子: 定义一个animal ...

  9. 理解JavaScript中的call和apply方法

    call方法 总的来说call()有这几种作用:1.可以借用另一个对象的方法.2.改变this的指向(重要).3.将arguments数组化.下面详细介绍这三种作用: 1.可以借用另一个对象的方法:当 ...

随机推荐

  1. Python基础:1.数据类型(元组)

    提示:python版本为2.7,windows系统 1.元组(Tuple) Tuple,与List类似,但是Tuple一旦初始化之后就不能修改了,没有增加.删除.修改元素. >>> ...

  2. 关于Java基本数据类型

    Java的基本数据类型分为两大类:boolean类型和数字类型.而数值类型又分为整数类型和浮点类型.而整数类型中的字符类型也可以被单独对待. 总共是4类8种. byte类型整数在内存里占8位. -12 ...

  3. select2的基本用法

    公司有个项目需要用到类似百度搜索功能的下拉框,自然想到使用select2. 先看下select2的效果图,如下: 下来简单介绍下这个控件的基本用法,主要简单介绍下远程加载数据: 1.首先引入需要的文件 ...

  4. 20160504-hibernate入门

    关系型数据库与面向对象 模型不匹配(阻抗不匹配) Java面向对象语言,对象模型,其主要概念有:继承.关联.多态等:数据库是关系模型,其主要概念有:表.主键.外键等. 解决办法: 1使用JDBC手工转 ...

  5. 如何在Windows系统上用抓包软件Wireshark截获iPhone等网络通讯数据

    http://www.jb51.net/os/windows/189090.html 今天给大家介绍一种如何在Windows操作系统上使用著名的抓包工具软件Wireshark来截获iPhone.iPa ...

  6. ###《High-level event recognition in unconstrained videos》

    Author: Yu-Gang Jiang, Shih-Fu Chang 事件检测的目标就是自动识别给定视频序列中的感兴趣事件.进行视频事件检测通常很困难,特别是在网络中非限制的视频.在非限制情况下, ...

  7. cocos2d-x实战 C++卷 学习笔记--第7章 动作、特效(一)

    前言: 介绍cocos2d-x中的动作.特效. 动作: 动作(action)包括基本动作和基本动作的组合,这些基本动作有缩放.移动.旋转等,而且这些动作变化的速度也可以设定. 动作类是 Action. ...

  8. Warning: Attempt to present * on * which is already presenting *

    Warning: Attempt to present (要被presented的控制器)  on (哪个控制器来presenting) which is already presenting (已经 ...

  9. [Guava官方文档翻译] 4. 使用Guava Ordering排序 (Ordering Explained)

    本文地址:http://www.cnblogs.com/hamhog/p/3537233.html 示例 assertTrue(byLengthOrdering.reverse().isOrdered ...

  10. 安卓热更新之Nuwa实现步骤

    安卓热更新之Nuwa实现步骤 最近热更新热修复的功能在安卓应用上越发火热,终于我的产品也提出了相应的需求. 经过两天的研究,搞定了这个功能,在这里还要多谢大神们的博客,大神们的原理分析很到位,不过对于 ...