forked from cadence/Carbon
15 lines
244 B
JavaScript
15 lines
244 B
JavaScript
import {ElemJS} from "./basic.js"
|
|
|
|
class Anchor extends ElemJS {
|
|
constructor() {
|
|
super("div")
|
|
this.class("c-anchor")
|
|
}
|
|
|
|
scroll() {
|
|
// console.log("anchor scrolled")
|
|
this.element.scrollIntoView({block: "start"})
|
|
}
|
|
}
|
|
|
|
export {Anchor}
|