JavaScriptJavaScript Advent Calendar 2011 (オレ標準コース) : ATND2日目にチョンボをして申し訳ありませんでした。7日目は1日目にconstさんがconstについて書いてくれたので僕はletで!ただし、ES.nextのletではなく、現状のMozilla JavaScript (mozjs と略... 続きを読む
This demo is the XNA 3.1 Platformer Starter Kit, compiled from C# to JavaScript. It should run in any browser that supports HTML5 and a modern version of JavaScript, no plugins required. This demo is known to work in IE9, IE10, Firefox 5, and... 続きを読む
In my recent blog post, Chakra: Interoperability Means More Than Just Standards, I explained why IE9 only supports the ECMAScript 5 API for defining getter/setter methods. I also mentioned that it is fairly trivial to define a simple compatib... 続きを読む
Windows Internet Explorer 9 IE9は、IE8までのIEで採用しているJavaScriptゲッターメソッド__defineGetter__およびセッターメソッド__defineSetter__をサポートせずに、ECMAScript 5仕様で定められているゲッターメソッドおよびセッターメソッドの表記のみをサ... 続きを読む
function x(e){if(e.nodeType==9){return""}if(e.hasAttribute("id")){return'id("'+e.getAttribute("id")+'")'}var p=e.parentNode;var t=x(p)+"/"+e.tagName.toLowerCase();var c=p.childNodes;var g=0;var s;for(var i=0,n=c.length;i{if(c[i].nodeName==e.n... 続きを読む
これでできる! クロスブラウザJavaScript入門 第6回 JavaScriptとHTMLとDOMの基本#1 2010年5月24日 太田昌吾 JavaScript, クロスブラウザ, DOM color, サンプル, ハイライト, JavaScript 1 2 こんにちは,太田です。前々回,前回とJavaScriptの基礎的な部分を... 続きを読む
JavaScript | 09:50メモリーリークに関する覚え書きメモリーリークとは コンピュータの動作中に、使用可能なメモリ容量が、だんだん減っていく現象。OSやアプリケーションソフトが、処理のために占有したメモリ領域を、解放しないまま放置してしまうために起き... 続きを読む
Open source Java HTML parser, with DOM, CSS, and jquery-like methods for easy data extraction.jsoup: Java HTML Parser jsoup is a Java library for working with real-world HTML. It provides a very convenient API for extracting and manipulating ... 続きを読む
kyanny’s html5_file_api_ajax_upload_sample at master - GitHubHTML5 の file API というのが面白そうなのでちょっといじってみた。デモを動かすには Plack と JSON と Path::Class が必要です。このブログ読んでる人ならどれも ready for use ですよね。も... 続きを読む
id:hoshikuzu さんが言ってたので書いてみた。こんな感じ↓。コードはすぐ書けたけど、この記事書くのに30分以上かかってる気がする。 javascript:(~~[])[{/...$/({})[~~[]][~~[]]}{/../({})[~~[]][1]}{/...$/({}[{}])[ ~~[]][~~[]]}{/..$/(!{})[~~[]][~~[]]}{/... 続きを読む
On Sunday, somebody with the nickname {g} was on irc.mozilla.org asking about the behavior of setTimeout. In particular, he wanted to divide up work into a bunch of pieces in a way that allowed the user to interact with the page while the wor... 続きを読む
In this article, I'll provide ten small Javascript tips, mainly aimed for beginner and intermediate Javascript developers.It doesn’t matter how many years I’ve been dealing with Javascript – it contains many little things that surprises me... 続きを読む
The xssinterface javascript library enables communication of multiple pages (or pages and iframes) via javascript functions across domain boundaries. This may be useful for websites that want to expose a limited javascript interface to embedd... 続きを読む
非同期パフォーマンス - JavaScriptで遊ぶよ - g:javascript の続き。 JSDeferred の next を img.onerror よりさらに速くするために postMessage が使えるとわかったので、早速書いてみた。 Deferred.next_faster_way_postMessage = function(fun) { var d = n... 続きを読む
色んな方法の非同期的実行で、どれが速いか (呼び出しまでの時間が短いか) を調べてみた。 テスト。 Async performance test 結果。 Chromium Safari Firefox Opera 10.10 Opera 10.50 setTimeout 4.32ms 10.201ms 10.302ms 10.38ms 9.876ms img.onerror 0.199m... 続きを読む
This gist is private. All pages are served over SSL and all pushing and pulling is done over SSH. No one may fork, clone, or view it unless they are given this private URL. Every gist with this icon () is private. This gist is public. Anyone ... 続きを読む
Script obfuscation, filter evasion, IDS/IPS/WAF bypassing... this is where it should live. Because this topic is too big to live anywhere else. Phj33r! 続きを読む
javascript発端はjavascript:alert([].sort.call(null)) これで window オブジェクト取れるのなんで?http://twitter.com/edvakf/status/9222713572という投稿。この不可解な挙動を説明することは案外難しい。まず、ES5のstrict mode以前(つまり、今普通にJavaS... 続きを読む
This is a collection of those very special irregularities, inconstancies and just plain painfully unintuitive moments for the language of the web. 主要なすべてのWebブラウザはJavaScriptエンジンを搭載している。JavaScriptを含んだページをアップし... 続きを読む
HTML Parser The HTML Parser is an implementation of the HTML5 parsing algorithm packaged for CommonJS. It is based on the excellent Validator.nu HTML parser. The parser is compatible with Sizzle which is included in the distribution for conve... 続きを読む