Fecha actual Lun Jun 24, 2019 10:31 am

[JavaScript]Obtener todas las propiedades de un objeto

Las virutas son pequeñísimos elementos de código, de descripcones de algoritmos, del texto de documentos, etc., todos con efectos valiosos, sobre los que debemos efectuar minería (pruebas línea por línea o token por token) para purificarlos y hacerlos reutilizables. Es tal como desenterrar minerales valiosos de entre terrenos (código) aparentemente con poco o nada especial debajo de sí.


Usuarios leyendo este tema: Ninguno

[JavaScript]Obtener todas las propiedades de un objeto

Notapor ~ » Dom Feb 10, 2013 4:18 am

Código: Seleccionar todo
for(var iteradorPropiedades in miObjeto)
{
   //Cada propiedad actual está en iteradorPropiedades.
   //Obtenemos su valor usando miObjeto[iteradorPropiedades]
   ///
    propiedadActual=miObjeto[iteradorPropiedades];
}


Imagen
IP for hosts file (email udocproject@yahoo.com to get updates if website becomes offline):
Código: Seleccionar todo
190.150.9.244 archefire.org



See what I'm doing in real time:
Main Desktop 1
Main Desktop 2
Avatar de Usuario
~
Site Admin
 
Mensajes: 2945
Registrado: Sab Nov 10, 2012 1:04 pm

Re: [JavaScript]Obtener todas las propiedades de un objeto

Notapor ~ » Dom Feb 10, 2013 4:22 am

Para obtener los miembros de document:

Código: Seleccionar todo
<script>

var vr="<pre>";

for(var currProp in document) {
 vr+=("document."+currProp+"="+document[currProp]+"\n");

}

vr+="</pre>";

document.write(vr);
</script>





Resultado:
Código: Seleccionar todo
document.location=file:///C:/index.html
document.querySelector=function querySelector() {
    [native code]
}
document.querySelectorAll=function querySelectorAll() {
    [native code]
}
document.evaluate=function evaluate() {
    [native code]
}
document.createExpression=function createExpression() {
    [native code]
}
document.createNSResolver=function createNSResolver() {
    [native code]
}
document.addEventListener=function addEventListener() {
    [native code]
}
document.removeEventListener=function removeEventListener() {
    [native code]
}
document.dispatchEvent=function dispatchEvent() {
    [native code]
}
document.body=null
document.anchors=[object HTMLCollection]
document.links=[object HTMLCollection]
document.forms=[object HTMLCollection]
document.cookie=
document.images=[object HTMLCollection]
document.domain=
document.designMode=off
document.head=[object HTMLHeadElement]
document.getElementsByName=function getElementsByName() {
    [native code]
}
document.write=function write() {
    [native code]
}
document.writeln=function writeln() {
    [native code]
}
document.getSelection=function getSelection() {
    [native code]
}
document.documentElement=[object HTMLHtmlElement]
document.implementation=[object DOMImplementation]
document.doctype=null
document.documentURI=file:///C:/index.html
document.defaultView=[object Window]
document.title=
document.referrer=
document.activeElement=null
document.onreadystatechange=null
document.onmouseenter=null
document.onmouseleave=null
document.URL=file:///C:/index.html
document.getElementsByTagName=function getElementsByTagName() {
    [native code]
}
document.getElementsByTagNameNS=function getElementsByTagNameNS() {
    [native code]
}
document.getElementById=function getElementById() {
    [native code]
}
document.createDocumentFragment=function createDocumentFragment() {
    [native code]
}
document.createElement=function createElement() {
    [native code]
}
document.createElementNS=function createElementNS() {
    [native code]
}
document.importNode=function importNode() {
    [native code]
}
document.createTextNode=function createTextNode() {
    [native code]
}
document.adoptNode=function adoptNode() {
    [native code]
}
document.createNodeIterator=function createNodeIterator() {
    [native code]
}
document.createEvent=function createEvent() {
    [native code]
}
document.getElementsByClassName=function getElementsByClassName() {
    [native code]
}
document.hasFocus=function hasFocus() {
    [native code]
}
document.elementFromPoint=function elementFromPoint() {
    [native code]
}
document.nodeName=#document
document.nodeValue=null
document.nodeType=9
document.parentNode=null
document.parentElement=null
document.childNodes=[object NodeList]
document.firstChild=[object HTMLHtmlElement]
document.lastChild=[object HTMLHtmlElement]
document.previousSibling=null
document.nextSibling=null
document.attributes=null
document.ownerDocument=null
document.namespaceURI=null
document.prefix=null
document.localName=null
document.baseURI=file:///D:/index.html
document.textContent=null
document.insertBefore=function insertBefore() {
    [native code]
}
document.replaceChild=function replaceChild() {
    [native code]
}
document.removeChild=function removeChild() {
    [native code]
}
document.appendChild=function appendChild() {
    [native code]
}
document.hasChildNodes=function hasChildNodes() {
    [native code]
}
document.cloneNode=function cloneNode() {
    [native code]
}
document.normalize=function normalize() {
    [native code]
}
document.isSupported=function isSupported() {
    [native code]
}
document.hasAttributes=function hasAttributes() {
    [native code]
}
document.compareDocumentPosition=function compareDocumentPosition() {
    [native code]
}
document.lookupPrefix=function lookupPrefix() {
    [native code]
}
document.isDefaultNamespace=function isDefaultNamespace() {
    [native code]
}
document.lookupNamespaceURI=function lookupNamespaceURI() {
    [native code]
}
document.isEqualNode=function isEqualNode() {
    [native code]
}
document.setUserData=function setUserData() {
    [native code]
}
document.getUserData=function getUserData() {
    [native code]
}
document.contains=function contains() {
    [native code]
}
document.createComment=function createComment() {
    [native code]
}
document.createCDATASection=function createCDATASection() {
    [native code]
}
document.createProcessingInstruction=function createProcessingInstruction() {
    [native code]
}
document.createAttribute=function createAttribute() {
    [native code]
}
document.createAttributeNS=function createAttributeNS() {
    [native code]
}
document.inputEncoding=ISO-8859-1
document.createRange=function createRange() {
    [native code]
}
document.createTreeWalker=function createTreeWalker() {
    [native code]
}
document.characterSet=ISO-8859-1
document.dir=ltr
document.readyState=loading
document.lastModified=02/10/2013 04:31:26
document.styleSheets=[object StyleSheetList]
document.preferredStyleSheetSet=
document.selectedStyleSheetSet=
document.lastStyleSheetSet=null
document.styleSheetSets=[object DOMStringList]
document.enableStyleSheetsForSet=function enableStyleSheetsForSet() {
    [native code]
}
document.contentType=text/html
document.mozSyntheticDocument=false
document.currentScript=[object HTMLScriptElement]
document.releaseCapture=function releaseCapture() {
    [native code]
}
document.mozSetImageElement=function mozSetImageElement() {
    [native code]
}
document.mozFullScreenElement=null
document.mozCancelFullScreen=function mozCancelFullScreen() {
    [native code]
}
document.mozFullScreen=false
document.mozFullScreenEnabled=true
document.mozPointerLockElement=null
document.mozExitPointerLock=function mozExitPointerLock() {
    [native code]
}
document.hidden=false
document.mozHidden=false
document.visibilityState=visible
document.mozVisibilityState=visible
document.compatMode=BackCompat
document.ELEMENT_NODE=1
document.ATTRIBUTE_NODE=2
document.TEXT_NODE=3
document.CDATA_SECTION_NODE=4
document.ENTITY_REFERENCE_NODE=5
document.ENTITY_NODE=6
document.PROCESSING_INSTRUCTION_NODE=7
document.COMMENT_NODE=8
document.DOCUMENT_NODE=9
document.DOCUMENT_TYPE_NODE=10
document.DOCUMENT_FRAGMENT_NODE=11
document.NOTATION_NODE=12
document.DOCUMENT_POSITION_DISCONNECTED=1
document.DOCUMENT_POSITION_PRECEDING=2
document.DOCUMENT_POSITION_FOLLOWING=4
document.DOCUMENT_POSITION_CONTAINS=8
document.DOCUMENT_POSITION_CONTAINED_BY=16
document.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC=32
document.embeds=[object HTMLCollection]
document.plugins=[object HTMLCollection]
document.scripts=[object HTMLCollection]
document.getItems=function getItems() {
    [native code]
}
document.open=function open() {
    [native code]
}
document.close=function close() {
    [native code]
}
document.execCommand=function execCommand() {
    [native code]
}
document.queryCommandEnabled=function queryCommandEnabled() {
    [native code]
}
document.queryCommandIndeterm=function queryCommandIndeterm() {
    [native code]
}
document.queryCommandState=function queryCommandState() {
    [native code]
}
document.queryCommandSupported=function queryCommandSupported() {
    [native code]
}
document.queryCommandValue=function queryCommandValue() {
    [native code]
}
document.fgColor=
document.bgColor=
document.linkColor=
document.vlinkColor=
document.alinkColor=
document.applets=[object HTMLCollection]
document.clear=function clear() {
    [native code]
}
document.captureEvents=function captureEvents() {
    [native code]
}
document.releaseEvents=function releaseEvents() {
    [native code]
}
document.routeEvent=function routeEvent() {
    [native code]
}
document.getAnonymousNodes=function getAnonymousNodes() {
    [native code]
}
document.getAnonymousElementByAttribute=function getAnonymousElementByAttribute() {
    [native code]
}
document.addBinding=function addBinding() {
    [native code]
}
document.removeBinding=function removeBinding() {
    [native code]
}
document.getBindingParent=function getBindingParent() {
    [native code]
}
document.loadBindingDocument=function loadBindingDocument() {
    [native code]
}
document.onabort=null
document.onblur=null
document.oncanplay=null
document.oncanplaythrough=null
document.onchange=null
document.onclick=null
document.oncontextmenu=null
document.ondblclick=null
document.ondrag=null
document.ondragend=null
document.ondragenter=null
document.ondragleave=null
document.ondragover=null
document.ondragstart=null
document.ondrop=null
document.ondurationchange=null
document.onemptied=null
document.onended=null
document.onerror=null
document.onfocus=null
document.oninput=null
document.oninvalid=null
document.onkeydown=null
document.onkeypress=null
document.onkeyup=null
document.onload=null
document.onloadeddata=null
document.onloadedmetadata=null
document.onloadstart=null
document.onmousedown=null
document.onmousemove=null
document.onmouseout=null
document.onmouseover=null
document.onmouseup=null
document.onmozfullscreenchange=null
document.onmozfullscreenerror=null
document.onmozpointerlockchange=null
document.onmozpointerlockerror=null
document.onpause=null
document.onplay=null
document.onplaying=null
document.onprogress=null
document.onratechange=null
document.onreset=null
document.onscroll=null
document.onseeked=null
document.onseeking=null
document.onselect=null
document.onshow=null
document.onstalled=null
document.onsubmit=null
document.onsuspend=null
document.ontimeupdate=null
document.onvolumechange=null
document.onwaiting=null
document.onwheel=null
document.oncopy=null
document.oncut=null
document.onpaste=null
document.onbeforescriptexecute=null
document.onafterscriptexecute=null

Imagen
IP for hosts file (email udocproject@yahoo.com to get updates if website becomes offline):
Código: Seleccionar todo
190.150.9.244 archefire.org



See what I'm doing in real time:
Main Desktop 1
Main Desktop 2
Avatar de Usuario
~
Site Admin
 
Mensajes: 2945
Registrado: Sab Nov 10, 2012 1:04 pm

Re: [JavaScript]Obtener todas las propiedades de un objeto

Notapor ~ » Dom Feb 10, 2013 4:30 am

Para los miembros de canvas:

Código: Seleccionar todo
<canvas id="cnv1"></canvas>

<script>

var canva=document.getElementById("cnv1");

var vr="<pre>";

for(var currProp in canva) {
 vr+=("canvas."+currProp+"="+canva[currProp]+"\n");

}

vr+="</pre>";

document.write(vr);
</script>





Código: Seleccionar todo
canvas.querySelector=function querySelector() {
    [native code]
}
canvas.querySelectorAll=function querySelectorAll() {
    [native code]
}
canvas.addEventListener=function addEventListener() {
    [native code]
}
canvas.removeEventListener=function removeEventListener() {
    [native code]
}
canvas.dispatchEvent=function dispatchEvent() {
    [native code]
}
canvas.style=[object CSS2Properties]
canvas.width=300
canvas.height=150
canvas.getContext=function getContext() {
    [native code]
}
canvas.toDataURL=function toDataURL() {
    [native code]
}
canvas.id=cnv1
canvas.title=
canvas.lang=
canvas.dir=
canvas.className=
canvas.dataset=[object DOMStringMap]
canvas.itemScope=false
canvas.itemId=
canvas.properties=[object HTMLPropertiesCollection]
canvas.hidden=false
canvas.tabIndex=-1
canvas.accessKey=
canvas.accessKeyLabel=
canvas.draggable=false
canvas.contentEditable=inherit
canvas.isContentEditable=false
canvas.contextMenu=null
canvas.spellcheck=false
canvas.innerHTML=
canvas.outerHTML=
canvas.offsetParent=[object HTMLBodyElement]
canvas.offsetTop=8
canvas.offsetLeft=8
canvas.offsetWidth=300
canvas.offsetHeight=150
canvas.click=function click() {
    [native code]
}
canvas.focus=function focus() {
    [native code]
}
canvas.tagName=CANVAS
canvas.onmouseenter=null
canvas.onmouseleave=null
canvas.scrollTop=0
canvas.scrollLeft=0
canvas.scrollHeight=150
canvas.scrollWidth=300
canvas.clientTop=0
canvas.clientLeft=0
canvas.clientHeight=150
canvas.clientWidth=300
canvas.firstElementChild=null
canvas.lastElementChild=null
canvas.previousElementSibling=null
canvas.nextElementSibling=[object HTMLScriptElement]
canvas.childElementCount=0
canvas.children=[object HTMLCollection]
canvas.classList=
canvas.removeAttributeNS=function removeAttributeNS() {
    [native code]
}
canvas.removeAttribute=function removeAttribute() {
    [native code]
}
canvas.getAttribute=function getAttribute() {
    [native code]
}
canvas.getElementsByTagName=function getElementsByTagName() {
    [native code]
}
canvas.setAttribute=function setAttribute() {
    [native code]
}
canvas.getElementsByTagNameNS=function getElementsByTagNameNS() {
    [native code]
}
canvas.hasAttributeNS=function hasAttributeNS() {
    [native code]
}
canvas.setAttributeNS=function setAttributeNS() {
    [native code]
}
canvas.hasAttribute=function hasAttribute() {
    [native code]
}
canvas.getAttributeNS=function getAttributeNS() {
    [native code]
}
canvas.getElementsByClassName=function getElementsByClassName() {
    [native code]
}
canvas.getClientRects=function getClientRects() {
    [native code]
}
canvas.getBoundingClientRect=function getBoundingClientRect() {
    [native code]
}
canvas.setCapture=function setCapture() {
    [native code]
}
canvas.releaseCapture=function releaseCapture() {
    [native code]
}
canvas.mozMatchesSelector=function mozMatchesSelector() {
    [native code]
}
canvas.nodeName=CANVAS
canvas.nodeValue=null
canvas.nodeType=1
canvas.parentNode=[object HTMLBodyElement]
canvas.parentElement=[object HTMLBodyElement]
canvas.childNodes=[object NodeList]
canvas.firstChild=null
canvas.lastChild=null
canvas.previousSibling=null
canvas.nextSibling=[object Text]
canvas.attributes=[object NamedNodeMap]
canvas.ownerDocument=[object HTMLDocument]
canvas.namespaceURI=http://www.w3.org/1999/xhtml
canvas.prefix=null
canvas.localName=canvas
canvas.baseURI=file:///C:/index.html
canvas.textContent=
canvas.insertBefore=function insertBefore() {
    [native code]
}
canvas.replaceChild=function replaceChild() {
    [native code]
}
canvas.removeChild=function removeChild() {
    [native code]
}
canvas.appendChild=function appendChild() {
    [native code]
}
canvas.hasChildNodes=function hasChildNodes() {
    [native code]
}
canvas.cloneNode=function cloneNode() {
    [native code]
}
canvas.normalize=function normalize() {
    [native code]
}
canvas.isSupported=function isSupported() {
    [native code]
}
canvas.hasAttributes=function hasAttributes() {
    [native code]
}
canvas.compareDocumentPosition=function compareDocumentPosition() {
    [native code]
}
canvas.lookupPrefix=function lookupPrefix() {
    [native code]
}
canvas.isDefaultNamespace=function isDefaultNamespace() {
    [native code]
}
canvas.lookupNamespaceURI=function lookupNamespaceURI() {
    [native code]
}
canvas.isEqualNode=function isEqualNode() {
    [native code]
}
canvas.setUserData=function setUserData() {
    [native code]
}
canvas.getUserData=function getUserData() {
    [native code]
}
canvas.contains=function contains() {
    [native code]
}
canvas.getAttributeNode=function getAttributeNode() {
    [native code]
}
canvas.setAttributeNode=function setAttributeNode() {
    [native code]
}
canvas.removeAttributeNode=function removeAttributeNode() {
    [native code]
}
canvas.getAttributeNodeNS=function getAttributeNodeNS() {
    [native code]
}
canvas.setAttributeNodeNS=function setAttributeNodeNS() {
    [native code]
}
canvas.scrollLeftMax=0
canvas.scrollTopMax=0
canvas.mozRequestFullScreen=function mozRequestFullScreen() {
    [native code]
}
canvas.mozRequestPointerLock=function mozRequestPointerLock() {
    [native code]
}
canvas.itemType=
canvas.itemValue=null
canvas.itemProp=
canvas.itemRef=
canvas.blur=function blur() {
    [native code]
}
canvas.insertAdjacentHTML=function insertAdjacentHTML() {
    [native code]
}
canvas.scrollIntoView=function scrollIntoView() {
    [native code]
}
canvas.mozOpaque=false
canvas.mozGetAsFile=function mozGetAsFile() {
    [native code]
}
canvas.toBlob=function toBlob() {
    [native code]
}
canvas.MozGetIPCContext=function MozGetIPCContext() {
    [native code]
}
canvas.mozFetchAsStream=function mozFetchAsStream() {
    [native code]
}
canvas.mozPrintCallback=null
canvas.ELEMENT_NODE=1
canvas.ATTRIBUTE_NODE=2
canvas.TEXT_NODE=3
canvas.CDATA_SECTION_NODE=4
canvas.ENTITY_REFERENCE_NODE=5
canvas.ENTITY_NODE=6
canvas.PROCESSING_INSTRUCTION_NODE=7
canvas.COMMENT_NODE=8
canvas.DOCUMENT_NODE=9
canvas.DOCUMENT_TYPE_NODE=10
canvas.DOCUMENT_FRAGMENT_NODE=11
canvas.NOTATION_NODE=12
canvas.DOCUMENT_POSITION_DISCONNECTED=1
canvas.DOCUMENT_POSITION_PRECEDING=2
canvas.DOCUMENT_POSITION_FOLLOWING=4
canvas.DOCUMENT_POSITION_CONTAINS=8
canvas.DOCUMENT_POSITION_CONTAINED_BY=16
canvas.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC=32
canvas.onabort=null
canvas.onblur=null
canvas.oncanplay=null
canvas.oncanplaythrough=null
canvas.onchange=null
canvas.onclick=null
canvas.oncontextmenu=null
canvas.ondblclick=null
canvas.ondrag=null
canvas.ondragend=null
canvas.ondragenter=null
canvas.ondragleave=null
canvas.ondragover=null
canvas.ondragstart=null
canvas.ondrop=null
canvas.ondurationchange=null
canvas.onemptied=null
canvas.onended=null
canvas.onerror=null
canvas.onfocus=null
canvas.oninput=null
canvas.oninvalid=null
canvas.onkeydown=null
canvas.onkeypress=null
canvas.onkeyup=null
canvas.onload=null
canvas.onloadeddata=null
canvas.onloadedmetadata=null
canvas.onloadstart=null
canvas.onmousedown=null
canvas.onmousemove=null
canvas.onmouseout=null
canvas.onmouseover=null
canvas.onmouseup=null
canvas.onmozfullscreenchange=null
canvas.onmozfullscreenerror=null
canvas.onmozpointerlockchange=null
canvas.onmozpointerlockerror=null
canvas.onpause=null
canvas.onplay=null
canvas.onplaying=null
canvas.onprogress=null
canvas.onratechange=null
canvas.onreset=null
canvas.onscroll=null
canvas.onseeked=null
canvas.onseeking=null
canvas.onselect=null
canvas.onshow=null
canvas.onstalled=null
canvas.onsubmit=null
canvas.onsuspend=null
canvas.ontimeupdate=null
canvas.onvolumechange=null
canvas.onwaiting=null
canvas.onwheel=null
canvas.oncopy=null
canvas.oncut=null
canvas.onpaste=null
canvas.onbeforescriptexecute=null
canvas.onafterscriptexecute=null

Imagen
IP for hosts file (email udocproject@yahoo.com to get updates if website becomes offline):
Código: Seleccionar todo
190.150.9.244 archefire.org



See what I'm doing in real time:
Main Desktop 1
Main Desktop 2
Avatar de Usuario
~
Site Admin
 
Mensajes: 2945
Registrado: Sab Nov 10, 2012 1:04 pm

Re: [JavaScript]Obtener todas las propiedades de un objeto

Notapor ~ » Dom Feb 10, 2013 7:16 am

Para los miembros de context.canvas:

Código: Seleccionar todo
<canvas id="cnv1"></canvas>

<script>

var canva=document.getElementById("cnv1");
var contx=canva.getContext("2d");

var vr="<pre>";

for(var currProp in contx) {
 vr+=("canvasContext."+currProp+"="+contx[currProp]+"\n");

}

vr+="</pre>";

document.write(vr);
</script>






Código: Seleccionar todo
canvasContext.save=function save() {
    [native code]
}
canvasContext.restore=function restore() {
    [native code]
}
canvasContext.scale=function scale() {
    [native code]
}
canvasContext.rotate=function rotate() {
    [native code]
}
canvasContext.translate=function translate() {
    [native code]
}
canvasContext.transform=function transform() {
    [native code]
}
canvasContext.setTransform=function setTransform() {
    [native code]
}
canvasContext.createLinearGradient=function createLinearGradient() {
    [native code]
}
canvasContext.createRadialGradient=function createRadialGradient() {
    [native code]
}
canvasContext.createPattern=function createPattern() {
    [native code]
}
canvasContext.clearRect=function clearRect() {
    [native code]
}
canvasContext.fillRect=function fillRect() {
    [native code]
}
canvasContext.strokeRect=function strokeRect() {
    [native code]
}
canvasContext.beginPath=function beginPath() {
    [native code]
}
canvasContext.fill=function fill() {
    [native code]
}
canvasContext.stroke=function stroke() {
    [native code]
}
canvasContext.clip=function clip() {
    [native code]
}
canvasContext.isPointInPath=function isPointInPath() {
    [native code]
}
canvasContext.isPointInStroke=function isPointInStroke() {
    [native code]
}
canvasContext.fillText=function fillText() {
    [native code]
}
canvasContext.strokeText=function strokeText() {
    [native code]
}
canvasContext.measureText=function measureText() {
    [native code]
}
canvasContext.drawImage=function drawImage() {
    [native code]
}
canvasContext.createImageData=function createImageData() {
    [native code]
}
canvasContext.getImageData=function getImageData() {
    [native code]
}
canvasContext.putImageData=function putImageData() {
    [native code]
}
canvasContext.closePath=function closePath() {
    [native code]
}
canvasContext.moveTo=function moveTo() {
    [native code]
}
canvasContext.lineTo=function lineTo() {
    [native code]
}
canvasContext.quadraticCurveTo=function quadraticCurveTo() {
    [native code]
}
canvasContext.bezierCurveTo=function bezierCurveTo() {
    [native code]
}
canvasContext.arcTo=function arcTo() {
    [native code]
}
canvasContext.rect=function rect() {
    [native code]
}
canvasContext.arc=function arc() {
    [native code]
}
canvasContext.canvas=[object HTMLCanvasElement]
canvasContext.globalAlpha=1
canvasContext.globalCompositeOperation=source-over
canvasContext.strokeStyle=#000000
canvasContext.fillStyle=#000000
canvasContext.shadowOffsetX=0
canvasContext.shadowOffsetY=0
canvasContext.shadowBlur=0
canvasContext.shadowColor=rgba(0, 0, 0, 0)
canvasContext.mozCurrentTransform=1,0,0,1,0,0
canvasContext.mozCurrentTransformInverse=1,0,0,1,0,0
canvasContext.mozFillRule=nonzero
canvasContext.mozDash=null
canvasContext.mozDashOffset=0
canvasContext.mozTextStyle=10px sans-serif
canvasContext.mozImageSmoothingEnabled=true
canvasContext.lineWidth=1
canvasContext.lineCap=butt
canvasContext.lineJoin=miter
canvasContext.miterLimit=10
canvasContext.font=10px sans-serif
canvasContext.textAlign=start
canvasContext.textBaseline=alphabetic
Imagen
IP for hosts file (email udocproject@yahoo.com to get updates if website becomes offline):
Código: Seleccionar todo
190.150.9.244 archefire.org



