forked from cadence/Carbon
16 lines
241 B
JavaScript
16 lines
241 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}
|