Commit Graph

13 Commits

Author SHA1 Message Date
Allan Odgaard
ffd6271a69 Allow disabling TextMate’s JavaScript API for commands with HTML output
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.
2017-07-12 10:35:31 +02:00
Allan Odgaard
6245fa17d5 Introduce ‘reusable’ property to OakHTMLOutputView
This defaults to YES but can be set to NO if an output view should not be re-used (even though no command is currently running).
2016-10-03 22:05:39 +02:00
Allan Odgaard
010bb72375 Add ‘visible’ property to OakHTMLOutputView
This can be observed to learn when the view is hidden, either because the window it is in closes or when it is removed from its superview.
2016-09-27 21:51:55 +02:00
Allan Odgaard
3cf916cf49 Rename loadHTMLString: method to setContent:
The previous name was inspired by WebView’s default API but it sounds like it is just the default implementation with a default baseURL: parameter, hence why I prefer to name it something different.
2016-09-27 21:36:26 +02:00
Allan Odgaard
14782c0aea Remove old custom URL protocol 2016-08-28 13:32:49 +02:00
Allan Odgaard
b598252c58 Add commandIdentifier property to OakHTMLOutputView 2016-08-28 13:32:48 +02:00
Allan Odgaard
c99e65b17c Let OakHTMLOutputView handle the “Stop Task?” warning sheet
This also allows for the sheet to automatically close, should the command exit before the user selects an action.
2016-08-28 13:32:47 +02:00
Allan Odgaard
89c19eff61 Change ‘runningCommand’ getter to ‘isRunningCommand’ 2016-08-21 12:23:40 +02:00
Allan Odgaard
b23163476f Add loadHTMLString: API to HTML output view
This replaces the current HTML shown without adding to the history and will preserve scroll position.
2014-03-29 18:58:52 +07:00
Allan Odgaard
09e5d88437 Refactor OakHTMLOutputView 2014-03-09 10:01:51 +07:00
Allan Odgaard
e4a5db0f3b Only first call to window.close() would have an effect
This is a workaround for https://bugs.webkit.org/show_bug.cgi?id=121232
2013-09-12 23:46:04 +02:00
Jacob Bandes-Storch
e3aa997b06 Use libc++: replace std::tr1 with std 2012-08-28 13:30:20 +02:00
Allan Odgaard
9894969e67 Initial commit 2012-08-09 16:25:56 +02:00