See what I'm doing in real time:
Main Desktop 1
Main Desktop 2
Avatar de Usuario
~
Site Admin
 
Mensajes: 2945
Registrado: Sab Nov 10, 2012 1:04 pm

Re: [JavaScript]Obtener todas las propiedades de un objeto

Notapor ~ » Lun Feb 11, 2013 4:40 am

Para objetos básicos de WebAudio, que por ahora solo parecen funcionar en Chrome.

Código de Muestra para Obtener los Objetos
Código: Seleccionar todo
<body bgcolor="#aaaaaa">

<script>
var webAudioContext;

var mainNode;

var clip;






// Create a new XMLHttpRequest, that GETs the
// file '/media/js/standalone/libs/gamedev_assets/bg_menu.ogg'.
//
// To properly read this binary file, we'll need
// to specify the responseType of the request as
// an 'arraybuffer'.
//
// Doing this is necessary to work with any kind
// of binary data, like sound files, rather than
// text data.
//
// WARNING: If you don't specify a responseType
// of 'arraybuffer', your browser will try to
// interpret the sound file as text data. This
// could cause your browser to slow to a crawl or
// worse.
//
// Once you have done this, leave the request's
// onload to the below function. This will play
// the sound that you loaded.
//
// Don't worry if you don't understand what this
// code does, we'll be going over it later!
//
// YOUR CODE HERE
var soundRequest = new XMLHttpRequest();

var setup = function() {
   // YOUR CODE HERE

//   soundRequest.open("GET", "/media/js/standalone/libs/gamedev_assets/bg_menu.ogg", true);  //Create a threading/non-blocking connection
   soundRequest.open("GET", "../media/js/standalone/libs/gamedev_assets/bg_menu.ogg", true);  //Create a threading/non-blocking connection
   soundRequest.responseType = "arraybuffer";  //Set the type to ArrayBuffer
   soundRequest.timeout=0;  //Timeout in milseconds (0 to disable)


   soundRequest.onload = function () {

      /*try {*/
         webAudioContext = new webkitAudioContext();

         mainNode = webAudioContext.createGainNode(0);
         mainNode.connect(webAudioContext.destination);

         clip = webAudioContext.createBufferSource();

         webAudioContext.decodeAudioData(soundRequest.response, function (buffer) {
            clip.buffer = buffer;
            clip.gain.value = 1.0;
            clip.connect(mainNode);
            clip.loop = true;
            clip.noteOn(0);
         }, function (data) {});




                        var vr="<pre><b>webkitAudioContext\n_______\n_______\n_______\n</b>";

                        for(var currProp in webAudioContext) {
                         vr+=("webkitAudioContext."+currProp+"="+webAudioContext[currProp]+"\n");

                        }

                        vr+="_______\n_______\n_______\n</pre>";

                        document.write(vr);




                                var vr="<pre><b>        webkitAudioContext.destination\n        _______\n       _______\n       _______\n</b>";

                                for(var currProp in webAudioContext.destination) {
                                 vr+=("     webkitAudioContext.destination."+currProp+"="+webAudioContext.destination[currProp]+"\n");

                                }

                                vr+="       _______\n       _______\n       _______\n</pre>";

                                document.write(vr);




                                var vr="<pre><b>        webkitAudioContext.listener\n        _______\n       _______\n       _______\n</b>";

                                for(var currProp in webAudioContext.listener) {
                                 vr+=("     webkitAudioContext.listener."+currProp+"="+webAudioContext.listener[currProp]+"\n");

                                }

                                vr+="       _______\n       _______\n       _______\n</pre>";

                                document.write(vr);





                        var vr="<pre><b>webkitGainNode\n_______\n_______\n_______\n</b>";

                        for(var currProp in mainNode) {
                         vr+=("webkitGainNode."+currProp+"="+mainNode[currProp]+"\n");

                        }

                        vr+="_______\n_______\n_______\n</pre>";

                        document.write(vr);




                                var vr="<pre><b>        webkitGainNode.gain\n        _______\n       _______\n       _______\n</b>";

                                for(var currProp in mainNode.gain) {
                                 vr+=("     webkitGainNode.gain."+currProp+"="+mainNode.gain[currProp]+"\n");

                                }

                                vr+="       _______\n       _______\n       _______\n</pre>";

                                document.write(vr);





                        var vr="<pre><b>webkitClip\n_______\n_______\n_______\n</b>";

                        for(var currProp in clip) {
                         vr+=("webkitClip."+currProp+"="+clip[currProp]+"\n");

                        }

                        vr+="_______\n_______\n_______\n</pre>";

                        document.write(vr);




                                var vr="<pre><b>        webkitClip.playbackRate\n        _______\n       _______\n       _______\n</b>";

                                for(var currProp in clip.playbackRate) {
                                 vr+=("     webkitClip.playbackRate."+currProp+"="+clip.playbackRate[currProp]+"\n");

                                }

                                vr+="       _______\n       _______\n       _______\n</pre>";

                                document.write(vr);




                                var vr="<pre><b>        webkitClip.gain\n        _______\n       _______\n       _______\n</b>";

                                for(var currProp in clip.gain) {
                                 vr+=("     webkitClip.gain."+currProp+"="+clip.gain[currProp]+"\n");

                                }

                                vr+="       _______\n       _______\n       _______\n</pre>";

                                document.write(vr);
      };
      /*catch(e) {
         console.warn('Web Audio API is not supported in this browser');
      }*/
//   };

   soundRequest.send();
};

setup();

</script>
</body>




webkitAudioContext
Código: Seleccionar todo
webkitAudioContext.oncomplete=null
webkitAudioContext.activeSourceCount=0
webkitAudioContext.listener=[object AudioListener]
webkitAudioContext.sampleRate=48000
webkitAudioContext.currentTime=0
webkitAudioContext.destination=[object AudioDestinationNode]
webkitAudioContext.createBuffer=function createBuffer() { [native code] }
webkitAudioContext.decodeAudioData=function decodeAudioData() { [native code] }
webkitAudioContext.createBufferSource=function createBufferSource() { [native code] }
webkitAudioContext.createMediaStreamDestination=function createMediaStreamDestination() { [native code] }
webkitAudioContext.createGain=function createGain() { [native code] }
webkitAudioContext.createDelay=function createDelay() { [native code] }
webkitAudioContext.createBiquadFilter=function createBiquadFilter() { [native code] }
webkitAudioContext.createWaveShaper=function createWaveShaper() { [native code] }
webkitAudioContext.createPanner=function createPanner() { [native code] }
webkitAudioContext.createConvolver=function createConvolver() { [native code] }
webkitAudioContext.createDynamicsCompressor=function createDynamicsCompressor() { [native code] }
webkitAudioContext.createAnalyser=function createAnalyser() { [native code] }
webkitAudioContext.createScriptProcessor=function createScriptProcessor() { [native code] }
webkitAudioContext.createOscillator=function createOscillator() { [native code] }
webkitAudioContext.createChannelSplitter=function createChannelSplitter() { [native code] }
webkitAudioContext.createChannelMerger=function createChannelMerger() { [native code] }
webkitAudioContext.startRendering=function startRendering() { [native code] }
webkitAudioContext.createGainNode=function createGainNode() { [native code] }
webkitAudioContext.createDelayNode=function createDelayNode() { [native code] }
webkitAudioContext.createJavaScriptNode=function createJavaScriptNode() { [native code] }
webkitAudioContext.createMediaElementSource=function createMediaElementSource() { [native code] }
webkitAudioContext.createMediaStreamSource=function createMediaStreamSource() { [native code] }
webkitAudioContext.createWaveTable=function createWaveTable() { [native code] }



webkitAudioContext.destination
Código: Seleccionar todo
webkitAudioContext.destination.numberOfChannels=2
webkitAudioContext.destination.numberOfOutputs=0
webkitAudioContext.destination.numberOfInputs=1
webkitAudioContext.destination.context=[object AudioContext]
webkitAudioContext.destination.connect=function connect() { [native code] }
webkitAudioContext.destination.disconnect=function disconnect() { [native code] }



webkitAudioContext.listener
Código: Seleccionar todo
webkitAudioContext.listener.speedOfSound=343.3
webkitAudioContext.listener.dopplerFactor=1
webkitAudioContext.listener.setPosition=function setPosition() { [native code] }
webkitAudioContext.listener.setOrientation=function setOrientation() { [native code] }
webkitAudioContext.listener.setVelocity=function setVelocity() { [native code] }



webkitGainNode
Código: Seleccionar todo
webkitGainNode.gain=[object AudioGain]
webkitGainNode.numberOfOutputs=1
webkitGainNode.numberOfInputs=1
webkitGainNode.context=[object AudioContext]
webkitGainNode.connect=function connect() { [native code] }
webkitGainNode.disconnect=function disconnect() { [native code] }



webkitGainNode.gain
Código: Seleccionar todo
webkitGainNode.gain.units=0
webkitGainNode.gain.name=gain
webkitGainNode.gain.defaultValue=1
webkitGainNode.gain.maxValue=1
webkitGainNode.gain.minValue=0
webkitGainNode.gain.value=1
webkitGainNode.gain.setValueAtTime=function setValueAtTime() { [native code] }
webkitGainNode.gain.linearRampToValueAtTime=function linearRampToValueAtTime() { [native code] }
webkitGainNode.gain.exponentialRampToValueAtTime=function exponentialRampToValueAtTime() { [native code] }
webkitGainNode.gain.setTargetAtTime=function setTargetAtTime() { [native code] }
webkitGainNode.gain.cancelScheduledValues=function cancelScheduledValues() { [native code] }
webkitGainNode.gain.setTargetValueAtTime=function setTargetValueAtTime() { [native code] }
webkitGainNode.gain.setValueCurveAtTime=function setValueCurveAtTime() { [native code] }



webkitClip
Código: Seleccionar todo
webkitClip.looping=false
webkitClip.loopEnd=0
webkitClip.loopStart=0
webkitClip.loop=false
webkitClip.playbackRate=[object AudioParam]
webkitClip.gain=[object AudioGain]
webkitClip.playbackState=0
webkitClip.buffer=null
webkitClip.numberOfOutputs=1
webkitClip.numberOfInputs=0
webkitClip.context=[object AudioContext]
webkitClip.start=function start() { [native code] }
webkitClip.stop=function stop() { [native code] }
webkitClip.noteOn=function noteOn() { [native code] }
webkitClip.noteGrainOn=function noteGrainOn() { [native code] }
webkitClip.noteOff=function noteOff() { [native code] }
webkitClip.UNSCHEDULED_STATE=0
webkitClip.SCHEDULED_STATE=1
webkitClip.PLAYING_STATE=2
webkitClip.FINISHED_STATE=3
webkitClip.connect=function connect() { [native code] }
webkitClip.disconnect=function disconnect() { [native code] }



webkitClip.playbackRate
Código: Seleccionar todo
webkitClip.playbackRate.units=0
webkitClip.playbackRate.name=playbackRate
webkitClip.playbackRate.defaultValue=1
webkitClip.playbackRate.maxValue=1024
webkitClip.playbackRate.minValue=0
webkitClip.playbackRate.value=1
webkitClip.playbackRate.setValueAtTime=function setValueAtTime() { [native code] }
webkitClip.playbackRate.linearRampToValueAtTime=function linearRampToValueAtTime() { [native code] }
webkitClip.playbackRate.exponentialRampToValueAtTime=function exponentialRampToValueAtTime() { [native code] }
webkitClip.playbackRate.setTargetAtTime=function setTargetAtTime() { [native code] }
webkitClip.playbackRate.cancelScheduledValues=function cancelScheduledValues() { [native code] }
webkitClip.playbackRate.setTargetValueAtTime=function setTargetValueAtTime() { [native code] }
webkitClip.playbackRate.setValueCurveAtTime=function setValueCurveAtTime() { [native code] }



webkitClip.gain
Código: Seleccionar todo
webkitClip.gain.units=0
webkitClip.gain.name=gain
webkitClip.gain.defaultValue=1
webkitClip.gain.maxValue=1
webkitClip.gain.minValue=0
webkitClip.gain.value=1
webkitClip.gain.setValueAtTime=function setValueAtTime() { [native code] }
webkitClip.gain.linearRampToValueAtTime=function linearRampToValueAtTime() { [native code] }
webkitClip.gain.exponentialRampToValueAtTime=function exponentialRampToValueAtTime() { [native code] }
webkitClip.gain.setTargetAtTime=function setTargetAtTime() { [native code] }
webkitClip.gain.cancelScheduledValues=function cancelScheduledValues() { [native code] }
webkitClip.gain.setTargetValueAtTime=function setTargetValueAtTime() { [native code] }
webkitClip.gain.setValueCurveAtTime=function setValueCurveAtTime() { [native code] }



Con el código original de la página, podríamos usar simplemente mainNode.disconnect() para detener la reproducción.

Para reanudar en donde nos quedamos, podemos simplemente usar mainNode.connect(webAudioContext.destination).
Imagen
IP for hosts file (email udocproject@yahoo.com to get updates if website becomes offline):
Código: Seleccionar todo
190.150.9.244 archefire.org



See what I'm doing in real time:
Main Desktop 1
Main Desktop 2
Avatar de Usuario
~
Site Admin
 
Mensajes: 2945
Registrado: Sab Nov 10, 2012 1:04 pm

Re: [JavaScript]Obtener todas las propiedades de un objeto

