开发者

Understanding PPStream

It's http://kan.pps.tv/web/pps.js

PPStream.prototype.pps_width="400px";

The PPStream is never declared, is this PPStream object purely generated by 'prototype' way? I know how 'prototype开发者_JS百科 property' works.

Thanks.


PPStream is actually declared. It's declared as a function, though, not as a regular variable:

function PPStream (id) {

    var self = this;    

    this.reset = function (pid) 
    {

See Working with Objects on the Mozilla Developer Network (especially this bit on prototype) for more information.


It is declared: function PPStream (id) {

It is just done so using a function declaration instead of a function expression, so it doesn't take place in top-down order.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