Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Insert SCRIPT tag with DOM modifications



Hi Philipp, I do something like this:

in
-(void)awakeFromNib
[fWebView setFrameLoadDelegate:self];
[[fWebView mainFrame] loadHTMLString:@"<html><head><title> </title></ head><body style='border: 0; margin: 0; padding: 0'>foo</body></ html>" baseURL:nil];


in
- (void)webView:(WebView *)sender didFinishLoadForFrame:(WebFrame *) frame:
DOMNodeList *list = [doc getElementsByTagName:@"HEAD"];
assert([list length] > 0);
DOMNode *body = [list item:0];
DOMElement *el = [doc createElement:@"SCRIPT"];
[el setAttribute:@"type" :@"text/javascript"];
[body appendChild:el];



hope this helps, Michael

--
Michael Hanna
email@hidden
iChat: michaelkhanna(AIM)



On 8-Dec-05, at 4:38 PM, Philipp Seibel wrote:

Hi,

i tried to insert a javascript file into a allready loaded html file by inserting a <script scr="..." type="text/javascript" /> tag.
The javascript code isn't available after the DOM modification. Is is possible to to things like that ?


thx

Phil

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webkitsdk-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webkitsdk-dev/mhanna% 40atimi.com


This email sent to email@hidden

_______________________________________________ Do not post admin requests to the list. They will be ignored. Webkitsdk-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webkitsdk-dev/email@hidden

This email sent to email@hidden
References: 
 >Insert SCRIPT tag with DOM modifications (From: Philipp Seibel <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.