How do I show application-specific data on a web page?
How do I show application-specific data on a web page?
- Subject: How do I show application-specific data on a web page?
- From: Daryle Walker <email@hidden>
- Date: Sun, 19 Oct 2014 14:07:53 -0400
I dabbled with writing web pages in the Mosaic days (i.e. the mid-1990s), but I’ve never done anything with Java or JavaScript. For my web browser project, I sometimes want to show synthesized pages. It would be a web page within my bundle that I have to modify before displaying. I first thought of treating it like a big NSString with “%@“ specifiers for the custom data, but that would be too fickle; changing the code or template would require the other one to change.
Now I think substitution via web-scripting would be better. I would centralize the custom data behind JavaScript variables, and the user-facing HTML code would call those variables. Since the variables are in one place, I can change the HTML code as I (or someone I contract out) wish. For implementation, I’m still thinking of “%@“ substitution, but in a single block within the HEAD section of the HTML template. Looking at the WebKit APIs, there seem to be ways to specify web-scripting objects directly; would that be a better choice?
And, how would I do this, both in the Objective-C and HTML code?
—
Daryle Walker
Mac, Internet, and Video Game Junkie
darylew AT mac DOT com
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden