Make changes in XML file with javascript
I'm making a safari extension and i need to make a change in the info.plist file from javascript.
My javascript file is at /scripts
So when a setting with a checkbox is changed the javascript puts the true/false value of that setting into the info.plist
How do i change a 开发者_如何学运维plist file (xml formatted) with javascript?
I'd rather not be the bearer of bad news, but it's not possible for a Safari extension to programmatically change its own (much less any other) info.plist file. At least, there is no documented API method for doing so.
If you want to store a setting, using the safari.extension.settings object (or .secureSettings object) is the conventional way to do it—but that's probably not what you had in mind.
精彩评论