mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Cleanup ProcessingInstruction
This commit is contained in:
parent
51dd6984f7
commit
2411d607d4
3 changed files with 12 additions and 4 deletions
|
@ -37,13 +37,20 @@ impl ProcessingInstruction {
|
|||
Node::reflect_node(box ProcessingInstruction::new_inherited(target, data, document),
|
||||
document, ProcessingInstructionBinding::Wrap)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn target<'a>(&'a self) -> &'a DOMString {
|
||||
&self.target
|
||||
pub trait ProcessingInstructionHelpers<'a> {
|
||||
fn target(self) -> &'a DOMString;
|
||||
}
|
||||
|
||||
impl<'a> ProcessingInstructionHelpers<'a> for JSRef<'a, ProcessingInstruction> {
|
||||
fn target(self) -> &'a DOMString {
|
||||
&self.extended_deref().target
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a> ProcessingInstructionMethods for JSRef<'a, ProcessingInstruction> {
|
||||
// https://dom.spec.whatwg.org/#dom-processinginstruction-target
|
||||
fn Target(self) -> DOMString {
|
||||
self.target.clone()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue