mirror of
https://github.com/servo/servo.git
synced 2025-08-05 13:40:08 +01:00
Implement Document.createComment.
This commit is contained in:
parent
368d512b99
commit
98cdf5c118
4 changed files with 19 additions and 4 deletions
|
@ -106,6 +106,14 @@ pub fn null_str_as_empty_ref<'a>(s: &'a DOMString) -> &'a str {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn null_str_as_word_null(s: &DOMString) -> ~str {
|
||||
// We don't use map_default because it would allocate ~"null" even for Some.
|
||||
match *s {
|
||||
Some(ref s) => s.clone(),
|
||||
None => ~"null"
|
||||
}
|
||||
}
|
||||
|
||||
fn is_dom_class(clasp: *JSClass) -> bool {
|
||||
unsafe {
|
||||
((*clasp).flags & js::JSCLASS_IS_DOMJSCLASS) != 0
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue