MCPcopy
hub / github.com/witheve/Eve / apply

Method apply

src/ide/spans.ts:952–970  ·  view source on GitHub ↗
(from:Position, to:Position, origin = "+input")

Source from the content-addressed store, hash-verified

950 commentElem?: HTMLElement;
951
952 apply(from:Position, to:Position, origin = "+input") {
953 this.lineBackgroundClass = "COMMENT_" + this.kind;
954 this._attributes.className = this.type + " " + this.kind;
955
956 if(!this.commentElem) {
957 this.commentElem = document.createElement("div");
958 }
959
960 this.commentElem.className = "comment-widget" + " " + this.kind;
961
962 if(this.editor.inCodeBlock(to)) {
963 this.commentElem.className += " code-comment-widget";
964 }
965
966 if(this.source.delay) {
967 this["updateWidget"] = debounce(this.updateWidget, this.source.delay);
968 }
969 super.apply(from, to, origin);
970 }
971
972 clear(origin:string = "+delete") {
973 if(!this.marker) return;

Callers

nothing calls this directly

Calls 3

debounceFunction · 0.90
inCodeBlockMethod · 0.80
applyMethod · 0.45

Tested by

no test coverage detected