What is injectable and embedded?

I have heard about all the terms Injectable and Embeddable many times, but I am not getting the actual meaning.

Please help me understand both clearly.

+6
source share
2 answers

Injectable means that something can be created and added to the main script while the script is running.

Embeddable means that something can be added to the script or code before running it ie before compiling or running the script.

For a better understanding, you can use a website with a text box as a context. Now, in the text box, suppose it is very simple. So, I can add javascript to the text box, and when I submit, it will run my JS script. Thus, I am injecting my own script on the main page.

Now suppose I add an Iframe another website to my site's HTML file. Thus, when the site is viewed, it contains an iframe. Thus, Iframe is embedded in the website.

+3
source

Injectable means that an object can be created and injected at runtime. This is a hint to the compiler that this object will be managed outside the compilation area and can be used at run time to determine if the object was intended for input.

Embeddable means that an object can be serialized and stored in a column, and not as a separate table when the saved object is saved. It also means that the lifetime of the embedded object is the same as the life of the containing object.

+2
source

Source: https://habr.com/ru/post/988130/


All Articles