How can I add xmlns namespace to <html> tag in meteor

This is what I'm trying to accomplish (to integrate Facebook send button using addthis)

<html xmlns:fb="">

However the html is out of my control. Meteor also forbids adding attributes to <head> such as:

<head prefix="og: fb:">

Workarounds that serve the same purpose are more than welcome.


I'm not sure how to change it through the raw source. But you can use something in your rendered callback to get to it via:

Template.hello.rendered = function() {
    $("head").attr("prefix", "og: fb:");

This uses JQuery to modify the html tag as soon as Meteor renders the DOM.

Adding the following line in your server side code will resolve your first question.

WebApp.addHtmlAttributeHook(function (request) { return 'xmlns:fb='; });

I have no idea about your second question...

UPDATE: Certainly you need to return an object in Meteor 1.0. WebApp.addHtmlAttributeHook(function (request) { return {'xmlns:fb': ''; });

This worked for me:

WebApp.addHtmlAttributeHook(function (request) { return {"ng-app":"helloWorld"}});

(I wish I could put this as a comment on but I don't have enough points to comment - I'll upvote it)

This also seems to work to get it added on the client side:

Meteor.startup(function() {
  $('html').attr('ng-app', 'helloWorld');

Need Your Help

Simple Active Directory and powershell combo , issues

powershell active-directory powershell-v2.0

Well today i decided i want to have some fun with AD and PS so i bascially decided i want to write a script to access my dc and and its ou and sub ou's and grab all my windows servers deployed. how...

how can i use this fileupload in a form?


hi i found this fileupload today and it kinda fits like a glove for a form im doing, my only problem is how do i upload this file to server? i know it say to put it in a form but im still confused....

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.