mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Support isSecureContext
for custom protocols
Signed-off-by: Tony <legendmastertony@gmail.com>
This commit is contained in:
parent
894fbd003d
commit
d49689bf09
13 changed files with 103 additions and 10 deletions
|
@ -110,6 +110,10 @@ impl ProtocolRegistry {
|
|||
self.handlers.get(scheme).map(|e| e.as_ref())
|
||||
}
|
||||
|
||||
pub fn iter(&self) -> std::collections::hash_map::Iter<'_, String, Box<dyn ProtocolHandler>> {
|
||||
self.handlers.iter()
|
||||
}
|
||||
|
||||
pub fn merge(&mut self, mut other: ProtocolRegistry) {
|
||||
for (scheme, handler) in other.handlers.drain() {
|
||||
if FORBIDDEN_SCHEMES.contains(&scheme.as_str()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue