2006-09-05から1日間の記事一覧

Insertion.Topクラス

【抜粋】 Insertion.Top = Class.create(); Insertion.Top.prototype = Object.extend(new Abstract.Insertion('afterBegin'), { initializeRange: function() { this.range.selectNodeContents(this.element); this.range.collapse(true); }, insertContent…

Insertion.Afterクラス

【抜粋】 Insertion.After = Class.create(); Insertion.After.prototype = Object.extend(new Abstract.Insertion('afterEnd'), { initializeRange: function() { this.range.setStartAfter(this.element); }, insertContent: function(fragments) { fragme…

Insertion.Bottomクラス

【抜粋】 Insertion.Bottom = Class.create(); Insertion.Bottom.prototype = Object.extend(new Abstract.Insertion('beforeEnd'), { initializeRange: function() { this.range.selectNodeContents(this.element); this.range.collapse(this.element); }, …

Insertion.Beforeクラス

【抜粋】 Insertion.Before = Class.create(); Insertion.Before.prototype = Object.extend(new Abstract.Insertion('beforeBegin'), { initializeRange: function() { this.range.setStartBefore(this.element); }, insertContent: function(fragments) { …

Insertionオブジェクト(名前空間)

【抜粋】 var Insertion = new Object();後述のInsertion.Before、Insertion.Top、Insertion.Bottom、Insertion.Afterクラスの名前空間用オブジェクトです。

Abstract.Insertionクラス

前提条件:DOMについての理解 Insertion関連のクラスを理解するためには、DOMについての理解が不可欠になります。実は筆者もあまり詳しいとは言えません^^; このため、不適切な記述があるかもしれませんが、ご容赦ください。気がついたらその都度修正しま…