<!DOCTYPE html> <html> <head><meta charset="utf-8"/></head> <body> <object id="test" type="application/x-test" width=200 height=200></object> <script> function addSecondPlugin() { var object = document.createElement("object"); object.type = "application/x-second-test"; object.width = 200; object.height = 200; object.id = "secondtest"; document.body.appendChild(object); } </script> </body> </html>