Help for this page

Select Code to Download


  1. or download this
    repl.link = function(obj) {
        if (! repl.linkedVars) {
    ...
        } else {
            return undefined
        }
    
  2. or download this
    sub link {
        my ($repl,$obj) = @_;
    ...
            return undef
        };
    };
    
  3. or download this
    package MozRepl::RemoteObject;
    sub new {
    ...
        my ($class, $js) = @_;
        return $class->new( javascript_eval($js)); # assuming that it retu
    +rns an object
    };
    
  4. or download this
    sub DESTROY {
        my ($self) = @_;
    ...
            $self->expr("repl.breakLink($self->{id})");
        };
    };
    
  5. or download this
    repl.breakLink = function(id) {
        delete repl.linkedVars[ id ];
    }
    
  6. or download this
    sub breakLink {
        my ($repl,$id) = @_;
        delete $repl->{linkedVars}->{id};
        
    };
    
  7. or download this
    my $doc_a = MozRepl::RemoteObject->expr('window.document'); # id 42
    my $doc_b = MozRepl::RemoteObject->expr('window.document'); # id 43