blob: 882af38615aab96cf91f413d8743077f82504446 [file] [log] [blame]
import 'dart:html';
import 'package:chrome/chrome_app.dart' as chrome;
int boundsChange = 100;
/**
* A `hello world` application for Chrome Apps written in Dart.
*
* For more information, see:
* - http://developer.chrome.com/apps/api_index.html
* - https://github.com/dart-gde/chrome.dart
*/
void main() {
querySelector("#text_id").onClick.listen(resizeWindow);
}
void resizeWindow(MouseEvent event) {
chrome.ContentBounds bounds = chrome.app.window.current().getBounds();
bounds.width += boundsChange;
bounds.left -= boundsChange ~/ 2;
chrome.app.window.current().setBounds(bounds);
boundsChange *= -1;
}