Implement DOMPoint.fromPoint

This commit is contained in:
Kagami Sascha Rosylight 2019-07-05 11:03:34 +09:00
parent 5f477707a1
commit 40dbb2c100
19 changed files with 30 additions and 133 deletions

View file

@ -40,6 +40,11 @@ impl DOMPoint {
Ok(DOMPoint::new(global, x, y, z, w))
}
// https://drafts.fxtf.org/geometry/#dom-dompoint-frompoint
pub fn FromPoint(global: &GlobalScope, init: &DOMPointInit) -> DomRoot<Self> {
Self::new_from_init(global, init)
}
pub fn new_from_init(global: &GlobalScope, p: &DOMPointInit) -> DomRoot<DOMPoint> {
DOMPoint::new(global, p.x, p.y, p.z, p.w)
}