Notapor ~ » Mié Feb 13, 2013 11:11 am

Para un elemento img o <img>.

En lugar de crear un objeto de JavaScript, podemos maninpular todas las propiedades de una etiqueta <img> asignando valores y funciones a sus propiedades:


<img onload='alert("/musmove.gif cargado...");' src="/musmove.gif">



Código: Seleccionar todo
<script>

var vr="<pre>";

var img=document.createElement("img");

for(var currProp in img) {
 vr+=("img."+currProp+"="+img[currProp]+"\n").replace("<","&lt;");

}

vr+="</pre>";

document.write(vr);
</script>




Código: Seleccionar todo
<script>

var vr="<pre>";

var img=new Image();

for(var currProp in img) {
 vr+=("img."+currProp+"="+img[currProp]+"\n").replace("<","&lt;");

}

vr+="</pre>";

document.write(vr);
</script>



Código: Seleccionar todo
img.querySelector=function querySelector() {
    [native code]
}
img.querySelectorAll=function querySelectorAll() {
    [native code]
}
img.addEventListener=function addEventListener() {
    [native code]
}
img.removeEventListener=function removeEventListener() {
    [native code]
}
img.dispatchEvent=function dispatchEvent() {
    [native code]
}
img.style=[object CSS2Properties]
img.src=
img.name=
img.height=0
img.width=0
img.complete=true
img.id=
img.title=
img.lang=
img.dir=
img.className=
img.dataset=[object DOMStringMap]
img.itemScope=false
img.itemId=
img.properties=[object HTMLPropertiesCollection]
img.hidden=false
img.tabIndex=-1
img.accessKey=
img.accessKeyLabel=
img.draggable=true
img.contentEditable=inherit
img.isContentEditable=false
img.contextMenu=null
img.spellcheck=false
img.innerHTML=
img.outerHTML=<img>
img.offsetParent=null
img.offsetTop=0
img.offsetLeft=0
img.offsetWidth=0
img.offsetHeight=0
img.click=function click() {
    [native code]
}
img.focus=function focus() {
    [native code]
}
img.tagName=IMG
img.onmouseenter=null
img.onmouseleave=null
img.scrollTop=0
img.scrollLeft=0
img.scrollHeight=0
img.scrollWidth=0
img.clientTop=0
img.clientLeft=0
img.clientHeight=0
img.clientWidth=0
img.firstElementChild=null
img.lastElementChild=null
img.previousElementSibling=null
img.nextElementSibling=null
img.childElementCount=0
img.children=[object HTMLCollection]
img.classList=
img.removeAttributeNS=function removeAttributeNS() {
    [native code]
}
img.removeAttribute=function removeAttribute() {
    [native code]
}
img.getAttribute=function getAttribute() {
    [native code]
}
img.getElementsByTagName=function getElementsByTagName() {
    [native code]
}
img.setAttribute=function setAttribute() {
    [native code]
}
img.getElementsByTagNameNS=function getElementsByTagNameNS() {
    [native code]
}
img.hasAttributeNS=function hasAttributeNS() {
    [native code]
}
img.setAttributeNS=function setAttributeNS() {
    [native code]
}
img.hasAttribute=function hasAttribute() {
    [native code]
}
img.getAttributeNS=function getAttributeNS() {
    [native code]
}
img.getElementsByClassName=function getElementsByClassName() {
    [native code]
}
img.getClientRects=function getClientRects() {
    [native code]
}
img.getBoundingClientRect=function getBoundingClientRect() {
    [native code]
}
img.setCapture=function setCapture() {
    [native code]
}
img.releaseCapture=function releaseCapture() {
    [native code]
}
img.mozMatchesSelector=function mozMatchesSelector() {
    [native code]
}
img.nodeName=IMG
img.nodeValue=null
img.nodeType=1
img.parentNode=null
img.parentElement=null
img.childNodes=[object NodeList]
img.firstChild=null
img.lastChild=null
img.previousSibling=null
img.nextSibling=null
img.attributes=[object NamedNodeMap]
img.ownerDocument=[object HTMLDocument]
img.namespaceURI=http://www.w3.org/1999/xhtml
img.prefix=null
img.localName=img
img.baseURI=file:///C:/index.html
img.textContent=
img.insertBefore=function insertBefore() {
    [native code]
}
img.replaceChild=function replaceChild() {
    [native code]
}
img.removeChild=function removeChild() {
    [native code]
}
img.appendChild=function appendChild() {
    [native code]
}
img.hasChildNodes=function hasChildNodes() {
    [native code]
}
img.cloneNode=function cloneNode() {
    [native code]
}
img.normalize=function normalize() {
    [native code]
}
img.isSupported=function isSupported() {
    [native code]
}
img.hasAttributes=function hasAttributes() {
    [native code]
}
img.compareDocumentPosition=function compareDocumentPosition() {
    [native code]
}
img.lookupPrefix=function lookupPrefix() {
    [native code]
}
img.isDefaultNamespace=function isDefaultNamespace() {
    [native code]
}
img.lookupNamespaceURI=function lookupNamespaceURI() {
    [native code]
}
img.isEqualNode=function isEqualNode() {
    [native code]
}
img.setUserData=function setUserData() {
    [native code]
}
img.getUserData=function getUserData() {
    [native code]
}
img.contains=function contains() {
    [native code]
}
img.getAttributeNode=function getAttributeNode() {
    [native code]
}
img.setAttributeNode=function setAttributeNode() {
    [native code]
}
img.removeAttributeNode=function removeAttributeNode() {
    [native code]
}
img.getAttributeNodeNS=function getAttributeNodeNS() {
    [native code]
}
img.setAttributeNodeNS=function setAttributeNodeNS() {
    [native code]
}
img.scrollLeftMax=0
img.scrollTopMax=0
img.mozRequestFullScreen=function mozRequestFullScreen() {
    [native code]
}
img.mozRequestPointerLock=function mozRequestPointerLock() {
    [native code]
}
img.itemType=
img.itemValue=null
img.itemProp=
img.itemRef=
img.blur=function blur() {
    [native code]
}
img.insertAdjacentHTML=function insertAdjacentHTML() {
    [native code]
}
img.scrollIntoView=function scrollIntoView() {
    [native code]
}
img.alt=
img.crossOrigin=
img.useMap=
img.isMap=false
img.naturalWidth=0
img.naturalHeight=0
img.align=
img.border=
img.hspace=0
img.longDesc=
img.vspace=0
img.lowsrc=
img.x=0
img.y=0
img.ELEMENT_NODE=1
img.ATTRIBUTE_NODE=2
img.TEXT_NODE=3
img.CDATA_SECTION_NODE=4
img.ENTITY_REFERENCE_NODE=5
img.ENTITY_NODE=6
img.PROCESSING_INSTRUCTION_NODE=7
img.COMMENT_NODE=8
img.DOCUMENT_NODE=9
img.DOCUMENT_TYPE_NODE=10
img.DOCUMENT_FRAGMENT_NODE=11
img.NOTATION_NODE=12
img.DOCUMENT_POSITION_DISCONNECTED=1
img.DOCUMENT_POSITION_PRECEDING=2
img.DOCUMENT_POSITION_FOLLOWING=4
img.DOCUMENT_POSITION_CONTAINS=8
img.DOCUMENT_POSITION_CONTAINED_BY=16
img.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC=32
img.onabort=null
img.onblur=null
img.oncanplay=null
img.oncanplaythrough=null
img.onchange=null
img.onclick=null
img.oncontextmenu=null
img.ondblclick=null
img.ondrag=null
img.ondragend=null
img.ondragenter=null
img.ondragleave=null
img.ondragover=null
img.ondragstart=null
img.ondrop=null
img.ondurationchange=null
img.onemptied=null
img.onended=null
img.onerror=null
img.onfocus=null
img.oninput=null
img.oninvalid=null
img.onkeydown=null
img.onkeypress=null
img.onkeyup=null
img.onload=null
img.onloadeddata=null
img.onloadedmetadata=null
img.onloadstart=null
img.onmousedown=null
img.onmousemove=null
img.onmouseout=null
img.onmouseover=null
img.onmouseup=null
img.onmozfullscreenchange=null
img.onmozfullscreenerror=null
img.onmozpointerlockchange=null
img.onmozpointerlockerror=null
img.onpause=null
img.onplay=null
img.onplaying=null
img.onprogress=null
img.onratechange=null
img.onreset=null
img.onscroll=null
img.onseeked=null
img.onseeking=null
img.onselect=null
img.onshow=null
img.onstalled=null
img.onsubmit=null
img.onsuspend=null
img.ontimeupdate=null
img.onvolumechange=null
img.onwaiting=null
img.onwheel=null
img.oncopy=null
img.oncut=null
img.onpaste=null
img.onbeforescriptexecute=null
img.onafterscriptexecute=null

Imagen
IP for hosts file (email udocproject@yahoo.com to get updates if website becomes offline):
Código: Seleccionar todo
190.150.9.244 archefire.org



See what I'm doing in real time:
Main Desktop 1
Main Desktop 2
Avatar de Usuario
~
Site Admin
 
Mensajes: 2945
Registrado: Sab Nov 10, 2012 1:04 pm

Re: [JavaScript]Obtener todas las propiedades de un objeto

Notapor ~ » Sab Mar 02, 2013 2:52 pm

Pregunta: Si creamos un objeto Image con JavaScript y presionamos Esc en el navegador para cancelar la carga del contenido de la página, y si estamos cargando imágenes como parte de los recursos de una aplicación, ¿se interrumpe la descarga?
Imagen
IP for hosts file (email udocproject@yahoo.com to get updates if website becomes offline):
Código: Seleccionar todo
190.150.9.244 archefire.org



See what I'm doing in real time:
Main Desktop 1
Main Desktop 2
Avatar de Usuario
~
Site Admin
 
Mensajes: 2945
Registrado: Sab Nov 10, 2012 1:04 pm

Re: [JavaScript]Obtener todas las propiedades de un objeto

Notapor ~ » Lun Mar 18, 2013 3:23 pm

Las siguientes son todas las propiedades obtenidas de un evento keyup capturado con addEventListener, y corriendo bajo Firefox 20:

Código: Seleccionar todo
keybEvent.type == keyup
keybEvent.target == [object HTMLBodyElement]
keybEvent.currentTarget == [object HTMLDocument]
keybEvent.eventPhase == 3
keybEvent.bubbles == true
keybEvent.cancelable == true
keybEvent.timeStamp == 238246781
keybEvent.defaultPrevented == true
keybEvent.stopPropagation == function stopPropagation() {
    [native code]
}
keybEvent.preventDefault == function preventDefault() {
    [native code]
}
keybEvent.initEvent == function initEvent() {
    [native code]
}
keybEvent.stopImmediatePropagation == function stopImmediatePropagation() {
    [native code]
}
keybEvent.which == 97
keybEvent.rangeParent == [object Text]
keybEvent.rangeOffset == 0
keybEvent.pageX == 0
keybEvent.pageY == 0
keybEvent.isChar == false
keybEvent.charCode == 0
keybEvent.keyCode == 97
keybEvent.altKey == false
keybEvent.ctrlKey == false
keybEvent.shiftKey == false
keybEvent.metaKey == false
keybEvent.location == 3
keybEvent.initKeyEvent == function initKeyEvent() {
    [native code]
}
keybEvent.getModifierState == function getModifierState() {
    [native code]
}
keybEvent.originalTarget == [object HTMLBodyElement]
keybEvent.explicitOriginalTarget == [object HTMLBodyElement]
keybEvent.preventBubble == function preventBubble() {
    [native code]
}
keybEvent.preventCapture == function preventCapture() {
    [native code]
}
keybEvent.getPreventDefault == function getPreventDefault() {
    [native code]
}
keybEvent.isTrusted == true
keybEvent.view == [object Window]
keybEvent.detail == 0
keybEvent.initUIEvent == function initUIEvent() {
    [native code]
}
keybEvent.layerX == 0
keybEvent.layerY == 0
keybEvent.cancelBubble == false
keybEvent.NONE == 0
keybEvent.CAPTURING_PHASE == 1
keybEvent.AT_TARGET == 2
keybEvent.BUBBLING_PHASE == 3
keybEvent.MOUSEDOWN == 1
keybEvent.MOUSEUP == 2
keybEvent.MOUSEOVER == 4
keybEvent.MOUSEOUT == 8
keybEvent.MOUSEMOVE == 16
keybEvent.MOUSEDRAG == 32
keybEvent.CLICK == 64
keybEvent.DBLCLICK == 128
keybEvent.KEYDOWN == 256
keybEvent.KEYUP == 512
keybEvent.KEYPRESS == 1024
keybEvent.DRAGDROP == 2048
keybEvent.FOCUS == 4096
keybEvent.BLUR == 8192
keybEvent.SELECT == 16384
keybEvent.CHANGE == 32768
keybEvent.RESET == 65536
keybEvent.SUBMIT == 131072
keybEvent.SCROLL == 262144
keybEvent.LOAD == 524288
keybEvent.UNLOAD == 1048576
keybEvent.XFER_DONE == 2097152
keybEvent.ABORT == 4194304
keybEvent.ERROR == 8388608
keybEvent.LOCATE == 16777216
keybEvent.MOVE == 33554432
keybEvent.RESIZE == 67108864
keybEvent.FORWARD == 134217728
keybEvent.HELP == 268435456
keybEvent.BACK == 536870912
keybEvent.TEXT == 1073741824
keybEvent.ALT_MASK == 1
keybEvent.CONTROL_MASK == 2
keybEvent.SHIFT_MASK == 4
keybEvent.META_MASK == 8
keybEvent.SCROLL_PAGE_UP == -32768
keybEvent.SCROLL_PAGE_DOWN == 32768
keybEvent.DOM_VK_CANCEL == 3
keybEvent.DOM_VK_HELP == 6
keybEvent.DOM_VK_BACK_SPACE == 8
keybEvent.DOM_VK_TAB == 9
keybEvent.DOM_VK_CLEAR == 12
keybEvent.DOM_VK_RETURN == 13
keybEvent.DOM_VK_ENTER == 14
keybEvent.DOM_VK_SHIFT == 16
keybEvent.DOM_VK_CONTROL == 17
keybEvent.DOM_VK_ALT == 18
keybEvent.DOM_VK_PAUSE == 19
keybEvent.DOM_VK_CAPS_LOCK == 20
keybEvent.DOM_VK_KANA == 21
keybEvent.DOM_VK_HANGUL == 21
keybEvent.DOM_VK_EISU == 22
keybEvent.DOM_VK_JUNJA == 23
keybEvent.DOM_VK_FINAL == 24
keybEvent.DOM_VK_HANJA == 25
keybEvent.DOM_VK_KANJI == 25
keybEvent.DOM_VK_ESCAPE == 27
keybEvent.DOM_VK_CONVERT == 28
keybEvent.DOM_VK_NONCONVERT == 29
keybEvent.DOM_VK_ACCEPT == 30
keybEvent.DOM_VK_MODECHANGE == 31
keybEvent.DOM_VK_SPACE == 32
keybEvent.DOM_VK_PAGE_UP == 33
keybEvent.DOM_VK_PAGE_DOWN == 34
keybEvent.DOM_VK_END == 35
keybEvent.DOM_VK_HOME == 36
keybEvent.DOM_VK_LEFT == 37
keybEvent.DOM_VK_UP == 38
keybEvent.DOM_VK_RIGHT == 39
keybEvent.DOM_VK_DOWN == 40
keybEvent.DOM_VK_SELECT == 41
keybEvent.DOM_VK_PRINT == 42
keybEvent.DOM_VK_EXECUTE == 43
keybEvent.DOM_VK_PRINTSCREEN == 44
keybEvent.DOM_VK_INSERT == 45
keybEvent.DOM_VK_DELETE == 46
keybEvent.DOM_VK_0 == 48
keybEvent.DOM_VK_1 == 49
keybEvent.DOM_VK_2 == 50
keybEvent.DOM_VK_3 == 51
keybEvent.DOM_VK_4 == 52
keybEvent.DOM_VK_5 == 53
keybEvent.DOM_VK_6 == 54
keybEvent.DOM_VK_7 == 55
keybEvent.DOM_VK_8 == 56
keybEvent.DOM_VK_9 == 57
keybEvent.DOM_VK_COLON == 58
keybEvent.DOM_VK_SEMICOLON == 59
keybEvent.DOM_VK_LESS_THAN == 60
keybEvent.DOM_VK_EQUALS == 61
keybEvent.DOM_VK_GREATER_THAN == 62
keybEvent.DOM_VK_QUESTION_MARK == 63
keybEvent.DOM_VK_AT == 64
keybEvent.DOM_VK_A == 65
keybEvent.DOM_VK_B == 66
keybEvent.DOM_VK_C == 67
keybEvent.DOM_VK_D == 68
keybEvent.DOM_VK_E == 69
keybEvent.DOM_VK_F == 70
keybEvent.DOM_VK_G == 71
keybEvent.DOM_VK_H == 72
keybEvent.DOM_VK_I == 73
keybEvent.DOM_VK_J == 74
keybEvent.DOM_VK_K == 75
keybEvent.DOM_VK_L == 76
keybEvent.DOM_VK_M == 77
keybEvent.DOM_VK_N == 78
keybEvent.DOM_VK_O == 79
keybEvent.DOM_VK_P == 80
keybEvent.DOM_VK_Q == 81
keybEvent.DOM_VK_R == 82
keybEvent.DOM_VK_S == 83
keybEvent.DOM_VK_T == 84
keybEvent.DOM_VK_U == 85
keybEvent.DOM_VK_V == 86
keybEvent.DOM_VK_W == 87
keybEvent.DOM_VK_X == 88
keybEvent.DOM_VK_Y == 89
keybEvent.DOM_VK_Z == 90
keybEvent.DOM_VK_WIN == 91
keybEvent.DOM_VK_CONTEXT_MENU == 93
keybEvent.DOM_VK_SLEEP == 95
keybEvent.DOM_VK_NUMPAD0 == 96
keybEvent.DOM_VK_NUMPAD1 == 97
keybEvent.DOM_VK_NUMPAD2 == 98
keybEvent.DOM_VK_NUMPAD3 == 99
keybEvent.DOM_VK_NUMPAD4 == 100
keybEvent.DOM_VK_NUMPAD5 == 101
keybEvent.DOM_VK_NUMPAD6 == 102
keybEvent.DOM_VK_NUMPAD7 == 103
keybEvent.DOM_VK_NUMPAD8 == 104
keybEvent.DOM_VK_NUMPAD9 == 105
keybEvent.DOM_VK_MULTIPLY == 106
keybEvent.DOM_VK_ADD == 107
keybEvent.DOM_VK_SEPARATOR == 108
keybEvent.DOM_VK_SUBTRACT == 109
keybEvent.DOM_VK_DECIMAL == 110
keybEvent.DOM_VK_DIVIDE == 111
keybEvent.DOM_VK_F1 == 112
keybEvent.DOM_VK_F2 == 113
keybEvent.DOM_VK_F3 == 114
keybEvent.DOM_VK_F4 == 115
keybEvent.DOM_VK_F5 == 116
keybEvent.DOM_VK_F6 == 117
keybEvent.DOM_VK_F7 == 118
keybEvent.DOM_VK_F8 == 119
keybEvent.DOM_VK_F9 == 120
keybEvent.DOM_VK_F10 == 121
keybEvent.DOM_VK_F11 == 122
keybEvent.DOM_VK_F12 == 123
keybEvent.DOM_VK_F13 == 124
keybEvent.DOM_VK_F14 == 125
keybEvent.DOM_VK_F15 == 126
keybEvent.DOM_VK_F16 == 127
keybEvent.DOM_VK_F17 == 128
keybEvent.DOM_VK_F18 == 129
keybEvent.DOM_VK_F19 == 130
keybEvent.DOM_VK_F20 == 131
keybEvent.DOM_VK_F21 == 132
keybEvent.DOM_VK_F22 == 133
keybEvent.DOM_VK_F23 == 134
keybEvent.DOM_VK_F24 == 135
keybEvent.DOM_VK_NUM_LOCK == 144
keybEvent.DOM_VK_SCROLL_LOCK == 145
keybEvent.DOM_VK_CIRCUMFLEX == 160
keybEvent.DOM_VK_EXCLAMATION == 161
keybEvent.DOM_VK_DOUBLE_QUOTE == 162
keybEvent.DOM_VK_HASH == 163
keybEvent.DOM_VK_DOLLAR == 164
keybEvent.DOM_VK_PERCENT == 165
keybEvent.DOM_VK_AMPERSAND == 166
keybEvent.DOM_VK_UNDERSCORE == 167
keybEvent.DOM_VK_OPEN_PAREN == 168
keybEvent.DOM_VK_CLOSE_PAREN == 169
keybEvent.DOM_VK_ASTERISK == 170
keybEvent.DOM_VK_PLUS == 171
keybEvent.DOM_VK_PIPE == 172
keybEvent.DOM_VK_HYPHEN_MINUS == 173
keybEvent.DOM_VK_OPEN_CURLY_BRACKET == 174
keybEvent.DOM_VK_CLOSE_CURLY_BRACKET == 175
keybEvent.DOM_VK_TILDE == 176
keybEvent.DOM_VK_COMMA == 188
keybEvent.DOM_VK_PERIOD == 190
keybEvent.DOM_VK_SLASH == 191
keybEvent.DOM_VK_BACK_QUOTE == 192
keybEvent.DOM_VK_OPEN_BRACKET == 219
keybEvent.DOM_VK_BACK_SLASH == 220
keybEvent.DOM_VK_CLOSE_BRACKET == 221
keybEvent.DOM_VK_QUOTE == 222
keybEvent.DOM_VK_META == 224
keybEvent.DOM_VK_ALTGR == 225
keybEvent.DOM_KEY_LOCATION_STANDARD == 0
keybEvent.DOM_KEY_LOCATION_LEFT == 1
keybEvent.DOM_KEY_LOCATION_RIGHT == 2
keybEvent.DOM_KEY_LOCATION_NUMPAD == 3
keybEvent.DOM_KEY_LOCATION_MOBILE == 4
keybEvent.DOM_KEY_LOCATION_JOYSTICK == 5



El código usado para capturar es:
Código: Seleccionar todo
<script type="text/javascrip">
function Break_Emu(e)
{
 e.preventDefault();
 document.getElementById("onkeyup_val").value=(e.keyCode);

    var ev="<pre>";

 for(var prop in e)
 {
    ev+=("keybEvent."+prop+" == "+e[prop]+"\n");
 }

    document.write(ev);


}



document.addEventListener('keyup', Break_Emu, false);
</script>

Imagen
IP for hosts file (email udocproject@yahoo.com to get updates if website becomes offline):
Código: Seleccionar todo
190.150.9.244 archefire.org



See what I'm doing in real time:
Main Desktop 1
Main Desktop 2
Avatar de Usuario
~
Site Admin
 
Mensajes: 2945
Registrado: Sab Nov 10, 2012 1:04 pm


Volver a Virutas de Código

¿Quién está conectado?

Usuarios navegando por este Foro: No hay usuarios registrados visitando el Foro y 7 invitados


cron