Permalink
Browse files

fuck

  • Loading branch information...
csuwildcat committed Aug 14, 2010
1 parent 064748f commit 3ac864f915474fcce5e514a43d063881a6377201
Showing with 135 additions and 0 deletions.
  1. +11 −0 app.yaml
  2. +11 −0 index.yaml
  3. +50 −0 main.py
  4. 0 static/js/master.js
  5. +63 −0 templates/index.html
View
@@ -0,0 +1,11 @@
+application: engineapp
+version: 1
+runtime: python
+api_version: 1
+
+handlers:
+- url: .*
+ script: main.py
+
+- url: /static
+ static_dir: static
View
@@ -0,0 +1,11 @@
+indexes:
+
+# AUTOGENERATED
+
+# This index.yaml is automatically updated whenever the dev_appserver
+# detects that a new type of query is run. If you want to manage the
+# index.yaml file manually, remove the above marker line (the line
+# saying "# AUTOGENERATED"). If you want to manage some indexes
+# manually, move them above the marker line. The index.yaml file is
+# automatically uploaded to the admin console when you next deploy
+# your application using appcfg.py.
View
50 main.py
@@ -0,0 +1,50 @@
+#!/usr/bin/env python
+#
+# Copyright 2007 Google Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+import cgi
+import datetime
+import os
+import re
+import sys
+import urllib
+import urlparse
+
+from google.appengine.ext import webapp
+from google.appengine.ext.webapp import util
+from google.appengine.ext.webapp import template
+from google.appengine.ext.webapp.util import run_wsgi_app
+
+# Set to true if we want to have our webapp print stack traces, etc
+_DEBUG = True
+
+
+class MainHandler(webapp.RequestHandler):
+
+ def get(self):
+ directory = os.path.dirname(__file__)
+ path = os.path.join(directory, os.path.join('templates', "index.html"))
+ self.response.out.write(template.render(path, "", debug=_DEBUG))
+
+
+def main():
+ application = webapp.WSGIApplication([('/', MainHandler)],
+ debug=True)
+ util.run_wsgi_app(application)
+
+
+if __name__ == '__main__':
+ main()
View
No changes.
View
@@ -0,0 +1,63 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
+ <title>Parent Page</title>
+
+ <script type="text/javascript">
+
+ if(window.top == window){
+
+ var ArkClient = function(options){
+ console.log(options);
+ this.iFrame = document.getElementById(options.iFrame);
+ this.receiveMessage = function (event){
+ console.log("Incoming");
+ if(event.origin !== this.iFrame.src.host)
+ return;
+ console.log("Message for me");
+
+ }
+ window.addEventListener("message",this.receiveMessage,false);
+
+ };
+ ArkClient.prototype.sendMessage = function(call, options, callback){
+
+
+
+ };
+
+ var client = new ArkClient({iframe:'clientPage1'});
+
+ client.sendMessage('test',{},function(data){
+
+ console.log(data);
+
+ });
+
+ }
+
+ if(window.top != window){
+
+ var ArkServer = function(){
+ document.getElementGetById("pageName").innerHTML = "Server";
+ this.receiveMessage = function (event){
+ Console.log("Incoming For Server");
+ Console.log("Message for me");
+ }
+ window.addEventListener("message",this.receiveMessage,false);
+ };
+ }
+
+
+
+ </script>
+
+ </head>
+ <body>
+
+ <h2 id="pageName">Parent page</h2>
+ <iframe id="clientPage1" src="http://localhost:8080/"></iframe>
+
+ </body>
+</html>

0 comments on commit 3ac864f

Please sign in to comment.