Phát triển Javascript - part 41 doc

Phát triển Javascript - part 41 doc

Phát triển Javascript - part 41 doc

... ptg 374 Server-Side JavaScript with Node.js At this point the property descriptors don’t provide anything we have a doc- umented need for (i.e., the ability to override ... pass the access token "should wait for messages since X-Access-Token": function (test) { this.req.headers = { "x-access-token": "2" }; var chatRoom = this.controller.chatRoom; chatRoom.wai...

Ngày tải lên: 04/07/2014, 22:20

10 74 0
Phát triển Javascript - part 4 docx

Phát triển Javascript - part 4 docx

... digits", date.strftime("%y") === "09"); assert("%F should act as %Y-%m-%d", date.strftime("%F") === "200 9-1 0-0 2"); console.log(assert.count + " tests OK"); } ... test</title> <meta http-equiv="content-type" content="text/html;charset=utf-8"> </head> <body> <script type="...

Ngày tải lên: 04/07/2014, 22:20

10 204 0
Phát triển Javascript - part 7 doc

Phát triển Javascript - part 7 doc

... YUI</title> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> </head> <body class="yui-skin-sam"> <div id="yui-main"><div ... and up-to-date alternatives available today. Common for the in-browser testing frameworks is how they require an HTML fixture file to load the files to test, the testing library (us...

Ngày tải lên: 04/07/2014, 22:20

10 284 0
Phát triển Javascript - part 11 docx

Phát triển Javascript - part 11 docx

... through the array-like object argu- ments. This object has a length property, denoting the number of received arguments, and numeric indexes from 0 to length - 1 corresponding to the ar- guments passed ... ECMAScript, cur- rently a work-in-progress under the name of “Harmony”, is slated to introduce block scope with the let statement. let has been available as a proprietary extension to M...

Ngày tải lên: 04/07/2014, 22:20

10 224 0
Phát triển Javascript - part 13 doc

Phát triển Javascript - part 13 doc

... previous chapter we discussed the theoretical aspects of JavaScript func- tions, familiarizing ourselves with execution contexts and the scope chain. JavaScript supports nested functions, which allows ... Functions 101 6.2 Immediately Called Anonymous Functions A common practice in JavaScript is to create anonymous functions that are imme- diately called. Listing 6.10 shows a typical in...

Ngày tải lên: 04/07/2014, 22:20

10 319 0
Phát triển Javascript - part 16 docx

Phát triển Javascript - part 16 docx

... loop the properties of an object that shadows all the non-enumerable proper- ties on Object.prototype as well as a function that shadows non-enumerable properties on Function.prototype. Any property ... property. When the constructor is used to create new ob- jects, those objects will have an internal [[Prototype]] property that is a refer- ence to the constructor’s prototype property. Second...

Ngày tải lên: 04/07/2014, 22:20

10 246 0
Phát triển Javascript - part 18 docx

Phát triển Javascript - part 18 docx

... as we will see both throughout this chapter and the sample projects in Part III, Real-World Test-Driven Development in JavaScript. From the Library of WoweBook.Com Download from www.eBookTM.com ptg 7.4 ... Object.create Method In Section 7.3, Pseudo-classical Inheritance, we took a dive into JavaScript construc- tors and saw how they allow for a pseudo-classical inheritance model. Unfo...

Ngày tải lên: 04/07/2014, 22:20

10 231 0
Phát triển Javascript - part 23 docx

Phát triển Javascript - part 23 docx

... CSS .js-tabs .section { clear: left; display: none; } .js-tabs .active-panel { display: block; } .js-tabs .nav { border-bottom: 1px solid #bbb; margin: 0 0 6px; overflow: visible; padding: 0; } .js-tabs ... Internet Ex- plorer won’t provide a global ActiveXObject property. For instance, older ver- sions of Opera imitated several aspects of Internet Explorer, such as the propri- etary document...

Ngày tải lên: 04/07/2014, 22:20

10 245 0
Phát triển Javascript - part 27 doc

Phát triển Javascript - part 27 doc

... order, thereby documenting call order as a fea- ture? Call order seems like a sensible feature, so Listing 11.30 adds the test to make sure Observable keeps this behavior. Listing 11.30 Documenting ... is able to recover should an observer fail to meet its require- ments. However, the last test we added makes an assumption on undocumented features of the observable: It assumes that observers...

Ngày tải lên: 04/07/2014, 22:20

10 70 0
Phát triển Javascript - part 29 docx

Phát triển Javascript - part 29 docx

... jsTestDriver.conf to load files in correct order server: http://localhost:4224 load: - lib/stub.js - lib/*.js - src/*.js - test/*.js Next up, we update the test case by elevating the ajax.create stub ... before defining it. This has two benefits: The call time overhead is eliminated, and fea- ture detection becomes built-in. If there is no matching object to create, then there wi...

Ngày tải lên: 04/07/2014, 22:20

10 153 0
Từ khóa:
w