pub struct HTMLDataManager { /* private fields */ }Expand description
Provides tags, attributes, and attribute value and so on, for completion proposals and hover information. It has standard data built-in and can be customized
Implementations§
Source§impl HTMLDataManager
impl HTMLDataManager
Sourcepub fn set_data_providers(
&mut self,
built_in: bool,
providers: Vec<Box<dyn IHTMLDataProvider>>,
)
pub fn set_data_providers( &mut self, built_in: bool, providers: Vec<Box<dyn IHTMLDataProvider>>, )
Set up a data provider, and the old data will be cleaned
pub fn get_data_providers(&self) -> &Vec<Box<dyn IHTMLDataProvider>>
Sourcepub fn is_void_element(&self, tag: &str, void_elements: &Vec<String>) -> bool
pub fn is_void_element(&self, tag: &str, void_elements: &Vec<String>) -> bool
Is the tag void element
void_elements is from get_void_elements, and you should cache it to avoid duplicate void_elements generation
Sourcepub fn get_void_elements(&self, language_id: &str) -> Vec<String>
pub fn get_void_elements(&self, language_id: &str) -> Vec<String>
Get void_elements from data_provider and you should cache it if you make sure it doesn’t change
Sourcepub fn is_path_attribute(&self, tag: &str, attr: &str) -> bool
pub fn is_path_attribute(&self, tag: &str, attr: &str) -> bool
Is the attr of tag a path attribute