ãããã®æ¥è¨ãå¾ã ã«å¢ãã¦ããã»ã»ã»
ã¨ãããã㧠IE8 ã®æ°æ©è½ãçºè¦ãããå³æ´æ°
- window.sessionStorage window.globalStorage ãã¿ã¼ï¼ï¼ï¼ï¼ï¼
- See Also HTML Standard
- See Also DOM Storage - DOM | MDN
- hashchange ã¤ãã³ãã«å¯¾å¿ï¼HTML5 ã®ã¡ã¼ãªã³ã°ãªã¹ãã§ååãæãã¦ãæ°ããããã©ï¼
- online offline ã¤ãã³ãã«å¯¾å¿
- XDomainRequest ï¼ãªãã XMLHttpRequest level 2 ã«ããªãã£ãã®ãã¨ï¼ry
- window.postMessageï¼cross-document messagingï¼ ãã¿ã¼ï¼ï¼
- See Also HTML Standard
- Selectors API ãã¿ãã¿ãã¿ãã¿ãã¿ãã¿ã¼ã¼ã¼ã¼ã¼ã¼ã¼ã¼ã¼ã¼ã¼ã¼ã¼ã¼ã¼ã¼ã¼ã¼ã¼ã¼ã¼ã¼ï¼ï¼ï¼ï¼
- See Also Selectors API Level 1
- data ã¹ãã¼ã ãµãã¼ã
- ã¿ãããªãã¨ãåºæ¥ãããã«
- element.hasAttribute ã«å¯¾å¿
- element.setAttribute 㧠style ã class ãè¨å®ããå ´åã style ã className ãã¡ããã¨å¤æ´ãããããã«
- iframe.contentDocument ã«å¯¾å¿ï¼ä»ã¾ã§ã¯ iframe.contentWindow.document ã ã£ã
- document.getElementById 㧠name å±æ§ãè¦ã¡ãããã°ã®ä¿®æ£ã大æåå°æåãã¡ããã¨è¦ã¦ãããããã«ãªã£ãã
XDomainRequest ã試ãã¦ã¿ã
nanto_vi ããã«æãã¦ãããã¾ããï¼ï¼
ã¬ã¹ãã³ã¹ããã㧠XDomainRequestAllowed: 1 ãè¿ãã°ã¯ãã¹ãã¡ã¤ã³ã§ã¢ã¯ã»ã¹ã§ããã
以ä¸ãhttp://amachang.art-code.org/amachang.cgi
#! /usr/bin/perl print "Content-type: text/plain\nXDomainRequestAllowed: 1\n\nhoge\n"
ä»¥ä¸ html
var xdr = new XDomainRequest(); xdr.open('GET', 'http://amachang.art-code.org/amachang.cgi'); xdr.send(null); xdr.onload = function() { alert('load') }; xdr.onerror = function() { alert('error') }; xdr.ontimeout = function() { alert('timeout') }; xdr.onprogress = function() { alert('progress') };
postMessage ã試ãã¦ã¿ã
ããããã¾ããããªãï¼ï¼ä½æ
var elm = document.querySelector('#target'); elm.contentWindow.postMessage('hoge')
<body> <iframe id="target" src="a.html"></iframe> </body>
a.html
<body onmessage="alert(event.data)"></body>
試ãããã©å¯¾å¿ãã¦ãªãã£ãæ©è½ä¸è¦§
- Object.prototype.toSource()
- Element ã HTMLElement ã Document ãªã©ã®ã°ãã¼ãã«ãªãªãã¸ã§ã¯ã
- addEventListener
- __proto__
- head è¦ç´ ã®ã¹ã¿ã¤ã«ã® display ããããã£ãå¤ãã¦ã¿ããã©è¡¨ç¤ºããã
- textContent
- XPath