mirror of
https://github.com/textmate/textmate.git
synced 2026-04-28 03:00:34 -04:00
This is done by setting the ‘disableJavaScriptAPI’ key to ‘true’ in the tmCommand file. The rationale behind this is that a command like “HTML → Show Preview” is using the HTML output view with user data which should not have access to the special TextMate JavaScript object, for example a user may have a `<script>` tag that loads JavaScript from a CDN, and such script would effectively have shell access to the user’s machine.
15 lines
726 B
Objective-C
15 lines
726 B
Objective-C
#import "browser/HOBrowserView.h"
|
|
#import <oak/misc.h>
|
|
|
|
PUBLIC @interface OakHTMLOutputView : HOBrowserView
|
|
- (void)loadRequest:(NSURLRequest*)aRequest environment:(std::map<std::string, std::string> const&)anEnvironment autoScrolls:(BOOL)flag;
|
|
- (void)stopLoadingWithUserInteraction:(BOOL)askUserFlag completionHandler:(void(^)(BOOL didStop))handler;
|
|
- (void)setContent:(NSString*)someHTML;
|
|
|
|
@property (nonatomic, readonly) NSString* mainFrameTitle;
|
|
@property (nonatomic) NSUUID* commandIdentifier; // UUID from initial load request
|
|
@property (nonatomic, getter = isRunningCommand, readonly) BOOL runningCommand;
|
|
@property (nonatomic, getter = isReusable) BOOL reusable;
|
|
@property (nonatomic) BOOL disableJavaScriptAPI;
|
|
@end
|