Skip to content

Commit

Permalink
PBWebController: Add a script accessor
Browse files Browse the repository at this point in the history
This allows easy access to the window's script object
  • Loading branch information
pieter committed Oct 31, 2008
1 parent 0a40f87 commit db39ff7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
2 changes: 2 additions & 0 deletions PBWebController.h
Expand Up @@ -19,4 +19,6 @@
}

@property (retain) NSString *startFile;

- (WebScriptObject *) script;
@end
7 changes: 7 additions & 0 deletions PBWebController.m
Expand Up @@ -28,6 +28,13 @@ - (void) awakeFromNib
[[view mainFrame] loadRequest:request];
}

- (WebScriptObject *) script
{
return [view windowScriptObject];
}

# pragma mark Delegate methods

- (void) webView:(id) v didFinishLoadForFrame:(id) frame
{
id script = [view windowScriptObject];
Expand Down

0 comments on commit db39ff7

Please sign in to comment.