Created
May 25, 2011 15:19
-
-
Save kamito/991157 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * app.js | |
| */ | |
| // オブジェクト領域を確保する | |
| goog.provide("app"); | |
| goog.provide("app.Base"); | |
| goog.provide("app.Page"); | |
| goog.require("goog.dom"); // DOM関連ライブラリを読み込む | |
| app.Base = function() { | |
| }; | |
| app.Page = function() { | |
| var content_elm = goog.dom.getElement('content'); // #contentを取得 | |
| goog.dom.setTextContent(content_elm, "Hello! Closure."); // テキストをセット | |
| }; | |
| goog.inherits(app.Page, app.Base); | |
| goog.addSingletonGetter(app.Page); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment