开发者

Understanding PPStream

开发者 https://www.devze.com 2022-12-12 21:22 出处:网络
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开发

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

精彩评论

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