Files
HTMLKit/Sources/HTMLCharacterData.h
T
iska 6be1bd702f Add implementation for HTML Character Data methods
The data property is longer exposed as a mutable string. Instead all
manipulations must be performed via the provided API in order to ensure
correct updates for the Document’s attached ranges.

See:
https://dom.spec.whatwg.org/#characterdata
2016-11-27 20:18:12 +01:00

32 lines
672 B
Objective-C

//
// HTMLCharacterData.h
// HTMLKit
//
// Created by Iska on 26/11/16.
// Copyright © 2016 BrainCookie. All rights reserved.
//
#import "HTMLNode.h"
NS_ASSUME_NONNULL_BEGIN
/**
A HTML CharacterData
https://dom.spec.whatwg.org/#characterdata
*/
@interface HTMLCharacterData : HTMLNode
/** @brief The associated data string. */
@property (nonatomic, copy, readonly) NSString *data;
- (void)setData:(NSString *)data;
- (void)appendData:(NSString *)data;
- (void)insertData:(NSString *)data atOffset:(NSUInteger)offset;
- (void)deleteDataInRange:(NSRange)range;
- (void)replaceDataInRange:(NSRange)range withData:(NSString *)data;
@end
NS_ASSUME_NONNULL_END