问题
As we all know, we can show input box with html element.like this.<\input type="text" name="" value="" >. but now I want to display this input box on safari with NPAPI plugin. when I embed this plugin the box should show on safari. I found a npapi sample named "NPAPI Core Animation Movie Plugin" in https://developer.apple.com/library/archive/samplecode/NPAPI_Core_Animation_Movie_Plugin/Introduction/Intro.html . In this sample, it draws anything that will show on safari. But I want to know whether it is possible to use NSTextField to show a input box directly. Have anyone done the similar work?
回答1:
You cannot use NSTextField, or other native controls, in NPAPI on OS X. NPAPI is not designed for embedding native controls into a browser's window.
来源:https://stackoverflow.com/questions/24772260/how-to-display-a-input-box-on-safari-with-npapi-plugin