mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 09:02:43 +00:00 
			
		
		
		
	 1682f0b760
			
		
	
	
		1682f0b760
		
	
	
	
	
		
			
			SPDX License Identifiers are a more compact / standardized way of representing file license information. See: https://spdx.dev/resources/use/#identifiers This was done with the `ambr` search and replace tool. ambr --no-parent-ignore --key-from-file --rep-from-file key.txt rep.txt *
		
			
				
	
	
		
			53 lines
		
	
	
	
		
			1.3 KiB
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			53 lines
		
	
	
	
		
			1.3 KiB
		
	
	
	
		
			C++
		
	
	
	
	
	
| /*
 | |
|  * Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
 | |
|  *
 | |
|  * SPDX-License-Identifier: BSD-2-Clause
 | |
|  */
 | |
| 
 | |
| #pragma once
 | |
| 
 | |
| #include <LibWeb/DOM/Element.h>
 | |
| #include <LibWeb/HTML/EventNames.h>
 | |
| #include <LibWeb/HTML/GlobalEventHandlers.h>
 | |
| 
 | |
| namespace Web::HTML {
 | |
| 
 | |
| class HTMLElement
 | |
|     : public DOM::Element
 | |
|     , public HTML::GlobalEventHandlers {
 | |
| public:
 | |
|     using WrapperType = Bindings::HTMLElementWrapper;
 | |
| 
 | |
|     HTMLElement(DOM::Document&, QualifiedName);
 | |
|     virtual ~HTMLElement() override;
 | |
| 
 | |
|     String title() const { return attribute(HTML::AttributeNames::title); }
 | |
| 
 | |
|     virtual bool is_editable() const final;
 | |
|     String content_editable() const;
 | |
|     DOM::ExceptionOr<void> set_content_editable(const String&);
 | |
| 
 | |
|     String inner_text();
 | |
|     void set_inner_text(StringView);
 | |
| 
 | |
|     unsigned offset_top() const;
 | |
|     unsigned offset_left() const;
 | |
| 
 | |
|     bool cannot_navigate() const;
 | |
| 
 | |
| protected:
 | |
|     virtual void parse_attribute(const FlyString& name, const String& value) override;
 | |
| 
 | |
| private:
 | |
|     // ^HTML::GlobalEventHandlers
 | |
|     virtual EventTarget& global_event_handlers_to_event_target() override { return *this; }
 | |
| 
 | |
|     enum class ContentEditableState {
 | |
|         True,
 | |
|         False,
 | |
|         Inherit,
 | |
|     };
 | |
|     ContentEditableState content_editable_state() const;
 | |
| };
 | |
| 
 | |
| }
 |