Carbon/build/static/Anchor.js

16 lines
244 B
JavaScript
Raw Normal View History

2020-10-19 05:37:17 +00:00
import {ElemJS} from "./basic.js"
class Anchor extends ElemJS {
constructor() {
super("div")
this.class("c-anchor")
}
scroll() {
// console.log("anchor scrolled")
2020-10-19 05:37:17 +00:00
this.element.scrollIntoView({block: "start"})
}
}
export {Anchor}