<!--
{
  "documentType" : "article",
  "framework" : "WebKit",
  "identifier" : "/documentation/WebKit/domdocument-additions",
  "metadataVersion" : "0.1.0",
  "role" : "collectionGroup",
  "title" : "DOMDocument Additions"
}
-->

# DOMDocument Additions

Additions to the `DOMDocument` class facilitate communication between the DOM API and WebKit and help convert DOM URL element attributes into web-friendly URLs.

## Topics

### Getting the web frame

[`var webFrame: WebFrame!`](/documentation/WebKit/DOMDocument/webFrame)

The web frame associated with the DOM document.

### Constructing URLs

[`func url(withAttributeString: String!) -> URL!`](/documentation/WebKit/DOMDocument/url(withAttributeString:))

Constructs a URL given an attribute string.

## See Also

  [WebKit DOM Programming Topics](https://developer.apple.com/library/archive/documentation/AppleApplications/Conceptual/SafariJSProgTopics/index.html#//apple_ref/doc/uid/TP40001483)

  [WebKit Objective-C Programming Guide](https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/DisplayWebContent/DisplayWebContent.html#//apple_ref/doc/uid/10000164i)



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)