tags:

views:

43

answers:

2

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 property' works.

Thanks.

+2  A: 

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.

David Dorward
+2  A: 

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 at the Mozilla Developer Centre (especially this bit on prototype) for more information.

Steve Harrison