ryanmcgrath / cacao

Rust bindings for AppKit (macOS) and UIKit (iOS/tvOS). Experimental, but working!
MIT License
1.8k stars 65 forks source link

feat(webview): Allow loading of HTML string instead of URL. #10

Closed lemarier closed 3 years ago

lemarier commented 3 years ago

Allow loading of HTML string instead of URL in the Webview instance.

Example:

webview_instance.load_html("<h1>Hello</h1><br/>from cacao!");
ryanmcgrath commented 3 years ago

Merged, appreciate it again! I made a small change to handle the NSString references slightly differently, but otherwise super cool.