Is it okay to boil eggs inside plastic bag in a bowl?

My aunt taught me to put eggs inside plastic bag so that eggs don't crack or is it dangerous?
Is it okay to boil eggs inside plastic bag in a bowl?
Post Opinion