mirror of
https://github.com/servo/servo.git
synced 2025-08-04 21:20:23 +01:00
Implement local bookmark(hashtag) for Acid2. With @joonwonlee
Support hashtag through link (e.g. <a href="#top">)
This commit is contained in:
parent
c7ad220178
commit
266b551aa4
8 changed files with 129 additions and 5 deletions
|
@ -12,7 +12,7 @@ use dom::characterdata::CharacterData;
|
|||
use dom::document::{AbstractDocument, DocumentTypeId};
|
||||
use dom::documenttype::DocumentType;
|
||||
use dom::element::{Element, ElementTypeId, HTMLImageElementTypeId, HTMLIframeElementTypeId};
|
||||
use dom::element::{HTMLStyleElementTypeId};
|
||||
use dom::element::{HTMLAnchorElementTypeId, HTMLStyleElementTypeId};
|
||||
use dom::eventtarget::{AbstractEventTarget, EventTarget, NodeTypeId};
|
||||
use dom::nodelist::{NodeList};
|
||||
use dom::htmlimageelement::HTMLImageElement;
|
||||
|
@ -492,6 +492,10 @@ impl<'self, View> AbstractNode<View> {
|
|||
self.type_id() == ElementNodeTypeId(HTMLStyleElementTypeId)
|
||||
}
|
||||
|
||||
pub fn is_anchor_element(self) -> bool {
|
||||
self.type_id() == ElementNodeTypeId(HTMLAnchorElementTypeId)
|
||||
}
|
||||
|
||||
pub unsafe fn raw_object(self) -> *mut Box<Node<View>> {
|
||||
self.obj
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue