You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert
escodegen + esprima で JS のデバッグをしたら捗りそう 以下のようなコードを実行すると console.log([ [1,1,8] [2,1,16] ]); このような結果になる。 [ undefined ] アレレーってなってたんだけど kazuho さんにきいたところ、 [1,1,8][2,1,16] => ([1,1,8])[(2,1,16)] => ([1,1,8])[16] => undefined ってことでした。 こんな時、Perl Monger ならとりあえず B::Deparse することによって解決の糸口をさがすんだけど、そういうの EcmaScript でどうすんすかね、ってなことを kazuho さんにきいたところ、esprima っていう es のパーサーがあるよって教えてもらったので、AST はとりだせたんだけど、AST をみても埒があかな
This document summarizes Mario Heiderich's presentation titled "Locking the Throne Room - How ES5+ will change XSS and Client Side Security" given at BlueHat, Redmond 2011. The presentation discusses how new features in ECMAScript 5 (ES5), such as Object.defineProperty(), can be used to prevent cross-site scripting (XSS) attacks by locking down access to sensitive DOM properties and methods on the
はてなグループの終了日を2020年1月31日(金)に決定しました 以下のエントリの通り、今年末を目処にはてなグループを終了予定である旨をお知らせしておりました。 2019年末を目処に、はてなグループの提供を終了する予定です - はてなグループ日記 このたび、正式に終了日を決定いたしましたので、以下の通りご確認ください。 終了日: 2020年1月31日(金) エクスポート希望申請期限:2020年1月31日(金) 終了日以降は、はてなグループの閲覧および投稿は行えません。日記のエクスポートが必要な方は以下の記事にしたがって手続きをしてください。 はてなグループに投稿された日記データのエクスポートについて - はてなグループ日記 ご利用のみなさまにはご迷惑をおかけいたしますが、どうぞよろしくお願いいたします。 2020-06-25 追記 はてなグループ日記のエクスポートデータは2020年2月28
d8> parseInt(1/0,20) 18 d8> parseInt(!1,16) 250 元ネタはコレ。 http://stackoverflow.com/questions/11340673/why-does-parseint1-0-19-return-18 ふたつ目は中途半端に大きな数字がポンと出てくる方がいいかな…って自分で作ったバージョンだけど、元ネタの方が 1/0 が登場するあたりで良いかも… 第二引数の話でいうと > ['1', '1', '1'].map(parseInt) [ 1, NaN, 1 ] このコメントが秀逸: https://twitter.com/mage_1868/status/770555953619931137
JavaScriptのパフォーマンスを上げる13のテクニック 一部意訳あり。(特に関数についての11と13)。深く理解したい方はスライドや動画を観ることをオススメ。 (元記事) http://www.jonefox.com/blog/2012/07/10/13-javascript-performance-tips/ - 先日、Googleのダニエル・クリフォードは"Google I/O 2012"にて「V8で打ち破るJavaScriptのスピードリミット」と題した素晴らしい講演を行った。その中で彼は、JavaScriptコードで実践できる13のシンプルな最適化手法を紹介している。それらはChromeのV8 JavaScriptエンジンのコンパイルや実行速度を上げ、コードを速くするものだ。彼はそれらについての多くの説明を行なっているが、もしただシンプルTips一覧が欲しいというなら、以下を
最近割と初めてに近いか2回目くらいで、がっつりと Javascript を書いてまして、これまでの minibufexpl プラグインしか入れてない vim だとちょっと開発しづらいのとJavascriptのコーディングを矯正するために lint 等を使用したいので少し環境を整備した。 最終的には以下の5つのツールを導入する。 基盤としている環境は Ubuntu 12.04, vim-gnome vundle minibufexpl.vim Better Javascript Indentation gjslint syntastic vundle プラグイン管理を使う Bundler 的な管理ツールを入れる。 gmarik/vundle · GitHub https://github.com/gmarik/vundle 以前は minibufexpl しか使ってるものが無かったので必要と
Welcome to the JSHint Next preview. JSHint was started over a year ago as a fork of Douglas Crockford's JSLint. Since then the project has transformed into a separate static analysis tool with its own goals and ideals. JSHint Next is the next major iteration of the tool, where we've decided to break away from the past, replacing JSLint's parser with Esprima and rethinking JSHint's architecture. Th
Browser performance guru, Nat Duca, has introduced high resolution timing to JavaScript. Ready to try in Chrome 20, the experimental window.performance.webkitNow() interface provides microsecond resolution and guarantees not to flow backward (monotonically nondecreasing). Microseconds matter Until now, creating a new Date object and querying its time was the only way to measure elapsed time on the
harmony:specification_drafts [ES Wiki] ECMAScript 6thのドラフト版が挙げられている。現在はSeptember 23, 2011のドラフトが最新で、このドラフトの構文部分のみを抜粋してHTML化してみた。 ECMAScript Syntax Grammar 6th Edition / Draft よろしければ、どうぞ。 構文上で、5thとの大きな違いは、 let, constによる変数、定数宣言の導入 AssignmentPatternやBindingPattern辺りが導入されている ...が導入されている 辺りでしょうか。 BindingPattern これは何かっていうと、オブジェクトや配列(Array)の中身の要素を直に変数に入れられるようになる。BindingPatternにはObjectBindingPatternとArrayB
I started working on timbre.js successor, v13.xx. It's almost a full rewrite, so this project page is no longer recent working. The new project page is here: http://mohayonao.github.com/timbre.js/ CAUTION!! The new timbre.js(v13.xx) is not compatible old timbre.js(v12.xx), but you may approve the new version, because that is truly convenient and super awesome than old. See Also: Overview of what's
Your browser doesn't support the features required by impress.js, so you are presented with a simplified version of this presentation. For the best experience please use the latest Chrome, Safari or Firefox browser. '("Kyoto.lisp Tech Talk #1" . "@taiju") 免責 当スライドで使用するLispコードはGaucheにて評価可能です。また、一部でGauche独自のメソッドを利用している箇所もあります。 当スライドでは、JavaScriptとECMAScriptという名前を使っておりますが、厳密に使い分けているわけではありません。文脈によって、適当
以下の20問のconsole.logで何が出力されるか当ててみよう。 var x = {}; console.log(x + 0 == x - 0) var x = []; console.log(x + 0 == x - 0) var x = (function(){}); console.log(x + 0 == x - 0) var x = null; console.log(x + 0 == x - 0) var x = undefined; console.log(x + 0 == x - 0) var x = Infinity; console.log(x + 0 == x - 0) var x = Array; console.log(x + 0 == x - 0) var x = 0; console.log(x + 0 == x - 0) var x = false; c
jQueryは互換性を保ちつつも洗練されたAPIを取り入れているので、新しく書くときは新しいAPIを使った方が良い。 liveとかセレクタの:hoverとかはBad Partsだ。 jQuery.fn.on / jQuery.fn.off live/delegate/bind/click等は滅びた。全てonを使おう。 また、data引数を使う場合は必ずdataをオブジェクトかnullにする。dataが文字列の場合、関数の場合にセレクタ等と区別がつかないからだ。 $("body").on("click", function (event) { alert("Clicked!"); }, false); また、querySelector/querySelectorAllの登場によって、:hover等のjQuery固有のセレクタは滅びた。validなCSSセレクタと、jQueryのメソッドをch
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く