mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 09:22:44 +00:00 
			
		
		
		
	 ffad902c07
			
		
	
	
		ffad902c07
		
	
	
	
	
		
			
			Unlike ensure_web_prototype<T>(), the cached version doesn't require the prototype type to be fully formed, so we can use it without including the FooPrototype.h header. It's also a bit less verbose. :^)
		
			
				
	
	
		
			25 lines
		
	
	
	
		
			582 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			25 lines
		
	
	
	
		
			582 B
		
	
	
	
		
			C++
		
	
	
	
	
	
| /*
 | |
|  * Copyright (c) 2020, Matthew Olsson <mattco@serenityos.org>
 | |
|  *
 | |
|  * SPDX-License-Identifier: BSD-2-Clause
 | |
|  */
 | |
| 
 | |
| #include <LibWeb/HTML/Window.h>
 | |
| #include <LibWeb/SVG/SVGElement.h>
 | |
| 
 | |
| namespace Web::SVG {
 | |
| 
 | |
| SVGElement::SVGElement(DOM::Document& document, DOM::QualifiedName qualified_name)
 | |
|     : Element(document, move(qualified_name))
 | |
|     , m_dataset(HTML::DOMStringMap::create(*this))
 | |
| {
 | |
|     set_prototype(&window().cached_web_prototype("SVGElement"));
 | |
| }
 | |
| 
 | |
| void SVGElement::visit_edges(Cell::Visitor& visitor)
 | |
| {
 | |
|     Base::visit_edges(visitor);
 | |
|     visitor.visit(m_dataset.ptr());
 | |
| }
 | |
| 
 | |
| }
 |