-
<static> addUserAgentCName() → {Iroha}
-
ブラウザ別の className を <body> 要素に付加する。
- Source:
Returns:
Iroha オブジェクト
-
Type
-
Iroha
-
<static> alreadyApplied(func) → {boolean}
-
return 'true' if the function is already applied.
Parameters:
| Name |
Type |
Description |
func |
Function
|
typically 'arguments.callee' |
- Source:
Returns:
boolean
-
Type
-
boolean
-
<static> barrageShield(func, delay, aThisObject) → {Function}
-
create wrapper function which ignores and unify barraged-function-calls.
Parameters:
| Name |
Type |
Argument |
Default |
Description |
func |
Function
|
|
|
a function which has possibility to be barraged function-calls |
delay |
number
|
<optional>
|
1
|
delay time to ignore barraged function-calls |
aThisObject |
Object
|
<optional>
|
|
the object that will be a global object ('this') in the function |
- Deprecated:
- Source:
Returns:
wrapper function.
-
Type
-
Function
-
<static> debounce(func, delay, aThisObject) → {Function}
-
指定した時間呼ばれなかったら初めて実行される関数を生成する。
Parameters:
| Name |
Type |
Argument |
Description |
func |
Function
|
|
対象となる関数。 |
delay |
number
|
|
最後に呼んでから実行までの時間。単位 ms。 |
aThisObject |
Object
|
<optional>
|
関数内で "this" が指し示すことになるもの |
- Source:
Returns:
指定した時間呼ばれなかったら初めて実行される関数
-
Type
-
Function
-
<static> delay(delay, aThisObject) → {jQuery.Deferred.Promise}
-
指定時間のディレイをかける( Deferred 。指定時間が経過すると resolve される Promise を返す)。
Parameters:
| Name |
Type |
Argument |
Description |
delay |
number
|
|
ディレイする時間。非負整数。単位 ms 。 |
aThisObject |
Object
|
<optional>
|
deferred.done() などの関数内で "this" が指し示すことになるもの |
- Source:
Returns:
jQuery.Deferred.Promise オブジェクト
-
Type
-
jQuery.Deferred.Promise
-
<static> fireShigekix(target) → {Iroha}
-
シゲキックス発動
Parameters:
| Name |
Type |
Description |
target |
jQuery
|
Element
|
string
|
シゲキックスを与える要素ノード |
- Source:
Returns:
Iroha オブジェクト
-
Type
-
Iroha
-
<static> getCommonDir(dirName) → {string}
-
get URL of common directory.
Parameters:
| Name |
Type |
Description |
dirName |
string
|
name of common directory |
- Source:
Returns:
absolute URL of common directory.
-
Type
-
string
-
<static> getGeometry(e, win) → {Iroha.geom}
-
get window geometry and mouse position.
Parameters:
| Name |
Type |
Description |
e |
Event
|
event object - this param exists when this function is called as an event handler. |
win |
Window
|
window object - specify this param to alter window object. |
- Source:
- To Do:
-
- Iroha.getGeometry にいくつかメソッドがぶら下がっているがドキュメント化できないため構造を検討
Returns:
an associative array of geometry properties
-
Type
-
Iroha.geom
-
<static> getLinkTarget(anchor, target) → {jQuery}
-
get an element which is linked from given anchor element in same page.
Parameters:
| Name |
Type |
Argument |
Default |
Description |
anchor |
Element
|
jQuery
|
string
|
|
|
anchor element (a, area). |
target |
string
|
<optional>
|
"_self"
|
target name to assume that given anchor is inner-page link. |
- Source:
- See:
-
- external:jQuery.fn.Iroha_getLinkTarget
Returns:
jQuery indicating an element which is linked from given anchor element.
-
Type
-
jQuery
-
<static> getQuery(serialized) → {Object|Array.<Object>}
-
クエリ文字列を連想配列化したものを得る。
Parameters:
| Name |
Type |
Argument |
Description |
serialized |
string
|
<optional>
|
"serialized" の場合、{ name, value } の連想配列を、クエリ文字列の並び順に収めたシリアライズド配列を得る。 |
- Source:
Returns:
クエリ文字列を連想配列化したオブジェクト、または { name, value } の連想配列をクエリ文字列の並び順に収めたシリアライズド配列。
-
Type
-
Object
|
Array.<Object>
-
<static> getValue(expr, obj) → {Object}
-
get value from deep object directly.
Parameters:
| Name |
Type |
Argument |
Default |
Description |
expr |
string
|
|
|
object expression string to get value |
obj |
Object
|
<optional>
|
window
|
base object of expr |
- Source:
Returns:
any type of value
-
Type
-
Object
-
<static> injectWeinre(ident, base) → {Iroha}
-
Parameters:
| Name |
Type |
Argument |
Default |
Description |
ident |
string
|
<optional>
|
"anonymous"
|
アプリケーション識別子。任意に設定。 |
base |
string
|
<optional>
|
"//{samedomain}:8080"
|
Weinre が稼働している場所。無指定時は表示中の HTML と同じプロトコル・ドメインのポート 8080 番。 |
- Source:
- To Do:
-
- Iroha.injectWeinre にいくつかメソッドがぶら下がっているがドキュメント化できないため構造を検討
Returns:
Iroha オブジェクト
-
Type
-
Iroha
-
<static> openWindow(url, target, option) → {Window}
-
open new window.
Parameters:
| Name |
Type |
Argument |
Default |
Description |
url |
string
|
|
|
url to open in new window |
target |
string
|
<optional>
|
"_blank"
|
window target name |
option |
Object
|
string
|
<optional>
|
|
window options (in string form, or an associative array) |
- Source:
- To Do:
-
- Iroha.openWindow にいくつかメソッドがぶら下がっているがドキュメント化できないため構造を検討
Returns:
new window object
-
Type
-
Window
-
<static> preloadImage(src) → {HTMLImageElement}
-
create Image object (load image).
Parameters:
| Name |
Type |
Description |
src |
string
|
image url to load |
- Source:
Returns:
image object
-
Type
-
HTMLImageElement
-
-
コメントノードを削除 (for IE7 only)
Parameters:
| Name |
Type |
Argument |
Default |
Description |
base |
jQuery
|
Element
|
string
|
<optional>
|
document.body
|
処理の対象範囲とする(DOMツリー的に最上位の)要素ノード。 |
- Source:
Returns:
Iroha オブジェクト
-
Type
-
Iroha
-
<static> setTitleFromAlt(target, base) → {Iroha}
-
img 要素などの alt 属性値を title 属性に設定する。 (IE7とそれ以前のブラウザを除く)
Parameters:
| Name |
Type |
Argument |
Default |
Description |
target |
jQuery
|
Element
|
string
|
<optional>
|
"img, :image, area"
|
処理対象とする(img 要素などの)要素ノード。 |
base |
jQuery
|
Element
|
string
|
<optional>
|
document.body
|
処理の対象範囲とする(DOMツリー的に最上位の)要素ノード。 |
- Source:
Returns:
Iroha オブジェクト
-
Type
-
Iroha
-
<static> setTitleFromInnerText(target, base) → {Iroha}
-
マイナスインデントで隠したテキストを title 属性に設定する
Parameters:
| Name |
Type |
Argument |
Default |
Description |
target |
jQuery
|
Element
|
string
|
<optional>
|
|
処理対象とする要素ノード。 |
base |
jQuery
|
Element
|
string
|
<optional>
|
document.body
|
処理の対象範囲とする(DOMツリー的に最上位の)要素ノード。 |
- Source:
Returns:
Iroha オブジェクト
-
Type
-
Iroha
-
<static> setValue(expr, value, obj) → {Object}
-
set value to deep object directly.
Parameters:
| Name |
Type |
Argument |
Default |
Description |
expr |
string
|
|
|
object expression string to set value |
value |
Object
|
<optional>
|
|
value to set |
obj |
Object
|
<optional>
|
window
|
base object of expr |
- Source:
Returns:
value that set
-
Type
-
Object
-
<static> singleton(_constructor, _arguments) → {Object}
-
create object as single instance. or put existing instance.
Parameters:
| Name |
Type |
Argument |
Description |
_constructor |
Function
|
|
constructor |
_arguments |
Object
|
<optional>
|
arguments for constructor |
- Source:
Returns:
single instance.
-
Type
-
Object
-
<static> throttle(func, wait, aThisObject) → {Function}
-
指定した時間に1度しか実行されない関数を生成する。
Parameters:
| Name |
Type |
Argument |
Description |
func |
Function
|
|
対象となる関数。 |
wait |
number
|
|
制限時間。単位 ms 。 |
aThisObject |
Object
|
<optional>
|
関数内で "this" が指し示すことになるもの |
- Source:
Returns:
実行間隔が制限された関数
-
Type
-
Function
-
<static> trapWheelEvent(node) → {Iroha}
-
マウスホイールイベントを指定要素ノードの領域内にがんばって閉じ込める。これにより領域内のホイール操作ではページスクロールが(ほぼ)発生しなくなる。
Parameters:
| Name |
Type |
Description |
node |
jQuery
|
Element
|
string
|
対象要素ノード。単にセレクタ文字列を与えるのを推奨、その瞬間存在しない要素ノードでも有効に機能させることができるため。 |
- Source:
Returns:
Iroha オブジェクト
-
Type
-
Iroha
-
<static> untrapWheelEvent(node) → {Iroha}
-
マウスホイールイベントの閉じ込め処理を止める。
Parameters:
| Name |
Type |
Description |
node |
jQuery
|
Element
|
string
|
対象要素ノード。 Iroha.trapWheelEvent で指定したものと同形式のもの。例えば、セレクタ文字列で指定していたならセレクタ文字列。 |
- Source:
Returns:
Iroha オブジェクト
-
Type
-
Iroha
-
<static> urlToAnchor(node, tmpl) → {jQuery}
-
指定要素ノードが内包しているすべてのテキスト中の URL らしき文字列をリンクにする。
DOM Range の使えるブラウザでないとエラーになります。
IE8 を含むそれより古い IE では以下のいずれかが必要。(ちなみに、この2つは同居できない)
-
W3C DOM Ranges for IE
-
Rangy
Parameters:
| Name |
Type |
Argument |
Description |
node |
jQuery
|
Element
|
string
|
|
処理対象(起点)の要素ノード |
tmpl |
string
|
<optional>
|
URL をリンクにするとき雛形とする a 要素の HTML 文字列 |
- Source:
Returns:
与えた要素ノード(を内包した jQuery オブジェクト)
-
Type
-
jQuery
-
<static> watchFor(expr, timeout, base, interval) → {jQuery.Deferred.Promise}
-
watch existing of the specified object.
Parameters:
| Name |
Type |
Argument |
Default |
Description |
expr |
string
|
|
|
string-expression of watching target object. |
timeout |
number
|
<optional>
|
3000
|
time to giving up (ms, positive number) |
base |
Object
|
<optional>
|
window
|
base object of expr |
interval |
number
|
<optional>
|
96
|
watching interval (ms, positive number) |
- Source:
Returns:
a Deferred's Promise object.
-
Type
-
jQuery.Deferred.Promise