একটি enum কল করার জন্য, আপনি তার পিতামাতার শ্রেণী, নাম এবং সম্পত্তি কল করুন। উদাহরণস্বরূপ, HtmlService.SandboxMode.IFRAME ।
NATIVE এবং EMULATED মোডগুলি 13 অক্টোবর, 2015-এ বাতিল করা হয়েছিল এবং উভয়ই এখন সূর্যাস্ত হয়েছে৷ শুধুমাত্র IFRAME মোড এখন সমর্থিত।
ব্যবহারকারীদের ক্ষতিকারক HTML বা JavaScript পরিবেশন করা থেকে রক্ষা করার জন্য, HTML পরিষেবা থেকে পরিবেশিত ক্লায়েন্ট-সাইড কোড একটি নিরাপত্তা স্যান্ডবক্সে সঞ্চালিত হয় যা কোডের উপর বিধিনিষেধ আরোপ করে। Html Output.setSandboxMode(mode) পদ্ধতিটি আগে স্ক্রিপ্ট লেখকদের স্যান্ডবক্সের বিভিন্ন সংস্করণের মধ্যে বেছে নেওয়ার অনুমতি দিত, কিন্তু এখন কোন প্রভাব নেই। আরও তথ্যের জন্য, HTML পরিষেবায় বিধিনিষেধের নির্দেশিকা দেখুন।
IFRAME মোড অন্যান্য স্যান্ডবক্স মোডের তুলনায় অনেক কম বিধিনিষেধ আরোপ করে এবং দ্রুত চলে, কিন্তু ইন্টারনেট এক্সপ্লোরার 9 সহ কিছু পুরানো ব্রাউজারে মোটেও কাজ করে না। স্যান্ডবক্স মোডটি google.script.sandbox.mode পরিদর্শন করে একটি ক্লায়েন্ট-সাইড স্ক্রিপ্টেও পড়া যেতে পারে। মনে রাখবেন যে এই বৈশিষ্ট্যটি ক্লায়েন্টে প্রকৃত মোড প্রদান করে, যা সার্ভারে অনুরোধ করা মোড থেকে ভিন্ন হতে পারে যদি অনুরোধ করা মোড ব্যবহারকারীর ব্রাউজারে সমর্থিত না হয়।
<!-- Read the sandbox mode (in a client-side script). -->
<script>
alert(google.script.sandbox.mode);
</script>
বৈশিষ্ট্য
সম্পত্তি
টাইপ
বর্ণনা
EMULATED
Enum
একটি লিগ্যাসি স্যান্ডবক্স মোড যা শুধুমাত্র ECMAScript 3-এ উপলব্ধ বৈশিষ্ট্যগুলি ব্যবহার করে ECMAScript 5 কঠোর মোড অনুকরণ করে। ফেব্রুয়ারি 2014 এর আগে এই মোডটি ডিফল্ট ছিল।
একটি স্যান্ডবক্স মোড যা EMULATED এবং NATIVE মোড দ্বারা ব্যবহৃত Caja স্যান্ডবক্স প্রযুক্তির পরিবর্তে iframe স্যান্ডবক্সিং ব্যবহার করে। এই মোডটি 12 নভেম্বর, 2015 পর্যন্ত নতুন স্ক্রিপ্টের জন্য এবং 6 জুলাই, 2016 পর্যন্ত সমস্ত স্ক্রিপ্টের জন্য ডিফল্ট।
এই মোডটি অন্যান্য স্যান্ডবক্স মোডের তুলনায় অনেক কম বিধিনিষেধ আরোপ করে এবং দ্রুত চলে, কিন্তু ইন্টারনেট এক্সপ্লোরার 9 সহ কিছু পুরানো ব্রাউজারে মোটেও কাজ করে না।
NATIVE
Enum
একটি স্যান্ডবক্স মোড যা ECMAScript 5 কঠোর মোডের উপরে নির্মিত। ECMAScript 5 কঠোর মোডের উপরে নির্মিত একটি স্যান্ডবক্স মোড। এই মোডটি 6 জুলাই, 2016 তারিখে সূর্যাস্ত হয়েছিল। সমস্ত স্ক্রিপ্ট এখন IFRAME মোড ব্যবহার করে।
[[["সহজে বোঝা যায়","easyToUnderstand","thumb-up"],["আমার সমস্যার সমাধান হয়েছে","solvedMyProblem","thumb-up"],["অন্যান্য","otherUp","thumb-up"]],[["এতে আমার প্রয়োজনীয় তথ্য নেই","missingTheInformationINeed","thumb-down"],["খুব জটিল / অনেক ধাপ","tooComplicatedTooManySteps","thumb-down"],["পুরনো","outOfDate","thumb-down"],["অনুবাদ সংক্রান্ত সমস্যা","translationIssue","thumb-down"],["নমুনা / কোড সংক্রান্ত সমস্যা","samplesCodeIssue","thumb-down"],["অন্যান্য","otherDown","thumb-down"]],["2025-08-04 UTC-তে শেষবার আপডেট করা হয়েছে।"],[[["\u003cp\u003eSandboxMode is used for setting the sandbox environment for client-side HtmlService scripts in Google Apps Script.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eIFRAME\u003c/code\u003e is the only supported SandboxMode; \u003ccode\u003eNATIVE\u003c/code\u003e and \u003ccode\u003eEMULATED\u003c/code\u003e are deprecated and sunset.\u003c/p\u003e\n"],["\u003cp\u003eClient-side code in HTML service runs in a security sandbox with restrictions to protect users.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eIFRAME\u003c/code\u003e mode has fewer restrictions and runs faster but might not work in older browsers like Internet Explorer 9.\u003c/p\u003e\n"],["\u003cp\u003eYou can read the actual sandbox mode on the client-side using \u003ccode\u003egoogle.script.sandbox.mode\u003c/code\u003e.\u003c/p\u003e\n"]]],[],null,["# Enum SandboxMode\n\nSandboxMode\n\nAn enum representing the sandbox modes that can be used for client-side [HtmlService](/apps-script/reference/html/html-service)\nscripts. These values can be accessed from [HtmlService.SandboxMode](/apps-script/reference/html/html-service#SandboxMode), and set by calling\n[HtmlOutput.setSandboxMode(mode)](/apps-script/reference/html/html-output#setSandboxMode(SandboxMode)).\n\nTo call an enum, you call its parent class, name, and property. For example, `\nHtmlService.SandboxMode.IFRAME`.\n\nThe `NATIVE` and `EMULATED` modes were [deprecated on October 13, 2015](https://workspace.google.com/blog/product-announcements/google-apps-script-update-htmlservice) and both are now sunset. Only `IFRAME` mode is now\nsupported.\n\nTo protect users from being served malicious HTML or JavaScript, client-side code served from\nHTML service executes in a security sandbox that imposes restrictions on the code. The method\n[HtmlOutput.setSandboxMode(mode)](/apps-script/reference/html/html-output#setSandboxMode(SandboxMode)) previously allowed script authors to choose\nbetween different versions of the sandbox, but now has no effect. For more information, see the\n[guide to restrictions in HTML service](/apps-script/guides/html/restrictions).\n\nThe `IFRAME` mode imposes many fewer restrictions than the other sandbox modes and runs\nfastest, but does not work at all in certain older browsers, including Internet Explorer 9. The\nsandbox mode can also be read in a client-side script by inspecting `google.script.sandbox.mode`. Note that this property returns the actual mode on the client, which\nmay differ from the mode requested on the server if the requested mode is not supported in the\nuser's browser.\n\n```html\n\u003c!-- Read the sandbox mode (in a client-side script). --\u003e\n\u003cscript\u003e\n alert(google.script.sandbox.mode);\n\u003c/script\u003e\n``` \n\n### Properties\n\n| Property | Type | Description |\n|------------|--------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `EMULATED` | `Enum` | A legacy sandbox mode that emulates ECMAScript 5 strict mode using only the features available in ECMAScript 3. This mode was the default prior to February 2014. `EMULATED` was [sunset as of December 10, 2015](/apps-script/guides/support/sunset). All scripts attempting use `EMULATED` will now use `IFRAME` instead. |\n| `IFRAME` | `Enum` | A sandbox mode that uses iframe sandboxing instead of the Caja sandbox technology used by the `EMULATED` and `NATIVE` modes. This mode is the default for new scripts as of November 12, 2015 and for all scripts as of July 6, 2016. This mode imposes many fewer restrictions than the other sandbox modes and runs fastest, but does not work at all in certain older browsers, including Internet Explorer 9. |\n| `NATIVE` | `Enum` | A sandbox mode that is built on top of ECMAScript 5 strict mode. A sandbox mode built on top of ECMAScript 5 strict mode. This mode was [sunset as of July 6, 2016](/apps-script/guides/support/sunset). All scripts now use `IFRAME` mode. |"]]