Skip to content

Instantly share code, notes, and snippets.

@esmasui
Created August 6, 2013 11:15
Show Gist options
  • Select an option

  • Save esmasui/6163638 to your computer and use it in GitHub Desktop.

Select an option

Save esmasui/6163638 to your computer and use it in GitHub Desktop.
enchantMOON windowオブジェクトのダンプ
__document = [ null ]
--------
document = [ null ]
--------
scrollY = 0
--------
scrollX = 0
--------
innerHeight = 1024
--------
innerWidth = 768
--------
devicePixelRatio = 1
--------
version = UEI Eagle Version 0.2
--------
buildDate = UEI Eagle Build Date: Jun 19 2013 (13:08:51)
--------
parent = [object global]
--------
performance = [object Object]
--------
console = [object Object]
--------
navigator = [object Object]
--------
CanvasPattern = function CanvasPattern() { [native code] }
--------
CanvasGradient = function CanvasGradient() { [native code] }
--------
NativeCanvas2D = function () { [native code] }
--------
NativeStyle = function () { [native code] }
--------
ArrayBuffer = function ArrayBuffer() { [native code] }
--------
Int8Array = function Int8Array() { [native code] }
--------
Uint8Array = function Uint8Array() { [native code] }
--------
Uint8ClampedArray = function Uint8ClampedArray() { [native code] }
--------
Int16Array = function Int16Array() { [native code] }
--------
Uint16Array = function Uint16Array() { [native code] }
--------
Int32Array = function Int32Array() { [native code] }
--------
Uint32Array = function Uint32Array() { [native code] }
--------
Float32Array = function Float32Array() { [native code] }
--------
Float64Array = function Float64Array() { [native code] }
--------
nativeWindowWrapperClosure = true
--------
window = [object global]
--------
__imageInstances = [object Object]
--------
__timer = [object Object]
--------
setTimeout = function (func,delay,params){return window.__timer.__addEntry(func,delay,false,Array.prototype.slice.call(arguments,2))}
--------
setInterval = function (func,delay,params){return window.__timer.__addEntry(func,delay,true,Array.prototype.slice.call(arguments,2))}
--------
clearTimeout = function (id){delete window.__timer.__timerTable[id];window.__timer.__timerTable[id]=undefined}
--------
clearInterval = function (id){delete window.__timer.__timerTable[id];window.__timer.__timerTable[id]=undefined}
--------
nativeConsoleWrapperClosure = true
--------
__JSDomImpl = [object Object]
--------
attachId = function (id,elm,doc){if(id&&elm&&doc){if(!doc._ids[id]){doc._ids[id]=[]}doc._ids[id].push(elm)}}
--------
detachId = function (id,elm,doc){var elms,i;if(id&&elm&&doc){if(doc._ids&&doc._ids[id]){elms=doc._ids[id];for(i=0;i<elms.length;i++){if(elms[i]===elm){elms.splice(i,1);i--}}if(elms.length===0){delete doc._ids[id]}}}}
--------
core = [object Object]
--------
INDEX_SIZE_ERR = 1
--------
DOMSTRING_SIZE_ERR = 2
--------
HIERARCHY_REQUEST_ERR = 3
--------
WRONG_DOCUMENT_ERR = 4
--------
INVALID_CHARACTER_ERR = 5
--------
NO_DATA_ALLOWED_ERR = 6
--------
NO_MODIFICATION_ALLOWED_ERR = 7
--------
NOT_FOUND_ERR = 8
--------
NOT_SUPPORTED_ERR = 9
--------
INUSE_ATTRIBUTE_ERR = 10
--------
ELEMENT_NODE = 1
--------
ATTRIBUTE_NODE = 2
--------
TEXT_NODE = 3
--------
CDATA_SECTION_NODE = 4
--------
ENTITY_REFERENCE_NODE = 5
--------
ENTITY_NODE = 6
--------
PROCESSING_INSTRUCTION_NODE = 7
--------
COMMENT_NODE = 8
--------
DOCUMENT_NODE = 9
--------
DOCUMENT_TYPE_NODE = 10
--------
DOCUMENT_FRAGMENT_NODE = 11
--------
NOTATION_NODE = 12
--------
messages = [object Object]
--------
NodeArray = function (){}
--------
attrCopy = function (src,dest,fn){if(src.attributes){var attrs=src.attributes,i,l=attrs.length,attr,copied;for(i=0;i<l;i++){attr=attrs[i];if(!attr.specified){continue}if(attr.namespaceURI){dest.setAttributeNS(attr.namespaceURI,attr.nodeName,attr.nodeValue);var localName=attr.nodeName.split(":").pop();copied=dest.getAttributeNodeNS(attr.namespaceURI,localName)}else{dest.setAttribute(attr.nodeName,attr.nodeValue);copied=dest.getAttributeNode(attr.nodeName)}if(typeof fn=="function"){fn(attr,copied)}}}return dest}
--------
tagRegEx = /[^\w:\d_\.-]+/i
--------
entRegEx = /[^\w\d_\-&;]+/
--------
invalidAttrRegEx = /[^\w:\d_\.-]+/
--------
INVALID_STATE_ERR = 11
--------
SYNTAX_ERR = 12
--------
INVALID_MODIFICATION_ERR = 13
--------
NAMESPACE_ERR = 14
--------
INVALID_ACCESS_ERR = 15
--------
ns = [object Object]
--------
prevSetNamedItem = function (arg){var prev=core.NamedNodeMap.prototype.setNamedItem.call(this,arg);var p=this._parentNode;arg._ownerElement=p;p._attrModified(arg.name,arg.value,prev&&prev.value||null);p._modified();return prev}
--------
utils = [object Object]
--------
events = [object Object]
--------
getDocument = function getDocument(el){return el.nodeType==core.Node.DOCUMENT_NODE?el:el._ownerDocument}
--------
mutationEventsEnabled = function mutationEventsEnabled(el){return el.nodeType!=core.Node.ATTRIBUTE_NODE&&true}
--------
dispatchAttrEvent = function dispatchAttrEvent(change){return function(_super,args,node){var target=this._parentNode,prev=_super.apply(this,args);if(mutationEventsEnabled(target)){var doc=target._ownerDocument,attrChange=events.MutationEvent.prototype[change],attrName=prev&&prev.name||node.name,prevVal=prev&&prev.value||null,newVal=change=="ADDITION"?node.value:null,ev;if(!newVal||newVal!=prevVal){ev=doc.createEvent("MutationEvents");ev.initMutationEvent("DOMAttrModified",true,false,target,prevVal,newVal,attrName,attrChange);target.dispatchEvent(ev)}}return prev}}
--------
charByEntityName = [object Object]
--------
specialCharEntities = [object Object]
--------
entityRegExp = /&(?:#([0-9]+)|#x([0-9a-f]+)|([a-z0-9]+));/gi
--------
attributeModeSpecialCharRegExp = /["&<>\xA0]/g
--------
nonAttributeModeSpecialCharRegExp = /[&<>\xA0]/g
--------
specialCharToEntity = function specialCharToEntity(s){var entity=specialCharEntities[s];return entity?entity:s}
--------
HTMLDecode = function decode(s){if(!s)return"";return s.replace(entityRegExp,function($0,decimalStr,hexStr,entityName){if(decimalStr){return String.fromCharCode(parseInt(decimalStr,10))}else if(hexStr){return String.fromCharCode(parseInt(hexStr,16))}else{return charByEntityName[entityName]||$0}})}
--------
HtmlToDom = function HtmlToDom(parser){if(parser&&parser.write){this.appendHtmlToElement=function(html,element){var currentElement=element,currentLevel=0;parser.onerror=function(e){};parser.ontext=function(t){var ownerDocument=currentElement.ownerDocument||currentElement;var newText=ownerDocument.createTextNode(t);currentElement.appendChild(newText)};parser.onopentag=function(node){var nodeName=node.name.toLowerCase(),document=currentElement.ownerDocument||currentElement,newElement=document.createElement(nodeName),i=0,length=node.attributes&&node.attributes.length?node.attributes.length:0;for(i in node.attributes){if(node.attributes.hasOwnProperty(i)){newElement.setAttribute(i,node.attributes[i])}}for(i=0;i<node.attributes.length;i++){newElement.setAttribute(i,node.attributes.item(i))}currentElement.appendChild(newElement);currentElement=newElement};parser.onclosetag=function(node){currentElement=currentElement.parentNode};parser.write(html).close();return element}}else if(parser&&(parser.ParseHtml||parser.DefaultHandler)){if(parser.ParseHtml){}else if(parser.DefaultHandler){var handler=new parser.DefaultHandler,parserInstance=new parser.Parser(handler);parser.ParseHtml=function(rawHtml){parserInstance.includeLocation=false;parserInstance.parseComplete(rawHtml);return handler.dom}}this.appendHtmlToElement=function(html,element){if(typeof html!=="string"){html+=""}var parsed=parser.ParseHtml(html);for(var i=0;i<parsed.length;i++){setChild(element,parsed[i])}return element}}else if(parser&&parser.moduleName=="HTML5"){this.appendHtmlToElement=function(html,element){if(typeof html!=="string"){html+=""}if(html.length>0){if(element.nodeType==9){new parser.Parser({document:element}).parse(html)}else{var p=new parser.Parser({document:element.ownerDocument});p.parse_fragment(html,element)}}}}else{this.appendHtmlToElement=function(){console.log("");console.log("###########################################################");console.log("# WARNING: No HTML parser could be found.");console.log("# Element.innerHTML setter support has been disabled");console.log("# Element.innerHTML getter support will still function");console.log("# Download: http://github.com/tautologistics/node-htmlparser");console.log("###########################################################");console.log("")}}}
--------
setChild = function setChild(parent,node){var c,newNode,currentDocument=parent._ownerDocument||parent;switch(node.type){case"tag":case"script":case"style":try{newNode=currentDocument.createElement(node.name);if(node.location){newNode.sourceLocation=node.location;newNode.sourceLocation.file=parent.sourceLocation.file}}catch(err){currentDocument.raise("error","invalid markup",{exception:err,node:node});return null}break;case"text":newNode=currentDocument.createTextNode(/^(?:script|style)$/i.test(parent.nodeName)?node.data:HTMLDecode(node.data));break;case"comment":newNode=currentDocument.createComment(node.data);break;default:return null;break}if(!newNode)return null;if(!node.attribs){node.attribs=node.attributes}if(node.attribs){for(c in node.attribs){try{newNode.setAttribute(c.toLowerCase(),HTMLDecode(node.attribs[c]))}catch(e2){console.log(e2)}}}if(node.children){for(c=0;c<node.children.length;c++){setChild(newNode,node.children[c])}}try{return parent.appendChild(newNode)}catch(err){currentDocument.raise("error",err.message,{exception:err,node:node});return null}}
--------
__HTMLParserImpl = [object Object]
--------
HTMLParserClosure = true
--------
HtmlParserClosure = true
--------
__parseHTMLToElement = function (element,html){html=html.replace(/<![^>]*>/,"");var builder=new __HTMLParserImpl.HtmlBuilder(DefaultBuilderCallback);var parser=new __HTMLParserImpl.Parser(builder);parser.reset();parser.parseComplete(html);if(builder.dom){__JSDomImpl._htmltodom.processParserResult(element,builder.dom);return true}else{console.error("HTML parsing returned no result")}return false}
--------
__parseHTMLFileToDocument = function (htmlContent,location){window.__document=new __JSDomImpl.Document;var result=window.__parseHTMLToElement(window.document,htmlContent)&&(!(typeof window.document.errors=="object")||!(window.document.errors.length>0));var htmlElement=createElementIfNotAvailable(window.document,"html");window.document.body=createElementIfNotAvailable(htmlElement,"body");window.document.head=createElementIfNotAvailable(htmlElement,"head");result=result&&window.document!==undefined&&window.document!==null&&window.document instanceof __JSDomImpl.Document&&document!==undefined&&document!==null&&document instanceof __JSDomImpl.Document&&window.location&&typeof window.location.href==="string"&&typeof window.location.protocol==="string"&&window.document.body instanceof __JSDomImpl.Element&&window.document.head instanceof __JSDomImpl.Element;if(!result){for(var error in window.document.errors){console.error("HTML Error:",window.document.errors[error].message)}}return result}
--------
touchEventsClosure = true
--------
___dispatchTouchEvent = function (action,identifier,pageX,pageY,screenX,screenY,changed,count){var target=undefined;for(var i=0;i<count&&target===undefined;i++){target=window.document.elementFromPoint(pageX[i],pageY[i])}if(target instanceof __JSDomImpl._iframe){for(var i=0;i<count;i++){var relative=target.style.__getElementInternalRelativeCoordinates(pageX[i],pageY[i]);pageX[i]=relative[0];pageY[i]=relative[1]}target.contentWindow.___dispatchTouchEvent(action,identifier,pageX,pageY,screenX,screenY,changed,count);return}if(!target){target=window.document}var touches=[];var targetTouches=[];var changedTouches=[];for(var i=0;i<count;i++){var currentTouch=window.document.createTouch(this,target,identifier[i],pageX[i],pageY[i],screenX[i],screenY[i]);var currentTarget=window.document.elementFromPoint(pageX[i],pageY[i]);touches.push(currentTouch);if(currentTarget===target){targetTouches.push(currentTouch)}if(changed[i]){changedTouches.push(currentTouch)}}var event=document.createEvent("TouchEvent");event.initUIEvent(action,true,true);event.touches=touches;event.targetTouches=targetTouches;event.changedTouches=changedTouches;target.dispatchEvent(event)}
--------
progressEventsClosure = true
--------
messageEventsClosure = true
--------
postMessage = function (message,origin){var messageEvent=new events.MessageEvent("MessageEvent");messageEvent.initMessageEvent("message",false,true,message,origin,window,null,null);window.dispatchEvent(messageEvent)}
--------
DocumentClosure = true
--------
EventException = function (){if(arguments.length>0){this._code=arguments[0]}else{this._code=0}if(arguments.length>1){this._message=arguments[1]}else{this._message="Unspecified event type"}Error.call(this,this._message);if(Error.captureStackTrace){Error.captureStackTrace(this,events.EventException)}}
--------
Event = function (eventType){this._eventType=eventType;this._type=eventType;this._bubbles=null;this._cancelable=null;this._target=null;this._currentTarget=null;this._eventPhase=null;this._timeStamp=null;this._preventDefault=false;this._stopPropagation=false}
--------
UIEvent = function (eventType){events.Event.call(this,eventType);this.view=null;this.detail=null}
--------
MouseEvent = function (eventType){events.UIEvent.call(this,eventType);this.screenX=null;this.screenY=null;this.clientX=null;this.clientY=null;this.ctrlKey=null;this.shiftKey=null;this.altKey=null;this.metaKey=null;this.button=null;this.relatedTarget=null}
--------
MutationEvent = function (eventType){events.Event.call(this,eventType);this.relatedNode=null;this.prevValue=null;this.newValue=null;this.attrName=null;this.attrChange=null}
--------
EventTarget = function (){}
--------
Touch = function (){this.identifier=0;this.target=null;this.screenX=0;this.screenY=0;this.clientX=0;this.clientY=0;this.pageX=0;this.pageY=0;this.radiusX=0;this.radiusY=0;this.rotationAngle=0;this.force=0}
--------
TouchList = function (touches){if(!touches){this.__touches=[]}Object.defineProperty(this,"length",{get:function(){return this.__touches.length}})}
--------
TouchEvent = function (eventType){events.UIEvent.call(this,eventType);this.touches=null;this.targetTouches=null;this.changedTouches=null;this.ctrlKey=false;this.shiftKey=false;this.altKey=false;this.metaKey=false;this.relatedTarget=null}
--------
ProgressEvent = function (eventType,init){events.Event.call(this,eventType);if(init){this.lengthComputable=init.lengthComputable;this.loaded=init.loaded;this.total=init.total}else{this.lengthComputable=false;this.loaded=0;this.total=0}}
--------
MessagePortArray = function (){}
--------
WindowProxy = function (){}
--------
MessageEvent = function (eventType){events.Event.call(this,eventType);this.view=null;this.detail=null}
--------
HTMLElement = function Element(document,tagName){this._ownerDocument=document;core.Node.call(this,document);this._nodeName=tagName;this._tagName=tagName}
--------
getComputedStyle = function (div){var width=div.width;var height=div.height;if("number"!==typeof width){width=0}if("number"!==typeof height){height=0}if(div.innerHTML){var text=div.innerHTML.toString();text=text.replace(/<(br|BR) ?\/?>/g,"<br/>");var _splitText=text.split("<br/>");metricsHeight=0;textMeasuerCVS.font=div.style.font;for(var i=0,l=_splitText.length;i<l;i++){text=_splitText[i];var metrics=textMeasuerCVS.measureText(text);width=Math.max(width,metrics.width);metricsHeight+=metrics.height}height=Math.max(height,metricsHeight)}return{width:width,height:height}}
--------
__timerAnimations = function (currentTime){if("function"===typeof window.__timer.__timerTable[timerId]){if(nextTime<currentTime){window.__timer.__timerTable[timerId]()}else{window.__timerAnimations.push(timerFunction)}}},function (currentTime){if("function"===typeof window.__timer.__timerTable[timerId]){if(nextTime<currentTime){window.__timer.__timerTable[timerId]()}else{window.__timerAnimations.push(timerFunction)}}}
--------
__animations =
--------
__requestTimerAnimationFrame = function (delay,id){var timerFunction=function(nextTime,timerId){return function(currentTime){if("function"===typeof window.__timer.__timerTable[timerId]){if(nextTime<currentTime){window.__timer.__timerTable[timerId]()}else{window.__timerAnimations.push(timerFunction)}}}}(window.performance.now()+delay,id);window.__timerAnimations.push(timerFunction)}
--------
requestAnimationFrame = function (func){window.__animations.push(func)}
--------
scrollTo = function (){}
--------
localStorage = [object Object]
--------
addEventListener = function (type,listener,capturing){this._listeners=this._listeners||{};var listeners=this._listeners[type]||{};capturing=capturing===true;var capturingListeners=listeners[capturing]||[];for(var i=0;i<capturingListeners.length;i++){if(capturingListeners[i]===listener){return}}capturingListeners.push(listener);listeners[capturing]=capturingListeners;this._listeners[type]=listeners}
--------
removeEventListener = function (type,listener,capturing){var listeners=this._listeners&&this._listeners[type];if(!listeners)return;var capturingListeners=listeners[capturing===true];if(!capturingListeners)return;for(var i=0;i<capturingListeners.length;i++){if(capturingListeners[i]===listener){capturingListeners.splice(i,1);return}}}
--------
dispatchEvent = function (event){if(event==null){throw new events.EventException(0,"Null event")}if(event._type==null||event._type==""){throw new events.EventException(0,"Uninitialized event")}var targetList=[];event._target=this;var target=this,targetParent=target._parentNode;while(targetParent){targetList.push(targetParent);target=targetParent;targetParent=target._parentNode}targetParent=target._parentWindow;if(targetParent){targetList.push(targetParent)}var iterator=events.EventTarget.backwardIterator(targetList);event._eventPhase=event.CAPTURING_PHASE;if(!events.EventTarget.dispatch(event,iterator,true))return event._preventDefault;iterator=events.EventTarget.singleIterator(event._target);event._eventPhase=event.AT_TARGET;if(!events.EventTarget.dispatch(event,iterator,false))return event._preventDefault;if(event._bubbles&&!event._stopPropagation){var i=0;iterator=events.EventTarget.forwardIterator(targetList);event._eventPhase=event.BUBBLING_PHASE;events.EventTarget.dispatch(event,iterator,false)}return event._preventDefault}
--------
raise = function (type,message,additional){console.error(type+":",message);for(var key in additional){console.error(additional[key])}}
--------
imageClosure = true
--------
Image = function (){window.HTMLElement.call(this,window.document,"image");this.complete=false;this.__nativeLoad=function(realThis){return function(e){realThis.complete=true;realThis.width=window.__imageInstances[realThis.src].width;realThis.height=window.__imageInstances[realThis.src].height;if(realThis.onload){realThis.onload()}}}(this);this.__nativeFail=function(realThis){return function(e){realThis.complete=false;realThis.width=window.__imageInstances[realThis.src].width;realThis.height=window.__imageInstances[realThis.src].height;if(realThis.onabort){realThis.onabort()}if(realThis.onerror){realThis.onerror()}}}(this)}
--------
audioClosure = true
--------
Audio = function (src){window.HTMLElement.call(this,window.document,"audio");if(src){this.src=src}this.readyState=0;this.currentTime=0;this.volume=1;this.loop=false}
--------
iframeClosure = true
--------
scriptClosure = true
--------
__moon__ = [object Object]
--------
location = [object Object]
--------
__SubEagleCoreManager = [object Object]
--------
_executeScriptFile = function () { [native code] }
--------
prompt = function () { [native code] }
--------
____javaPrompt = [object Object]
--------
XMLHttpRequest = function XMLHttpRequest() { [native code] }
--------
_AudioService = [object Object]
--------
__nativeLoadImage = function () { [native code] }
--------
__javaImageLoader = [object Object]
--------
StylusEvent = function (eventType) {
UIEvent.call(this, eventType);
this.screenX = null;
this.screenY = null;
this.clientX = null;
this.clientY = null;
this.ctrlKey = null;
this.shiftKey = null;
this.altKey = null;
this.metaKey = null;
this.button = null;
this.relatedTarget = null;
}
--------
___dispatchStylusEvent = function (action, screenX, screenY, clientX, clientY, pressure) {
var target = undefined;
if(target == undefined){
target = window.document.elementFromPoint(clientX, clientY);
}
if(target instanceof __JSDomImpl._iframe) {
var relative = target.style.__getElementInternalRelativeCoordinates(clientX,clientY);
clientX = relative[0];
clientY = relative[1];
target.contentWindow.___dispatchStylusEvent(action, screenX, screenY, clientX, clientY, pressure);
return;
}
if(!target) {
target = window.document;
}
var event = document.createEvent('StylusEvents');
event.initStylusEvent(action, screenX, screenY, clientX, clientY, pressure);
target.dispatchEvent(event);
return true;
}
--------
importJS = function importJS(pathes, callback) {
var arg;
try {
arg = JSON.stringify(pathes);
if (!(pathes instanceof Array)) {
throw new Error();
}
} catch (e) {
throw new Error('InvalidArgument');
}
__moon__.invoke('importJS', '1', arg);
callback();
}
--------
stickerStorage = [object Object]
--------
Sticker = function Sticker() {
/**
* It will be called when Sticker is touched.
* @type {Function}
*/
this.ontap = null;
/**
* It will be called when Sticker is stuck.
* @type {Function}
*/
this.onattach = null;
/**
* It will be called when Sticker is unstuck.
* @type {Function}
*/
this.ondetach = null;
}
--------
MOON = [object Object]
--------
io = [object Object]
--------
sticker = [object Object]
--------
message = undefined
--------
n = n
--------
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment