Carbon/src/js/Anchor.js

16 lines
244 B
JavaScript
Raw Normal View History

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