mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Implement DOMPoint.fromPoint
This commit is contained in:
parent
5f477707a1
commit
40dbb2c100
19 changed files with 30 additions and 133 deletions
|
@ -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)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue